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