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/cmd-inet/usr.sadm/dhcpmgr/Makefile
26
27include $(SRC)/Makefile.master
28
29SUBDIRS =	com lib bin help
30
31all	:=	TARGET= all
32install	:=	TARGET= install
33clean	:=	TARGET= clean
34clobber	:=	TARGET= clobber
35lint	:=	TARGET= lint
36_msg	:=	TARGET= _msg
37
38GUI_JAR= 	dhcpmgr.jar
39GUI_JARFILES=	com/sun/dhcpmgr/client/*.class \
40		com/sun/dhcpmgr/ui/*.class \
41		com/sun/dhcpmgr/ui/*.gif \
42		com/sun/dhcpmgr/client/*.properties \
43		com/sun/dhcpmgr/ui/*.properties
44
45SERVER_JAR= 		dhcpsvc.jar
46SERVER_JARFILES=	com/sun/dhcpmgr/server/*.class \
47			com/sun/dhcpmgr/bridge/*.class \
48			com/sun/dhcpmgr/server/*.properties \
49			com/sun/dhcpmgr/bridge/*.properties
50
51
52CLI_JAR= 	dhcpcli.jar
53CLI_JARFILES=	com/sun/dhcpmgr/cli/*/*.class \
54		com/sun/dhcpmgr/cli/*/*.properties
55
56COMMON_JAR= 		dhcpcommon.jar
57COMMON_JARFILES=	com/sun/dhcpmgr/data/*.class \
58			com/sun/dhcpmgr/data/qualifier/*.class \
59			com/sun/dhcpmgr/common/*.class \
60			com/sun/dhcpmgr/data/*.properties \
61			com/sun/dhcpmgr/common/*.properties
62
63SUNWFILES_JAR=		SUNWfiles.jar
64SUNWFILES_JARFILES=	com/sun/dhcpmgr/client/SUNWfiles/*.class \
65			com/sun/dhcpmgr/client/SUNWfiles/*.properties
66SUNWFILES_MANIFEST=	SUNWfiles.manifest
67
68SUNWBINFILES_JAR= 	SUNWbinfiles.jar
69SUNWBINFILES_JARFILES= 	com/sun/dhcpmgr/client/SUNWbinfiles/*.class \
70			com/sun/dhcpmgr/client/SUNWbinfiles/*.properties
71SUNWBINFILES_MANIFEST=	SUNWbinfiles.manifest
72
73CLI_JARS=${CLI_JAR} ${SERVER_JAR} ${COMMON_JAR}
74GUI_JARS=$(GUI_JAR) ${SUNWFILES_JAR} ${SUNWBINFILES_JAR}
75ALL_JARS= ${GUI_JARS} ${CLI_JARS}
76
77MANIFEST_FILES= $(SUNWFILES_MANIFEST) $(SUNWBINFILES_MANIFEST)
78
79ROOTGUIDIR = $(ROOT)/usr/sadm/admin/dhcpmgr
80ROOTCLIDIR = $(ROOT)/usr/lib/inet/dhcp/svcadm
81ROOTDIRS= $(ROOT)/usr/sadm/admin $(ROOTGUIDIR) $(ROOTCLIDIR)
82
83ROOTCLIFILES = ${CLI_JARS}
84ROOTGUIFILES = ${GUI_JARS}
85ROOTCLIDIRJAR = $(ROOTCLIFILES:%=$(ROOTCLIDIR)/%)
86ROOTGUIDIRJAR = $(ROOTGUIFILES:%=$(ROOTGUIDIR)/%)
87
88JAVADOC_PKGS=	com.sun.dhcpmgr.client \
89		com.sun.dhcpmgr.ui \
90		com.sun.dhcpmgr.data \
91		com.sun.dhcpmgr.data.qualifier \
92		com.sun.dhcpmgr.server \
93		com.sun.dhcpmgr.bridge \
94		com.sun.dhcpmgr.cli.common \
95		com.sun.dhcpmgr.cli.dhcpconfig \
96		com.sun.dhcpmgr.cli.dhtadm \
97		com.sun.dhcpmgr.cli.pntadm \
98		com.sun.dhcpmgr.common
99
100FILEMODE =	0444
101DIRMODE =	0755
102
103.KEEP_STATE:
104
105all: $(SUBDIRS) $(ALL_JARS)
106
107install: all $(ROOTDIRS) $(SUBDIRS) $(ROOTCLIDIRJAR) $(ROOTGUIDIRJAR)
108
109clean clobber: $(SUBDIRS)
110	-$(RM) $(MANIFEST_FILES)
111	-$(RM) $(ALL_JARS)
112
113lint:	lib
114
115_msg:	$(SUBDIRS)
116
117strip:
118
119#
120# The javadocs target is non-standard; used for creating API reference docs
121# The javadocs will be placed in $(CODEMGR_WS}/javadocs
122#
123javadocs:
124	$(RM) -r $(CODEMGR_WS)/$@; mkdir $(CODEMGR_WS)/$@
125	$(JAVADOC) -classpath $(CLASSPATH) -sourcepath . -d $(CODEMGR_WS)/$@ $(JAVADOC_PKGS) -windowtitle "DHCP Administration packages"
126
127$(GUI_JAR): FRC
128	$(JAR) cf $@ $(GUI_JARFILES)
129
130$(SERVER_JAR): FRC
131	$(JAR) cf $@ $(SERVER_JARFILES)
132
133$(CLI_JAR): FRC
134	$(JAR) cf $@ $(CLI_JARFILES)
135
136$(COMMON_JAR): FRC
137	$(JAR) cf $@ $(COMMON_JARFILES)
138
139$(SUNWFILES_JAR): $(SUNWFILES_MANIFEST) FRC
140	$(JAR) cmf $(SUNWFILES_MANIFEST) $@ $(SUNWFILES_JARFILES)
141
142$(SUNWBINFILES_JAR): $(SUNWBINFILES_MANIFEST) FRC
143	$(JAR) cmf $(SUNWBINFILES_MANIFEST) $@ $(SUNWBINFILES_JARFILES)
144
145$(SUNWFILES_MANIFEST):
146	@$(ECHO) "Name: com/sun/dhcpmgr/client/SUNWfiles/SUNWfiles.class" > $@;
147	@$(ECHO) "Java-Bean: True" >> $@;
148
149$(SUNWBINFILES_MANIFEST):
150	@$(ECHO) "Name: com/sun/dhcpmgr/client/SUNWbinfiles/SUNWbinfiles.class" > $@;
151	@$(ECHO) "Java-Bean: True" >> $@;
152
153$(ROOTCLIDIR)/%:	%
154	$(INS.file)
155
156$(ROOTGUIDIR)/%: %
157	$(INS.file)
158
159$(ROOTDIRS):
160	$(INS.dir)
161
162$(SUBDIRS):	FRC
163	@cd $@; pwd; $(MAKE) $(TARGET)
164
165FRC:
166