xref: /titanic_44/usr/src/cmd/krb5/kadmin/gui/Makefile (revision 4d0eb50e691de4c20b1dd9976ad6839fede8a42d)
1*7c478bd9Sstevel@tonic-gate#
2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate#
4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate# with the License.
8*7c478bd9Sstevel@tonic-gate#
9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate# and limitations under the License.
13*7c478bd9Sstevel@tonic-gate#
14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate#
20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate#
22*7c478bd9Sstevel@tonic-gate#
23*7c478bd9Sstevel@tonic-gate# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate# Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate#
26*7c478bd9Sstevel@tonic-gate
27*7c478bd9Sstevel@tonic-gateinclude $(SRC)/Makefile.master
28*7c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/Makefile.cmd
29*7c478bd9Sstevel@tonic-gate
30*7c478bd9Sstevel@tonic-gateGUIDIR=$(SRC)/cmd/krb5/kadmin/gui
31*7c478bd9Sstevel@tonic-gate
32*7c478bd9Sstevel@tonic-gateTOGETHER= KdcGui KdcGuiMain KdcGuiOps KdcGuiRoot
33*7c478bd9Sstevel@tonic-gateTOGETHERJ=$(TOGETHER:%=%.java)
34*7c478bd9Sstevel@tonic-gateTOGETHERC=$(TOGETHER:%=classdir/%.class)
35*7c478bd9Sstevel@tonic-gate
36*7c478bd9Sstevel@tonic-gateOTHER=GuiResource GuiResource_en_US HelpData HelpData_en_US
37*7c478bd9Sstevel@tonic-gateOTHERJ=$(OTHER:%=%.java)
38*7c478bd9Sstevel@tonic-gateOTHERC=$(OTHER:%=classdir/%.class)
39*7c478bd9Sstevel@tonic-gate
40*7c478bd9Sstevel@tonic-gateCLASSES=$(TOGETHER) $(OTHER)
41*7c478bd9Sstevel@tonic-gateJFILES=$(CLASSES:%=%.java)
42*7c478bd9Sstevel@tonic-gateCLFILES=$(CLASSES:%=%.class)
43*7c478bd9Sstevel@tonic-gate
44*7c478bd9Sstevel@tonic-gateGKADMIN=gkadmin
45*7c478bd9Sstevel@tonic-gateJARFILE=gkadmin.jar
46*7c478bd9Sstevel@tonic-gateVISLIB=visualrt.jar
47*7c478bd9Sstevel@tonic-gateHTML=HelpIndex.html
48*7c478bd9Sstevel@tonic-gateMSGBUNDLEDIR=$(ROOT)/usr/lib/krb5/ListResourceBundle
49*7c478bd9Sstevel@tonic-gate
50*7c478bd9Sstevel@tonic-gateNONEXFILEMODE=444
51*7c478bd9Sstevel@tonic-gate
52*7c478bd9Sstevel@tonic-gate#
53*7c478bd9Sstevel@tonic-gate# Set $KRB5GUILIB
54*7c478bd9Sstevel@tonic-gate#
55*7c478bd9Sstevel@tonic-gateKRB5GUILIB=	$(ROOT)/usr/lib/krb5
56*7c478bd9Sstevel@tonic-gate
57*7c478bd9Sstevel@tonic-gate$(KRB5GUILIB)/$(JARFILE)	:=	FILEMODE= 444
58*7c478bd9Sstevel@tonic-gate$(KRB5GUILIB)/$(VISLIB)		:=	FILEMODE= 444
59*7c478bd9Sstevel@tonic-gate$(KRB5GUILIB)/$(HTML)		:=	FILEMODE= 444
60*7c478bd9Sstevel@tonic-gate
61*7c478bd9Sstevel@tonic-gate$(KRB5GUILIB)/%:	%
62*7c478bd9Sstevel@tonic-gate		$(INS.file)
63*7c478bd9Sstevel@tonic-gate
64*7c478bd9Sstevel@tonic-gate.SUFFIXES: .java .class $(SUFFIXES)
65*7c478bd9Sstevel@tonic-gate
66*7c478bd9Sstevel@tonic-gateCLASSPATH=$(GUIDIR):$(GUIDIR)/classdir:$(GUIDIR)/util:$(GUIDIR)/dataclasses:$(GUIDIR)/dchanger:$(GUIDIR)/native:$(GUIDIR)/visualrt:$(GUIDIR)/visualrt.jar:$(JAVA_ROOT)/jre/lib/rt.jar:$(JAVA_ROOT)/jre/lib/i18n.jar
67*7c478bd9Sstevel@tonic-gate
68*7c478bd9Sstevel@tonic-gateVISRT_CLASSPATH=$(GUIDIR)/visualrt:$(JAVA_ROOT)/jre/lib/rt.jar:$(JAVA_ROOT)/jre/lib/i18n.jar
69*7c478bd9Sstevel@tonic-gate
70*7c478bd9Sstevel@tonic-gateclassdir/%.class: %.java
71*7c478bd9Sstevel@tonic-gate	$(JAVAC) $(JAVAFLAGS) -d classdir -classpath $(CLASSPATH) $<
72*7c478bd9Sstevel@tonic-gate
73*7c478bd9Sstevel@tonic-gateSUBDIRS= util dataclasses dchanger native
74*7c478bd9Sstevel@tonic-gateVISDIR= visualrt
75*7c478bd9Sstevel@tonic-gate
76*7c478bd9Sstevel@tonic-gatedef             :=      TARGET= def
77*7c478bd9Sstevel@tonic-gateall             :=      TARGET= all
78*7c478bd9Sstevel@tonic-gateinstall         :=      TARGET= install
79*7c478bd9Sstevel@tonic-gateinstall_h       :=      TARGET= install_h
80*7c478bd9Sstevel@tonic-gateclean           :=      TARGET= clean
81*7c478bd9Sstevel@tonic-gateclobber         :=      TARGET= clobber
82*7c478bd9Sstevel@tonic-gatejavadoc         :=      TARGET= javadoc
83*7c478bd9Sstevel@tonic-gatelint            :=      TARGET= lint
84*7c478bd9Sstevel@tonic-gateclean.lint      :=      TARGET= clean.lint
85*7c478bd9Sstevel@tonic-gatecheck           :=      TARGET= check
86*7c478bd9Sstevel@tonic-gate_msg            :=      TARGET= _msg
87*7c478bd9Sstevel@tonic-gate
88*7c478bd9Sstevel@tonic-gate.KEEP_STATE:
89*7c478bd9Sstevel@tonic-gate
90*7c478bd9Sstevel@tonic-gateall: $(VISDIR) .WAIT KdcGui.java classdir $(SUBDIRS) all_local
91*7c478bd9Sstevel@tonic-gate
92*7c478bd9Sstevel@tonic-gateall_local: $(TOGETHERC) $(OTHERC) $(KRB5SBIN)/$(GKADMIN) \
93*7c478bd9Sstevel@tonic-gate	$(KRB5GUILIB)/$(JARFILE) $(KRB5GUILIB)/$(VISLIB) \
94*7c478bd9Sstevel@tonic-gate	$(KRB5GUILIB)/$(HTML)
95*7c478bd9Sstevel@tonic-gate
96*7c478bd9Sstevel@tonic-gate$(TOGETHERC): $(TOGETHERJ) $(VISLIB)
97*7c478bd9Sstevel@tonic-gate	$(JAVAC) $(JAVAFLAGS) -d classdir -classpath $(CLASSPATH) $(TOGETHERJ)
98*7c478bd9Sstevel@tonic-gate
99*7c478bd9Sstevel@tonic-gate$(VISLIB):
100*7c478bd9Sstevel@tonic-gate	cd $(VISDIR); $(MAKE) CLASSPATH=$(VISRT_CLASSPATH) install
101*7c478bd9Sstevel@tonic-gate
102*7c478bd9Sstevel@tonic-gate$(GKADMIN): $(GKADMIN).template
103*7c478bd9Sstevel@tonic-gate	cat $? | sed -e 's/version_number/$(SEAM_VERS)/' > $@
104*7c478bd9Sstevel@tonic-gate
105*7c478bd9Sstevel@tonic-gateclassdir: FRC
106*7c478bd9Sstevel@tonic-gate	mkdir -p classdir
107*7c478bd9Sstevel@tonic-gate
108*7c478bd9Sstevel@tonic-gate$(VISDIR): FRC
109*7c478bd9Sstevel@tonic-gate	cd $@; $(MAKE) CLASSPATH=$(VISRT_CLASSPATH) $(TARGET)
110*7c478bd9Sstevel@tonic-gate
111*7c478bd9Sstevel@tonic-gate$(SUBDIRS): FRC
112*7c478bd9Sstevel@tonic-gate	cd $@; $(MAKE) CLASSPATH=$(CLASSPATH) $(TARGET)
113*7c478bd9Sstevel@tonic-gate
114*7c478bd9Sstevel@tonic-gateGuiResource_en_US.java: GuiResource.java
115*7c478bd9Sstevel@tonic-gate	cat $? | sed -e 's/GuiResource/GuiResource_en_US/' > $@
116*7c478bd9Sstevel@tonic-gate
117*7c478bd9Sstevel@tonic-gateHelpData_en_US.java: HelpData.java
118*7c478bd9Sstevel@tonic-gate	cat $? | sed -e 's/HelpData/HelpData_en_US/' > $@
119*7c478bd9Sstevel@tonic-gate
120*7c478bd9Sstevel@tonic-gate$(JARFILE): classdir/*.class
121*7c478bd9Sstevel@tonic-gate	-$(RM) $(JARFILE)
122*7c478bd9Sstevel@tonic-gate	(cd classdir; $(JAR) cf ../$(JARFILE) *.class)
123*7c478bd9Sstevel@tonic-gate
124*7c478bd9Sstevel@tonic-gateKdcGui.java: KdcGuiMain.java KdcGuiOps.java KdcGuiRoot.java
125*7c478bd9Sstevel@tonic-gate
126*7c478bd9Sstevel@tonic-gateinstall: $(VISDIR) .WAIT classdir $(SUBDIRS) install_local
127*7c478bd9Sstevel@tonic-gate
128*7c478bd9Sstevel@tonic-gatelint:	native
129*7c478bd9Sstevel@tonic-gate
130*7c478bd9Sstevel@tonic-gateROOTSBINPROGS=	$(KRB5SBIN)/$(GKADMIN)
131*7c478bd9Sstevel@tonic-gateLIBPROGS=	$(JARFILE) $(VISLIB) $(GIF) $(HTML)
132*7c478bd9Sstevel@tonic-gateROOTLIBPROGS=	$(LIBPROGS:%=$(KRB5LIB)/%)
133*7c478bd9Sstevel@tonic-gate$(ROOTLIBPROGS):=	FILEMODE = 444
134*7c478bd9Sstevel@tonic-gate
135*7c478bd9Sstevel@tonic-gateinstall_local: all_local
136*7c478bd9Sstevel@tonic-gate
137*7c478bd9Sstevel@tonic-gate_msg: $(MSGBUNDLEDIR) $(MSGBUNDLEDIR)/GuiResource.java $(MSGBUNDLEDIR)/HelpData.java
138*7c478bd9Sstevel@tonic-gate
139*7c478bd9Sstevel@tonic-gate$(MSGBUNDLEDIR)/GuiResource.java $(MSGBUNDLEDIR)/HelpData.java:= FILEMODE = 444
140*7c478bd9Sstevel@tonic-gate
141*7c478bd9Sstevel@tonic-gate$(MSGBUNDLEDIR)/%: %
142*7c478bd9Sstevel@tonic-gate	$(INS.file)
143*7c478bd9Sstevel@tonic-gate
144*7c478bd9Sstevel@tonic-gate$(MSGBUNDLEDIR):
145*7c478bd9Sstevel@tonic-gate	$(INS.dir)
146*7c478bd9Sstevel@tonic-gate
147*7c478bd9Sstevel@tonic-gatejavadoc:
148*7c478bd9Sstevel@tonic-gate	$(RM) -rf javadoc
149*7c478bd9Sstevel@tonic-gate	mkdir javadoc
150*7c478bd9Sstevel@tonic-gate	$(JAVADOC) -classpath $(CLASSPATH) -d javadoc *.java \
151*7c478bd9Sstevel@tonic-gate	dataclasses/*.java dchanger/*.java native/*.java util/*.java
152*7c478bd9Sstevel@tonic-gate	cd visualrt ; $(MAKE) CLASSPATH=$(VISRT_CLASSPATH) $@
153*7c478bd9Sstevel@tonic-gate
154*7c478bd9Sstevel@tonic-gatetest: all
155*7c478bd9Sstevel@tonic-gate	/bin/env \
156*7c478bd9Sstevel@tonic-gate	LD_LIBRARY_PATH=/usr/java/lib:/usr/dt/lib:$(SRC)/cmd/kadmin/gui/native \
157*7c478bd9Sstevel@tonic-gate	/usr/bin/java -classpath \
158*7c478bd9Sstevel@tonic-gate	.:classdir:native:$(VISLIB):)$(ROOT)/usr/java/lib/rt.jar \
159*7c478bd9Sstevel@tonic-gate	KdcGuiMain &
160*7c478bd9Sstevel@tonic-gate
161*7c478bd9Sstevel@tonic-gateecho:
162*7c478bd9Sstevel@tonic-gate	@echo $(CLASSES)
163*7c478bd9Sstevel@tonic-gate	@echo $(JFILES)
164*7c478bd9Sstevel@tonic-gate	@echo $(CLFILES)
165*7c478bd9Sstevel@tonic-gate	@echo $(SUFFIXES)
166*7c478bd9Sstevel@tonic-gate
167*7c478bd9Sstevel@tonic-gateclobber: $(VISDIR) $(SUBDIRS) clobber_local
168*7c478bd9Sstevel@tonic-gate	-$(RM) visualrt.jar
169*7c478bd9Sstevel@tonic-gate	-$(RM) -rf javadoc
170*7c478bd9Sstevel@tonic-gate
171*7c478bd9Sstevel@tonic-gateclean: $(VISDIR) $(SUBDIRS) clean_local
172*7c478bd9Sstevel@tonic-gate
173*7c478bd9Sstevel@tonic-gateclobber_local: clean_local
174*7c478bd9Sstevel@tonic-gate
175*7c478bd9Sstevel@tonic-gateclean_local:
176*7c478bd9Sstevel@tonic-gate	$(RM) classdir/*.class $(JARFILE) $(GKADMIN) GuiResource_en_US.java HelpData_en_US.java
177*7c478bd9Sstevel@tonic-gate
178*7c478bd9Sstevel@tonic-gateFRC:
179