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