xref: /titanic_52/usr/src/cmd/pools/poold/Makefile (revision fcf3ce441efd61da9bb2884968af01cb7c1452cc)
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 2005 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
30PROG =		poold
31OBJS =		poold.o
32SRCS =		$(OBJS:%.o=%.c)
33
34MANIFEST=	poold.xml
35SVCMETHOD=	svc-poold
36
37include $(SRC)/cmd/Makefile.cmd
38
39JAVA_SUBDIRS =	com/sun/solaris/service/exception \
40		com/sun/solaris/service/kstat \
41		com/sun/solaris/service/locality \
42		com/sun/solaris/service/logging \
43		com/sun/solaris/service/pools \
44		com/sun/solaris/service/timer \
45		com/sun/solaris/domain/pools
46
47SUBDIRS =	libjkstat \
48		libjlgrp \
49		libjpool \
50		libjsyslog
51
52ROOTMANIFESTDIR=	$(ROOTSVCSYSTEM)
53
54all :=		TARGET = all
55install :=	TARGET = install
56clean :=	TARGET = clean
57clobber :=	TARGET = clobber
58lint :=		TARGET = lint
59msg :=		TARGET = msg
60
61$(ROOTMANIFEST):=	FILEMODE= 444
62JARFILE =	JPool.jar
63
64# JAVA_SUBDIRS and PACKAGEDOCS must be synchronized to ensure
65# javadoc documentation is generated for all packages.
66
67PACKAGEDOCS =	com.sun.solaris.service.exception \
68		com.sun.solaris.service.kstat \
69		com.sun.solaris.service.locality \
70		com.sun.solaris.service.logging \
71		com.sun.solaris.service.pools \
72		com.sun.solaris.service.timer \
73		com.sun.solaris.domain.pools
74DOCDIR =	doc
75ROOTUSRLIBDRP = $(ROOTLIB)/pool
76INCS =		-I../common \
77		-I$(JAVA_ROOT)/include \
78		-I$(JAVA_ROOT)/include/solaris
79LDLIBS +=	-lpool -L$(JAVA_ROOT)/jre/lib/$(MACH)/client -ljvm
80LDFLAGS +=	-R$(JAVA_ROOT)/jre/lib/$(MACH)/client
81LINTFLAGS +=	-erroff=E_NAME_USED_NOT_DEF2
82LINTLIBS +=	-L$(ROOTLIB) -lpool
83
84CPPFLAGS +=	$(INCS)
85ROOTCMDDIR =	$(ROOT)/usr/lib/pool
86
87CLOBBERFILES +=	$(JARFILE)
88
89#
90# Definitions for message catalogue
91#
92POFILES =	$(OBJS:.o=.po)
93
94#
95# Definitions for Java installs
96#
97
98JFILES =	poold.properties $(JARFILE)
99ROOTJAVA =	$(JFILES:%=$(ROOTUSRLIBDRP)/%)
100
101$(ROOTJAVA) :=	FILEMODE = 444
102$(ROOTJAVA) :=	OWNER = root
103$(ROOTJAVA) :=	GROUP = bin
104
105all:	$(PROG) $(JAVA_SUBDIRS) $(JARFILE) \
106		    .WAIT $(SUBDIRS)
107
108clean :	$(JAVA_SUBDIRS) $(SUBDIRS)
109	-$(RM) $(OBJS) $(POFILES)
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