1 # 2 # Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 # 5 # This code is free software; you can redistribute it and/or modify it 6 # under the terms of the GNU General Public License version 2 only, as 7 # published by the Free Software Foundation. Oracle designates this 8 # particular file as subject to the "Classpath" exception as provided 9 # by Oracle in the LICENSE file that accompanied this code. 10 # 11 # This code is distributed in the hope that it will be useful, but WITHOUT 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 # version 2 for more details (a copy is included in the LICENSE file that 15 # accompanied this code). 16 # 17 # You should have received a copy of the GNU General Public License version 18 # 2 along with this work; if not, write to the Free Software Foundation, 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 # 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 # or visit www.oracle.com if you need additional information or have any 23 # questions. 24 # 25 26 # 27 # Makefile for building sun.rmi.* 28 # 29 30 BUILDDIR = ../../.. 31 PACKAGE = sun.rmi 32 PRODUCT = sun 33 include $(BUILDDIR)/common/Defs.gmk 34 35 # 36 # Java files to compile. 37 # 38 AUTO_FILES_JAVA_DIRS = \ 39 java/rmi \ 40 sun/rmi/log \ 41 sun/rmi/registry \ 42 sun/rmi/runtime \ 43 sun/rmi/server \ 44 sun/rmi/transport \ 45 com/sun/rmi 46 47 # 48 # Rules 49 # 50 include $(BUILDDIR)/common/Rules.gmk 51 52 # 53 # Full package names of implementations requiring stubs 54 # 55 REMOTE_impls = \ 56 sun.rmi.registry.RegistryImpl \ 57 sun.rmi.transport.DGCImpl 58 59 # 60 # The java-rmi.cgi script in bin/ only gets delivered in certain situations 61 # 62 BUILD_TARGETS = stubs 63 ifeq ($(PLATFORM), linux) 64 BUILD_TARGETS += bin 65 endif 66 ifeq ($(PLATFORM), solaris) 67 ifeq ($(ARCH_DATA_MODEL), 32) 68 BUILD_TARGETS += bin 69 endif 70 endif 71 72 build: $(BUILD_TARGETS) 73 74 clean clobber:: bin.clean 75 76 77 # 78 # Compile stubs and skeletons for remote implementations 79 # (use -v1.1 for backward interoperability) 80 # 81 # gnumake 3.78.1 on windows attempts to build the target even 82 # though it exists. Not sure why, but a check for file existence 83 # has been added... 84 # 85 $(CLASSBINDIR)/%_Skel.class $(CLASSBINDIR)/%_Stub.class: $(CLASSBINDIR)/%.class 86 if [ ! -s $@ ] ; \ 87 then $(RMIC) -v1.1 -classpath \ 88 "$(CLASSBINDIR)" \ 89 -d $(CLASSBINDIR) '$(subst /,.,$(<:$(CLASSBINDIR)/%.class=%))' ; \ 90 fi 91 @$(java-vm-cleanup) 92 93 REMOTE_files = $(subst .,/,$(REMOTE_impls)) 94 FILES_stubs = $(REMOTE_files:%=$(CLASSBINDIR)/%_Stub.class) 95 FILES_skels = $(REMOTE_files:%=$(CLASSBINDIR)/%_Skel.class) 96 97 stubs: $(FILES_stubs) $(FILES_skels) 98 99 bin: $(BINDIR)/java-rmi.cgi 100 101 $(BINDIR)/java-rmi.cgi: $(PLATFORM_SRC)/bin/java-rmi.cgi.sh 102 $(install-file) 103 $(call chmod-file, a+x) 104 105 bin.clean: 106 $(RM) $(BINDIR)/java-rmi.cgi 107 108 .PHONY: stubs bin bin.clean 109