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 29 include $(SRC)/Makefile.master 30 include $(SRC)/cmd/Makefile.cmd 31 32 JAVAFLAGS= -nowarn -O 33 GUIDIR=$(SRC)/cmd/krb5/kadmin/gui 34 35 TOGETHER= KdcGui KdcGuiMain KdcGuiOps KdcGuiRoot 36 TOGETHERJ=$(TOGETHER:%=%.java) 37 TOGETHERC=$(TOGETHER:%=classdir/%.class) 38 39 OTHER=GuiResource GuiResource_en_US HelpData HelpData_en_US 40 OTHERJ=$(OTHER:%=%.java) 41 OTHERC=$(OTHER:%=classdir/%.class) 42 43 CLASSES=$(TOGETHER) $(OTHER) 44 JFILES=$(CLASSES:%=%.java) 45 CLFILES=$(CLASSES:%=%.class) 46 47 GKADMIN=gkadmin 48 JARFILE=gkadmin.jar 49 VISLIB=visualrt.jar 50 HTML=HelpIndex.html 51 MSGBUNDLEDIR=$(ROOT)/usr/lib/krb5/ListResourceBundle 52 53 NONEXFILEMODE=444 54 55 # 56 # Set $KRB5GUILIB 57 # 58 KRB5GUILIB= $(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 69 CLASSPATH=$(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 71 VISRT_CLASSPATH=$(GUIDIR)/visualrt:$(JAVA_ROOT)/jre/lib/rt.jar:$(JAVA_ROOT)/jre/lib/i18n.jar 72 73 classdir/%.class: %.java 74 $(JAVAC) $(JAVAFLAGS) -d classdir -classpath $(CLASSPATH) $< 75 76 SUBDIRS= util dataclasses dchanger native 77 VISDIR= visualrt 78 79 def := TARGET= def 80 all := TARGET= all 81 install := TARGET= install 82 install_h := TARGET= install_h 83 clean := TARGET= clean 84 clobber := TARGET= clobber 85 javadoc := TARGET= javadoc 86 lint := TARGET= lint 87 clean.lint := TARGET= clean.lint 88 check := TARGET= check 89 _msg := TARGET= _msg 90 91 .KEEP_STATE: 92 93 all: $(VISDIR) .WAIT KdcGui.java classdir $(SUBDIRS) all_local 94 95 all_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 108 classdir: 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 117 GuiResource_en_US.java: GuiResource.java 118 cat $? | sed -e 's/GuiResource/GuiResource_en_US/' > $@ 119 120 HelpData_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 127 KdcGui.java: KdcGuiMain.java KdcGuiOps.java KdcGuiRoot.java 128 129 install: $(VISDIR) .WAIT classdir $(SUBDIRS) install_local 130 131 lint: native 132 133 ROOTSBINPROGS= $(KRB5SBIN)/$(GKADMIN) 134 LIBPROGS= $(JARFILE) $(VISLIB) $(GIF) $(HTML) 135 ROOTLIBPROGS= $(LIBPROGS:%=$(KRB5LIB)/%) 136 $(ROOTLIBPROGS):= FILEMODE = 444 137 138 install_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 150 javadoc: 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 157 test: 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 164 echo: 165 @echo $(CLASSES) 166 @echo $(JFILES) 167 @echo $(CLFILES) 168 @echo $(SUFFIXES) 169 170 clobber: $(VISDIR) $(SUBDIRS) clobber_local 171 -$(RM) visualrt.jar 172 -$(RM) -rf javadoc 173 174 clean: $(VISDIR) $(SUBDIRS) clean_local 175 176 clobber_local: clean_local 177 178 clean_local: 179 $(RM) classdir/*.class $(JARFILE) $(GKADMIN) GuiResource_en_US.java HelpData_en_US.java 180 181 FRC: