xref: /titanic_50/usr/src/cmd/pools/poold/Makefile (revision c0dd49bdd68c0d758a67d56f07826f3b45cfc664)
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)
104	-$(RM) $(OBJS) $(POFILES)
105
106lint: $(SUBDIRS)
107
108msg: $(POFILES)
109
110install: $(ROOTCMD) $(JAVA_SUBDIRS) $(JARFILE) \
111		    .WAIT $(SUBDIRS) $(ROOTJAVA) $(ROOTMANIFEST) \
112		    $(ROOTSVCMETHOD)
113
114check:	$(CHKMANIFEST)
115
116$(JAVA_SUBDIRS): FRC
117	@cd $@; pwd; $(MAKE) $(TARGET)
118	if [ "$(TARGET)" != "clean" ] && [ "$(TARGET)" != "clobber" ]; \
119	then \
120		if [ ! -f $(JARFILE) ]; \
121		then \
122			$(JAR) -cf $(JARFILE) $@/*class; \
123		else \
124			$(JAR) -uf $(JARFILE) $@/*class; \
125		fi \
126	fi
127
128$(SUBDIRS): FRC
129	@cd $@; pwd; $(MAKE) $(TARGET)
130
131doc:	all
132	$(JAVADOC) -private -classpath $(JARFILE): -sourcepath . \
133	    -source 1.4 -d $(DOCDIR) $(PACKAGEDOCS)
134
135$(PROG):	$(OBJS)
136	$(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
137	$(POST_PROCESS)
138
139$(ROOTUSRLIBDRP)/%: %
140	$(INS.file)
141
142FRC:
143
144lint:
145	$(LINT.c) $(PROG).c $(LINTLIBS)
146
147include $(SRC)/cmd/Makefile.targ
148