Makefile revision 0
0N/A#
0N/A# Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A#
0N/A# This code is free software; you can redistribute it and/or modify it
0N/A# under the terms of the GNU General Public License version 2 only, as
0N/A# published by the Free Software Foundation. Sun designates this
0N/A# particular file as subject to the "Classpath" exception as provided
0N/A# by Sun in the LICENSE file that accompanied this code.
0N/A#
0N/A# This code is distributed in the hope that it will be useful, but WITHOUT
0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A# version 2 for more details (a copy is included in the LICENSE file that
0N/A# accompanied this code).
0N/A#
0N/A# You should have received a copy of the GNU General Public License version
0N/A# 2 along with this work; if not, write to the Free Software Foundation,
0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A#
0N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
0N/A# CA 95054 USA or visit www.sun.com if you need additional information or
0N/A# have any questions.
0N/A#
0N/A
0N/A#
0N/A# Imports files exported by a hotspot build or provided from an external
0N/A# location into the OUTPUTDIR, and also primes the OUTPUTDIR with files
0N/A# that are provided inside this workspace.
0N/A#
0N/A# IMPORT_LIST contains the list of destination files that are copied
0N/A# from external places (outside this workspace).
0N/A#
0N/A# INTERNAL_IMPORT_LIST is the list of destination files from BUILDDIR.
0N/A#
0N/A
0N/ABUILDDIR = ../..
0N/APRODUCT = java
0N/Ainclude $(BUILDDIR)/common/Defs.gmk
0N/A
0N/ASERVER_LOCATION = server
0N/ACLIENT_LOCATION = client
0N/A
0N/ADB_SUFFIX = _db
0N/A
0N/Aifeq ($(PLATFORM), windows)
0N/A LIB_LOCATION = $(BINDIR)
0N/Aelse
0N/A LIB_LOCATION = $(LIBDIR)/$(LIBARCH)
0N/Aendif
0N/A
0N/AJVM_NAME = $(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX)
0N/AJVMLIB_NAME = $(LIB_PREFIX)jvm.$(LIB_SUFFIX)
0N/AJVMMAP_NAME = $(LIB_PREFIX)jvm.map
0N/AJVMPDB_NAME = $(LIB_PREFIX)jvm.pdb
0N/ALIBJSIG_NAME = $(LIB_PREFIX)jsig.$(LIBRARY_SUFFIX)
0N/AJVMDB_NAME = $(LIB_PREFIX)jvm$(DB_SUFFIX).$(LIBRARY_SUFFIX)
0N/A
0N/ACLASSSHARINGDATA_DIR = $(BUILDDIR)/tools/sharing
0N/A
0N/A# Needed to do file copy
0N/AABS_BUILDDIR :=$(call FullPath,$(BUILDDIR))
0N/A
0N/Aall: build
0N/A
0N/A# List of files created here or coming from BUILDDIR area (this workspace)
0N/AINTERNAL_IMPORT_LIST = $(LIBDIR)/classlist
0N/A
0N/A# List of files coming from outside this workspace
0N/AIMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \
0N/A $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt
0N/A
0N/A# INCLUDE_SA is false on platforms where SA is not supported.
0N/A# On platforms where it is supported, we want to allow it to
0N/A# not be present, at least temporarily. So,
0N/A# if the SA files (well, just sa-jdi.jar) do not exist
0N/A# in the HOTSPOT_IMPORT_PATH, then we won't build SA.
0N/ASA_EXISTS := $(shell if [ -r $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar ] ; then \
0N/A $(ECHO) true; \
0N/A else \
0N/A $(ECHO) false; \
0N/A fi)
0N/A
0N/Aifeq ($(SA_EXISTS), false)
0N/A INCLUDE_SA := false
0N/Aendif
0N/A
0N/Aifeq ($(INCLUDE_SA), true)
0N/A IMPORT_LIST += $(LIBDIR)/sa-jdi.jar \
0N/A $(LIB_LOCATION)/$(SALIB_NAME)
0N/A ifeq ($(PLATFORM), windows)
0N/A IMPORT_LIST += $(LIB_LOCATION)/$(SAMAP_NAME) \
0N/A $(LIB_LOCATION)/$(SAPDB_NAME)
0N/A endif
0N/Aendif # INCLUDE_SA
0N/A
0N/A# Hotspot client is only available on 32-bit builds
0N/Aifeq ($(ARCH_DATA_MODEL), 32)
0N/A IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME) \
0N/A $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt
0N/Aendif
0N/A
0N/Aifeq ($(PLATFORM), windows)
0N/A# Windows vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Windows
0N/A
0N/AIMPORT_LIST += $(MS_RUNTIME_LIBRARIES:%=$(BINDIR)/%)
0N/A
0N/A# NOTE: These might actually come from BUILDDIR, depends on the settings.
0N/A$(BINDIR)/msvcrt.dll: $(MSVCRT_DLL_PATH)/msvcrt.dll
0N/A $(install-import-file)
0N/A $(CHMOD) a+x $@
0N/A$(BINDIR)/msvcr71.dll: $(MSVCR71_DLL_PATH)/msvcr71.dll
0N/A $(install-import-file)
0N/A $(CHMOD) a+x $@
0N/A
0N/A# Get the hotspot .map and .pdb files for client and server
0N/AIMPORT_LIST += \
0N/A $(LIBDIR)/$(JVMLIB_NAME) \
0N/A $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME) \
0N/A $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME)
0N/A
0N/A# Hotspot client is only available on 32-bit builds
0N/Aifeq ($(ARCH_DATA_MODEL), 32)
0N/A IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME) \
0N/A $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME)
0N/Aendif
0N/A
0N/A$(LIBDIR)/$(JVMLIB_NAME): $(HOTSPOT_LIB_PATH)/$(JVMLIB_NAME)
0N/A $(install-import-file)
0N/A
0N/A# it is OK for the .map and .pdb files to not exist, so do not force a
0N/A# dependency on them from the bootstrap location, and allow the copy to fail.
0N/A$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME):
0N/A @$(prep-target)
0N/A -$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMMAP_NAME) $@
0N/A
0N/A$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME):
0N/A @$(prep-target)
0N/A -$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMMAP_NAME) $@
0N/A
0N/A$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME):
0N/A @$(prep-target)
0N/A -$(CP) $(HOTSPOT_CLIENT_PATH)/$(JVMPDB_NAME) $@
0N/A
0N/A$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME):
0N/A @$(prep-target)
0N/A -$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMPDB_NAME) $@
0N/A
0N/A# Windows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Windows
0N/Aelse # PLATFORM
0N/A# NOT Windows vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv NOT Windows
0N/A
0N/AIMPORT_LIST += \
0N/A $(LIB_LOCATION)/$(LIBJSIG_NAME) \
0N/A $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME)
0N/A
0N/Aifeq ($(PLATFORM), solaris)
0N/A IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME)
0N/Aendif
0N/A
0N/Aifeq ($(ARCH_DATA_MODEL), 32)
0N/A
0N/AIMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME)
0N/A
0N/Aifeq ($(PLATFORM), solaris)
0N/A# solaris vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv solaris
0N/A
0N/Aifeq ($(ARCH), sparc)
0N/A IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME)
0N/Aendif
0N/A
0N/AIMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME)
0N/A
0N/Aifeq ($(ARCH), sparc)
0N/A IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME)
0N/Aendif
0N/A
0N/A# For backwards compatability, make a link of the 32-bit client JVM to $(LIBDIR)
0N/AIMPORT_LIST += $(LIB_LOCATION)/$(JVM_NAME)
0N/A
0N/A# create a link from lib/libjvm.so to client/libjvm.so
0N/A$(LIB_LOCATION)/$(JVM_NAME): $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME)
0N/A @$(prep-target)
0N/A $(LN) -s $(CLIENT_LOCATION)/$(JVM_NAME) $@
0N/A
0N/A# solaris ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ solaris
0N/Aendif # 32bit solaris
0N/A
0N/Aendif # 32bit
0N/A
0N/A# NOT Windows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ NOT Windows
0N/A
0N/Aendif # PLATFORM
0N/A
0N/A$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_NAME)
0N/A $(install-import-file)
0N/A
0N/A$(LIB_LOCATION)/$(LIBJSIG_NAME): $(HOTSPOT_SERVER_PATH)/$(LIBJSIG_NAME)
0N/A $(install-import-file)
0N/A
0N/A$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) \
0N/A$(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME):
0N/A @$(prep-target)
0N/A $(LN) -s ../$(LIBJSIG_NAME) $@
0N/A
0N/A$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME)
0N/A $(install-import-file)
0N/A
0N/A$(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/64/$(JVMDB_NAME)
0N/A $(install-import-file)
0N/A
0N/A$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME)
0N/A $(install-import-file)
0N/A
0N/A$(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)
0N/A $(install-import-file)
0N/A
0N/A$(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_NAME)
0N/A $(install-import-file)
0N/A
0N/A$(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt : $(HOTSPOT_SERVER_PATH)/Xusage.txt
0N/A $(install-import-file)
0N/A
0N/A$(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt : $(HOTSPOT_CLIENT_PATH)/Xusage.txt
0N/A $(install-import-file)
0N/A
0N/Aifeq ($(INCLUDE_SA), true)
0N/A# The Serviceability Agent is built in the Hotspot workspace.
0N/A# It contains two files:
0N/A# - sa-jdi.jar: This goes into the same dir as tools.jar.
0N/A# - a shared library: sawindbg.dll on windows / libproc.sa on unix
0N/A# This goes into the same dir as the other
0N/A# shared libs, eg. libjdwp.so.
0N/A$(LIBDIR)/sa-jdi.jar: $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar
0N/A $(install-import-file)
0N/A
0N/A$(LIB_LOCATION)/$(SALIB_NAME): $(HOTSPOT_SALIB_PATH)/$(SALIB_NAME)
0N/A $(install-import-file)
0N/A
0N/Aifeq ($(PLATFORM), windows)
0N/A$(LIB_LOCATION)/$(SAPDB_NAME): $(HOTSPOT_SALIB_PATH)/$(SAPDB_NAME)
0N/A $(install-import-file)
0N/A
0N/A$(LIB_LOCATION)/$(SAMAP_NAME): $(HOTSPOT_SALIB_PATH)/$(SAMAP_NAME)
0N/A $(install-import-file)
0N/Aendif # windows
0N/Aendif # INCLUDE_SA
0N/A
0N/A#
0N/A# Specific to OpenJDK building
0N/A#
0N/Aifdef OPENJDK
0N/A
0N/Ainclude $(BUILDDIR)/common/internal/BinaryPlugs.gmk
0N/A
0N/Abuild: import-binary-plugs
0N/A
0N/Aelse # !OPENJDK
0N/A
0N/AINTERNAL_IMPORT_LIST += \
0N/A $(LIBDIR)/security/US_export_policy.jar \
0N/A $(LIBDIR)/security/local_policy.jar \
0N/A $(LIBDIR)/jce.jar
0N/A
0N/A$(LIBDIR)/jce.jar: \
0N/A $(BUILDDIR)/closed/tools/crypto/jce/jce.jar
0N/A $(install-file)
0N/A$(LIBDIR)/security/US_export_policy.jar: \
0N/A $(BUILDDIR)/closed/tools/crypto/jce/US_export_policy.jar
0N/A $(install-file)
0N/A$(LIBDIR)/security/local_policy.jar: \
0N/A $(BUILDDIR)/closed/tools/crypto/jce/local_policy.jar
0N/A $(install-file)
0N/A
0N/Aendif # OPENJDK
0N/A
0N/AADDJSUM_JARFILE = $(BUILDTOOLJARDIR)/addjsum.jar
0N/A
0N/A# Construct classlist file
0N/A$(LIBDIR)/classlist: \
0N/A $(CLASSSHARINGDATA_DIR)/classlist.$(PLATFORM) \
0N/A $(ADDJSUM_JARFILE)
0N/A @$(prep-target)
0N/A @$(RM) -f $@.temp
0N/A $(BOOT_JAVA_CMD) -jar $(ADDJSUM_JARFILE) \
0N/A $(CLASSSHARINGDATA_DIR)/classlist.$(PLATFORM) $@.temp
0N/A $(MV) $@.temp $@
0N/A
0N/Aifndef OPENJDK
0N/A
0N/A# Lucida font files are not included in the OpenJDK distribution.
0N/A# Get names of font files
0N/Ainclude FILES.gmk
0N/A
0N/A# Copy font files into OUTPUTDIR area
0N/A
0N/AFONTFILES = $(SHARED_FONTFILES)
0N/AFONTSDIR = $(LIBDIR)/fonts
0N/AFONTSDIRFILE = $(FONTSDIR)/fonts.dir
0N/AINTERNAL_IMPORT_LIST += $(FONTFILES)
0N/A
0N/Aifneq ($(PLATFORM), windows)
0N/A INTERNAL_IMPORT_LIST += $(FONTSDIRFILE)
0N/Aendif
0N/A
0N/A$(LIBDIR)/fonts/%.ttf: $(CLOSED_SRC)/share/lib/fonts/%.ttf
0N/A $(install-file)
0N/A
0N/A$(FONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir
0N/A $(install-file)
0N/A
0N/Aifeq ($(PLATFORM), linux)
0N/A
0N/A# The oblique fonts are only needed/wanted on Linux.
0N/A
0N/AOBLFONTSDIR = $(LIBDIR)/oblique-fonts
0N/AOBLFONTSDIRFILE = $(OBLFONTSDIR)/fonts.dir
0N/AINTERNAL_IMPORT_LIST += $(OBLIQUE_FONTFILES) $(OBLFONTSDIRFILE)
0N/A
0N/A$(LIBDIR)/oblique-fonts/%.ttf: $(CLOSED_SRC)/share/lib/fonts/oblique/%.ttf
0N/A $(install-file)
0N/A
0N/A$(OBLFONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.oblique-fonts.dir
0N/A $(install-file)
0N/A
0N/Aendif # linux
0N/Aendif # !OPENJDK
0N/A
0N/A# Import internal files (ones that are stashed in this source tree)
0N/Aimport_internal_files : $(INTERNAL_IMPORT_LIST)
0N/A
0N/A# Import files from the JDK that we are not building
0N/Aimport_files: $(IMPORT_LIST)
0N/A
0N/A# Get component information variables and rules
0N/Ainclude $(BUILDDIR)/common/internal/ImportComponents.gmk
0N/A
0N/A# Security files we need to import
0N/ASEC_FILES_ZIP=$(ABS_BUILDDIR)/tools/crypto/sec-bin.zip
0N/ASEC_FILES_WIN_ZIP=$(ABS_BUILDDIR)/tools/crypto/sec-windows-bin.zip
0N/AJGSS_WIN32_FILES_ZIP=$(ABS_BUILDDIR)/tools/crypto/jgss-windows-i586-bin.zip
0N/AJGSS_WIN64_FILES_ZIP=$(ABS_BUILDDIR)/tools/crypto/jgss-windows-x64-bin.zip
0N/A
0N/A# Unzip zip file $2 into directory $1 (if $2 exists)
0N/A# Warning: $2 must be absolute path not relative
0N/Adefine SecUnzipper
0N/Aif [ -f $2 ] ; then \
0N/A $(MKDIR) -p $1; \
0N/A $(ECHO) "( $(CD) $1 && $(UNZIP) -o $2 )"; \
0N/A ( $(CD) $1 && $(UNZIP) -o $2 ); \
0N/Afi
0N/Aendef
0N/A
0N/A# If sec-bin exists, unpack it into the build directory
0N/A# Also, the library recompile build indirectly depends on two SSL classes,
0N/A# so copy those as well FIXUP
0N/A# if sec-windows-bin exists, unpack it into the build directory
0N/A# if JGSS files exists, unpack it into the build directory
0N/A$(TEMPDIR)/security_imported:
0N/A @$(prep-target)
0N/A @$(call SecUnzipper,$(OUTPUTDIR),$(SEC_FILES_ZIP))
0N/Aifeq ($(PLATFORM), windows)
0N/A @$(call SecUnzipper,$(OUTPUTDIR),$(SEC_FILES_WIN_ZIP))
0N/Aendif
0N/Aifeq ($(PLATFORM), windows)
0N/A ifeq ($(ARCH_DATA_MODEL), 32)
0N/A @$(call SecUnzipper,$(OUTPUTDIR),$(JGSS_WIN32_FILES_ZIP))
0N/A else
0N/A @$(call SecUnzipper,$(OUTPUTDIR),$(JGSS_WIN64_FILES_ZIP))
0N/A endif
0N/Aendif
0N/A @$(ECHO) "Imported on `$(DATE)`" > $@
0N/A
0N/A# Import all files from other components
0N/A$(TEMPDIR)/components_imported:
0N/A @$(prep-target)
0N/A $(call import-component-binaries,$(ABS_OUTPUTDIR))
0N/A $(call import-component-sources,$(IMPORTSRCDIR))
0N/A $(call import-component-docs,$(IMPORTDOCDIR))
0N/A $(call import-component-classes,$(CLASSDESTDIR))
0N/A @$(ECHO) "Imported on `$(DATE)`" > $@
0N/A
0N/A# Do pretty much everything
0N/Abuild : import_files \
0N/A import_internal_files \
0N/A $(TEMPDIR)/components_imported \
0N/A $(TEMPDIR)/security_imported
0N/A
0N/A# Clean up what we imported (except for component files)
0N/Aclean clobber::
0N/A $(RM) $(IMPORT_LIST)
0N/A $(RM) $(INTERNAL_IMPORT_LIST)
0N/A $(call import-component-sources-clean,$(IMPORTSRCDIR))
0N/A $(call import-component-docs-clean,$(IMPORTDOCDIR))
0N/A $(call import-component-classes-clean,$(CLASSDESTDIR))
0N/A $(RM) $(TEMPDIR)/components_imported
0N/A $(RM) $(TEMPDIR)/security_imported
0N/A
0N/A.PHONY: import_files import_internal_files
0N/A