xref: /titanic_44/usr/src/cmd/pools/poold/Makefile (revision bde3d612a7c090234c60e6e4578821237a5db135)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# cmd/pools/poold/Makefile
26
27PROG =		poold
28OBJS =		poold.o
29SRCS =		$(OBJS:%.o=%.c)
30
31MANIFEST=	poold.xml
32SVCMETHOD=	svc-poold
33
34include $(SRC)/cmd/Makefile.cmd
35
36JAVA_SUBDIRS =	com/sun/solaris/service/exception \
37		com/sun/solaris/service/kstat \
38		com/sun/solaris/service/locality \
39		com/sun/solaris/service/logging \
40		com/sun/solaris/service/pools \
41		com/sun/solaris/service/timer \
42		com/sun/solaris/domain/pools
43
44SUBDIRS =	libjkstat \
45		libjlgrp \
46		libjpool \
47		libjsyslog
48
49ROOTMANIFESTDIR=	$(ROOTSVCSYSTEM)
50
51all :=		TARGET = all
52install :=	TARGET = install
53clean :=	TARGET = clean
54clobber :=	TARGET = clobber
55lint :=		TARGET = lint
56msg :=		TARGET = msg
57
58$(ROOTMANIFEST):=	FILEMODE= 444
59JARFILE =	JPool.jar
60
61# JAVA_SUBDIRS and PACKAGEDOCS must be synchronized to ensure
62# javadoc documentation is generated for all packages.
63
64PACKAGEDOCS =	com.sun.solaris.service.exception \
65		com.sun.solaris.service.kstat \
66		com.sun.solaris.service.locality \
67		com.sun.solaris.service.logging \
68		com.sun.solaris.service.pools \
69		com.sun.solaris.service.timer \
70		com.sun.solaris.domain.pools
71DOCDIR =	doc
72ROOTUSRLIBDRP = $(ROOTLIB)/pool
73INCS =		-I../common \
74		-I$(JAVA_ROOT)/include \
75		-I$(JAVA_ROOT)/include/solaris
76LDLIBS +=	-lpool -L$(JAVA_ROOT)/jre/lib/$(MACH)/client -ljvm
77LDFLAGS +=	-R$(JAVA_ROOT)/jre/lib/$(MACH)/client
78LINTFLAGS +=	-erroff=E_NAME_USED_NOT_DEF2
79LINTLIBS +=	-L$(ROOTLIB) -lpool
80
81CPPFLAGS +=	$(INCS)
82ROOTCMDDIR =	$(ROOT)/usr/lib/pool
83
84CLOBBERFILES +=	$(JARFILE)
85
86#
87# Definitions for message catalogue
88#
89POFILES =	$(OBJS:.o=.po)
90
91#
92# Definitions for Java installs
93#
94
95JFILES =	poold.properties $(JARFILE)
96ROOTJAVA =	$(JFILES:%=$(ROOTUSRLIBDRP)/%)
97
98$(ROOTJAVA) :=	FILEMODE = 444
99
100all:	$(PROG) $(JAVA_SUBDIRS) $(JARFILE) \
101		    .WAIT $(SUBDIRS)
102
103clean :	$(JAVA_SUBDIRS) $(SUBDIRS) clean_local
104clean_local:
105	$(RM) $(OBJS)
106
107clobber : $(JAVA_SUBDIRS) $(SUBDIRS) clobber_local
108clobber_local: clean_local
109	$(RM) $(CLOBBERFILES)
110
111lint: $(SUBDIRS)
112
113msg: $(POFILES)
114
115install: $(ROOTCMD) $(JAVA_SUBDIRS) $(JARFILE) \
116		    .WAIT $(SUBDIRS) $(ROOTJAVA) $(ROOTMANIFEST) \
117		    $(ROOTSVCMETHOD)
118
119check:	$(CHKMANIFEST)
120
121$(JAVA_SUBDIRS): FRC
122	@cd $@; pwd; $(MAKE) $(TARGET)
123	if [ "$(TARGET)" != "clean" ] && [ "$(TARGET)" != "clobber" ]; \
124	then \
125		if [ ! -f $(JARFILE) ]; \
126		then \
127			$(JAR) -cf $(JARFILE) $@/*class; \
128		else \
129			$(JAR) -uf $(JARFILE) $@/*class; \
130		fi \
131	fi
132
133$(SUBDIRS): FRC
134	@cd $@; pwd; $(MAKE) $(TARGET)
135
136doc:	all
137	$(JAVADOC) -private -classpath $(JARFILE): -sourcepath . \
138	    -source 1.4 -d $(DOCDIR) $(PACKAGEDOCS)
139
140$(PROG):	$(OBJS)
141	$(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
142	$(POST_PROCESS)
143
144$(ROOTUSRLIBDRP)/%: %
145	$(INS.file)
146
147FRC:
148
149lint:
150	$(LINT.c) $(PROG).c $(LINTLIBS)
151
152include $(SRC)/cmd/Makefile.targ
153