xref: /titanic_44/usr/src/cmd/krb5/kadmin/gui/Makefile (revision 40e5e17b3361b3eea56a9723071c406894a20b78)
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
29include $(SRC)/Makefile.master
30include $(SRC)/cmd/Makefile.cmd
31
32JAVAFLAGS= -nowarn -O
33GUIDIR=$(SRC)/cmd/krb5/kadmin/gui
34
35TOGETHER= KdcGui KdcGuiMain KdcGuiOps KdcGuiRoot
36TOGETHERJ=$(TOGETHER:%=%.java)
37TOGETHERC=$(TOGETHER:%=classdir/%.class)
38
39OTHER=GuiResource GuiResource_en_US HelpData HelpData_en_US
40OTHERJ=$(OTHER:%=%.java)
41OTHERC=$(OTHER:%=classdir/%.class)
42
43CLASSES=$(TOGETHER) $(OTHER)
44JFILES=$(CLASSES:%=%.java)
45CLFILES=$(CLASSES:%=%.class)
46
47GKADMIN=gkadmin
48JARFILE=gkadmin.jar
49VISLIB=visualrt.jar
50HTML=HelpIndex.html
51MSGBUNDLEDIR=$(ROOT)/usr/lib/krb5/ListResourceBundle
52
53NONEXFILEMODE=444
54
55#
56# Set $KRB5GUILIB
57#
58KRB5GUILIB=	$(ROOT)/usr/lib/krb5
59
60$(KRB5GUILIB)/$(JARFILE)	:=	FILEMODE= 444
61$(KRB5GUILIB)/$(VISLIB)		:=	FILEMODE= 444
62$(KRB5GUILIB)/$(HTML)		:=	FILEMODE= 444
63
64$(KRB5GUILIB)/%:	%
65		$(INS.file)
66
67.SUFFIXES: .java .class $(SUFFIXES)
68
69CLASSPATH=$(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
70
71VISRT_CLASSPATH=$(GUIDIR)/visualrt:$(JAVA_ROOT)/jre/lib/rt.jar:$(JAVA_ROOT)/jre/lib/i18n.jar
72
73classdir/%.class: %.java
74	$(JAVAC) $(JAVAFLAGS) -d classdir -classpath $(CLASSPATH) $<
75
76SUBDIRS= util dataclasses dchanger native
77VISDIR= visualrt
78
79def             :=      TARGET= def
80all             :=      TARGET= all
81install         :=      TARGET= install
82install_h       :=      TARGET= install_h
83clean           :=      TARGET= clean
84clobber         :=      TARGET= clobber
85javadoc         :=      TARGET= javadoc
86lint            :=      TARGET= lint
87clean.lint      :=      TARGET= clean.lint
88check           :=      TARGET= check
89_msg            :=      TARGET= _msg
90
91.KEEP_STATE:
92
93all: $(VISDIR) .WAIT KdcGui.java classdir $(SUBDIRS) all_local
94
95all_local: $(TOGETHERC) $(OTHERC) $(KRB5SBIN)/$(GKADMIN) \
96	$(KRB5GUILIB)/$(JARFILE) $(KRB5GUILIB)/$(VISLIB) \
97	$(KRB5GUILIB)/$(HTML)
98
99$(TOGETHERC): $(TOGETHERJ) $(VISLIB)
100	$(JAVAC) $(JAVAFLAGS) -d classdir -classpath $(CLASSPATH) $(TOGETHERJ)
101
102$(VISLIB):
103	cd $(VISDIR); $(MAKE) CLASSPATH=$(VISRT_CLASSPATH) install
104
105$(GKADMIN): $(GKADMIN).template
106	cat $? | sed -e 's/version_number/$(SEAM_VERS)/' > $@
107
108classdir: FRC
109	mkdir -p classdir
110
111$(VISDIR): FRC
112	cd $@; $(MAKE) CLASSPATH=$(VISRT_CLASSPATH) $(TARGET)
113
114$(SUBDIRS): FRC
115	cd $@; $(MAKE) CLASSPATH=$(CLASSPATH) $(TARGET)
116
117GuiResource_en_US.java: GuiResource.java
118	cat $? | sed -e 's/GuiResource/GuiResource_en_US/' > $@
119
120HelpData_en_US.java: HelpData.java
121	cat $? | sed -e 's/HelpData/HelpData_en_US/' > $@
122
123$(JARFILE): classdir/*.class
124	-$(RM) $(JARFILE)
125	(cd classdir; $(JAR) cf ../$(JARFILE) *.class)
126
127KdcGui.java: KdcGuiMain.java KdcGuiOps.java KdcGuiRoot.java
128
129install: $(VISDIR) .WAIT classdir $(SUBDIRS) install_local
130
131lint:	native
132
133ROOTSBINPROGS=	$(KRB5SBIN)/$(GKADMIN)
134LIBPROGS=	$(JARFILE) $(VISLIB) $(GIF) $(HTML)
135ROOTLIBPROGS=	$(LIBPROGS:%=$(KRB5LIB)/%)
136$(ROOTLIBPROGS):=	FILEMODE = 444
137
138install_local: all_local
139
140_msg: $(MSGBUNDLEDIR) $(MSGBUNDLEDIR)/GuiResource.java $(MSGBUNDLEDIR)/HelpData.java
141
142$(MSGBUNDLEDIR)/GuiResource.java $(MSGBUNDLEDIR)/HelpData.java:= FILEMODE = 444
143
144$(MSGBUNDLEDIR)/%: %
145	$(INS.file)
146
147$(MSGBUNDLEDIR):
148	$(INS.dir)
149
150javadoc:
151	$(RM) -rf javadoc
152	mkdir javadoc
153	$(JAVADOC) -classpath $(CLASSPATH) -d javadoc *.java \
154	dataclasses/*.java dchanger/*.java native/*.java util/*.java
155	cd visualrt ; $(MAKE) CLASSPATH=$(VISRT_CLASSPATH) $@
156
157test: all
158	/bin/env \
159	LD_LIBRARY_PATH=/usr/java/lib:/usr/dt/lib:$(SRC)/cmd/kadmin/gui/native \
160	/usr/bin/java -classpath \
161	.:classdir:native:$(VISLIB):)$(ROOT)/usr/java/lib/rt.jar \
162	KdcGuiMain &
163
164echo:
165	@echo $(CLASSES)
166	@echo $(JFILES)
167	@echo $(CLFILES)
168	@echo $(SUFFIXES)
169
170clobber: $(VISDIR) $(SUBDIRS) clobber_local
171	-$(RM) visualrt.jar
172	-$(RM) -rf javadoc
173
174clean: $(VISDIR) $(SUBDIRS) clean_local
175
176clobber_local: clean_local
177
178clean_local:
179	$(RM) classdir/*.class $(JARFILE) $(GKADMIN) GuiResource_en_US.java HelpData_en_US.java
180
181FRC:
182