Makefile revision 91
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# This code is free software; you can redistribute it and/or modify it
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# under the terms of the GNU General Public License version 2 only, as
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# published by the Free Software Foundation.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# This code is distributed in the hope that it will be useful, but WITHOUT
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# version 2 for more details (a copy is included in the LICENSE file that
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# accompanied this code).
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# You should have received a copy of the GNU General Public License version
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# 2 along with this work; if not, write to the Free Software Foundation,
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# CA 95054 USA or visit www.sun.com if you need additional information or
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# have any questions.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# This makefile creates a build tree and lights off a build.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# You can go back into the build tree and perform rebuilds or
8acc3b8d68311e12c0f81bcc17899439f5c0132eFridrich# incremental builds as desired. Be sure to reestablish
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# environment variable settings for LD_LIBRARY_PATH and JAVA_HOME.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# The make process now relies on java and javac. These can be
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# specified either implicitly on the PATH, by setting the
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# (JDK-inherited) ALT_BOOTDIR environment variable to full path to a
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# JDK in which bin/java and bin/javac are present and working (e.g.,
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# /usr/local/java/jdk1.3/solaris), or via the (JDK-inherited)
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# default BOOTDIR path value. Note that one of ALT_BOOTDIR
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# or BOOTDIR has to be set. We do *not* search javac, javah, rmic etc.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# from the PATH.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# One can set ALT_BOOTDIR or BOOTDIR to point to a jdk that runs on
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# an architecture that differs from the target architecture, as long
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# as the bootstrap jdk runs under the same flavor of OS as the target
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# (i.e., if the target is linux, point to a jdk that runs on a linux
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# box). In order to use such a bootstrap jdk, set the make variable
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# REMOTE to the desired remote command mechanism, e.g.,
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# make REMOTE="rsh -l me myotherlinuxbox"
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# Along with VM, Serviceability Agent (SA) is built for SA/JDI binding.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# JDI binding on SA produces two binaries:
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# 1. sa-jdi.jar - This is build before building libjvm[_g].so
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# Please refer to ./makefiles/sa.make
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# 2. libsa[_g].so - Native library for SA - This is built after
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# libjsig[_g].so (signal interposition library)
87d2ee3b16068e03b26a409994b73605fde664a6Matthew Petroff# Please refer to ./makefiles/vm.make
87d2ee3b16068e03b26a409994b73605fde664a6Matthew Petroff# If $(GAMMADIR)/agent dir is not present, SA components are not built.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv $(OSNAME) $(ARCH) "*** ERROR: this platform does not support 64-bit compilers!")
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# we need to set up LP64 correctly to satisfy sanity checks in adlc
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# pass USE_SUNCC further, through MFLAGS
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# The following renders pathnames in generated Makefiles valid on
8acc3b8d68311e12c0f81bcc17899439f5c0132eFridrich# machines other than the machine containing the build tree.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# For example, let's say my build tree lives on /files12 on
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# exact.east.sun.com. This logic will cause GAMMADIR to begin with
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# We only do this on SunOS variants, for a couple of reasons:
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# * It is extremely rare that source trees exist on other systems
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# * It has been claimed that the Linux automounter is flakey, so
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# changing GAMMADIR in a way that exercises the automounter could
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# prove to be a source of unreliability in the build process.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# Obviously, this Makefile is only relevant on SunOS boxes to begin
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# with, but the SunOS conditionalization will make it easier to
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# combine Makefiles in the future (assuming we ever do that).
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv # prepend current directory to relative pathnames.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv # If NEW_GAMMADIR doesn't already start with "/net/":
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv # prepend /net/$(HOST)
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv # remove /net/$(HOST) if name already began with /home/
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv # remove /net/$(HOST) if name already began with /java/
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv # remove /net/$(HOST) if name already began with /lab/
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv # Don't use the new value for GAMMADIR unless a file with the new
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv # name actually exists.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# There is a (semi-) regular correspondence between make targets and actions:
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# Target Tree Type Build Dir
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# debug compiler2 <os>_<arch>_compiler2/debug
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# fastdebug compiler2 <os>_<arch>_compiler2/fastdebug
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# jvmg compiler2 <os>_<arch>_compiler2/jvmg
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# optimized compiler2 <os>_<arch>_compiler2/optimized
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# profiled compiler2 <os>_<arch>_compiler2/profiled
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# product compiler2 <os>_<arch>_compiler2/product
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# debug1 compiler1 <os>_<arch>_compiler1/debug
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# fastdebug1 compiler1 <os>_<arch>_compiler1/fastdebug
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# jvmg1 compiler1 <os>_<arch>_compiler1/jvmg
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# optimized1 compiler1 <os>_<arch>_compiler1/optimized
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# profiled1 compiler1 <os>_<arch>_compiler1/profiled
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# product1 compiler1 <os>_<arch>_compiler1/product
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# debugcore core <os>_<arch>_core/debug
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# fastdebugcore core <os>_<arch>_core/fastdebug
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# jvmgcore core <os>_<arch>_core/jvmg
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# optimizedcore core <os>_<arch>_core/optimized
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# profiledcore core <os>_<arch>_core/profiled
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# productcore core <os>_<arch>_core/product
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# What you get with each target:
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# debug* - "thin" libjvm_g - debug info linked into the gamma_g launcher
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# fastdebug* - optimized compile, but with asserts enabled
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# jvmg* - "fat" libjvm_g - debug info linked into libjvm_g.so
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# optimized* - optimized compile, no asserts
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# profiled* - gprof
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# product* - the shippable thing: optimized compile, no asserts, -DPRODUCT
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# This target list needs to be coordinated with the usage message
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# in the build.sh script:
12ec9bd04834f24a616641bbb20cf2b4f494740b~suvTARGETS = debug jvmg fastdebug optimized profiled product
12ec9bd04834f24a616641bbb20cf2b4f494740b~suvSUBDIRS_C1 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler1/,$(TARGETS))
12ec9bd04834f24a616641bbb20cf2b4f494740b~suvSUBDIRS_C2 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS))
12ec9bd04834f24a616641bbb20cf2b4f494740b~suvSUBDIRS_TIERED = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS))
12ec9bd04834f24a616641bbb20cf2b4f494740b~suvSUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS))
12ec9bd04834f24a616641bbb20cf2b4f494740b~suvBUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
12ec9bd04834f24a616641bbb20cf2b4f494740b~suvBUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
12ec9bd04834f24a616641bbb20cf2b4f494740b~suvBUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
12ec9bd04834f24a616641bbb20cf2b4f494740b~suvBUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)
fe4af8d9d8bebd5279b3f8b07b200cc2314b5908~suv#-------------------------------------------------------------------------------
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# Could make everything by default, but that would take a while.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv @echo "Try '$(MAKE) <target> ...' where <target> is one or more of"
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# We do not want people accidentally building on old systems (e.g. Linux 2.2.x,
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# Solaris 2.5.1, 2.6).
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# Disable this check by setting DISABLE_HOTSPOT_OS_VERSION_CHECK=ok.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suvEMPTY_IF_NOT_SUPPORTED = $(filter $(SUPPORTED_OS_VERSION),$(OS_VERSION))
12ec9bd04834f24a616641bbb20cf2b4f494740b~suvifeq ($(DISABLE_HOTSPOT_OS_VERSION_CHECK)$(EMPTY_IF_NOT_SUPPORTED),)
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv $(QUIETLY) >&2 echo "*** This OS is not supported:" `uname -a`; exit 1;
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# jvmti.make requires XSLT (J2SE 1.4.x or newer):
12ec9bd04834f24a616641bbb20cf2b4f494740b~suvXSLT_CHECK = $(REMOTE) $(RUN.JAVAP) javax.xml.transform.TransformerFactory
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# If not found then fail fast.
8acc3b8d68311e12c0f81bcc17899439f5c0132eFridrich echo "*** An XSLT processor (J2SE 1.4.x or newer) is required" \
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS)
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) install
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS)
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && ./test_gamma
bcc1460075bacc93179de32bbc59afd79f8ec389Johan B. C. Engelen cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) install
87d2ee3b16068e03b26a409994b73605fde664a6Matthew Petroff cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS)
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && ./test_gamma
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) install
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS)
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# Just build the tree, and nothing else:
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# Doc target. This is the same for all build options.
12ec9bd04834f24a616641bbb20cf2b4f494740b~suv# Hence create a docs directory beside ...$(ARCH)_[...]
924bec44f0e1a067e418ff8dd906b1f5011f1e9c~suv $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) jvmtidocs
924bec44f0e1a067e418ff8dd906b1f5011f1e9c~suv# Synonyms for win32-like targets.
924bec44f0e1a067e418ff8dd906b1f5011f1e9c~suvclean: clean_compiler2 clean_compiler1 clean_core clean_docs
924bec44f0e1a067e418ff8dd906b1f5011f1e9c~suvinclude $(GAMMADIR)/make/$(OSNAME)/makefiles/cscope.make
924bec44f0e1a067e418ff8dd906b1f5011f1e9c~suv#-------------------------------------------------------------------------------