Makefile revision 1838
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updater# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c6fb85f9500350e5ce58c9a24f5d264c8a8bd6f4Automatic Updater# This code is free software; you can redistribute it and/or modify it
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# under the terms of the GNU General Public License version 2 only, as
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# published by the Free Software Foundation.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# This code is distributed in the hope that it will be useful, but WITHOUT
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updater# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# version 2 for more details (a copy is included in the LICENSE file that
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# accompanied this code).
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# You should have received a copy of the GNU General Public License version
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# 2 along with this work; if not, write to the Free Software Foundation,
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox User# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# or visit www.oracle.com if you need additional information or have any
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# This makefile creates a build tree and lights off a build.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater# You can go back into the build tree and perform rebuilds or
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# incremental builds as desired. Be sure to reestablish
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# environment variable settings for LD_LIBRARY_PATH and JAVA_HOME.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# The make process now relies on java and javac. These can be
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# specified either implicitly on the PATH, by setting the
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# (JDK-inherited) ALT_BOOTDIR environment variable to full path to a
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# JDK in which bin/java and bin/javac are present and working (e.g.,
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# /usr/local/java/jdk1.3/solaris), or via the (JDK-inherited)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# default BOOTDIR path value. Note that one of ALT_BOOTDIR
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater# or BOOTDIR has to be set. We do *not* search javac, javah, rmic etc.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# from the PATH.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Along with VM, Serviceability Agent (SA) is built for SA/JDI binding.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# JDI binding on SA produces two binaries:
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# 1. sa-jdi.jar - This is build before building libjvm[_g].so
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Please refer to ./makefiles/sa.make
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# 2. libsaproc[_g].so - Native library for SA - This is built after
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# libjsig[_g].so (signal interposition library)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Please refer to ./makefiles/vm.make
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# If $(GAMMADIR)/agent dir is not present, SA components are not built.
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox Userinclude $(GAMMADIR)/make/$(OSNAME)/makefiles/rules.make
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt $(OSNAME) $(ARCH) "*** ERROR: this platform does not support 64-bit compilers!")
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# The following renders pathnames in generated Makefiles valid on
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# machines other than the machine containing the build tree.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# For example, let's say my build tree lives on /files12 on
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# exact.east.sun.com. This logic will cause GAMMADIR to begin with
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# We only do this on SunOS variants, for a couple of reasons:
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# * It is extremely rare that source trees exist on other systems
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# * It has been claimed that the Linux automounter is flakey, so
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# changing GAMMADIR in a way that exercises the automounter could
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater# prove to be a source of unreliability in the build process.
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User# Obviously, this Makefile is only relevant on SunOS boxes to begin
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User# with, but the SunOS conditionalization will make it easier to
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User# combine Makefiles in the future (assuming we ever do that).
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User # prepend current directory to relative pathnames.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt # If NEW_GAMMADIR doesn't already start with "/net/":
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt # prepend /net/$(HOST)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt # remove /net/$(HOST) if name already began with /home/
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt # remove /net/$(HOST) if name already began with /java/
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt # remove /net/$(HOST) if name already began with /lab/
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt # Don't use the new value for GAMMADIR unless a file with the new
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User # name actually exists.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# There is a (semi-) regular correspondence between make targets and actions:
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Target Tree Type Build Dir
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# debug compiler2 <os>_<arch>_compiler2/debug
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# fastdebug compiler2 <os>_<arch>_compiler2/fastdebug
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# jvmg compiler2 <os>_<arch>_compiler2/jvmg
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# optimized compiler2 <os>_<arch>_compiler2/optimized
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# profiled compiler2 <os>_<arch>_compiler2/profiled
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# product compiler2 <os>_<arch>_compiler2/product
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# debug1 compiler1 <os>_<arch>_compiler1/debug
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# fastdebug1 compiler1 <os>_<arch>_compiler1/fastdebug
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# jvmg1 compiler1 <os>_<arch>_compiler1/jvmg
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# optimized1 compiler1 <os>_<arch>_compiler1/optimized
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# profiled1 compiler1 <os>_<arch>_compiler1/profiled
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# product1 compiler1 <os>_<arch>_compiler1/product
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# debugcore core <os>_<arch>_core/debug
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# fastdebugcore core <os>_<arch>_core/fastdebug
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# jvmgcore core <os>_<arch>_core/jvmg
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# optimizedcore core <os>_<arch>_core/optimized
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# profiledcore core <os>_<arch>_core/profiled
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# productcore core <os>_<arch>_core/product
# jvmg* - "fat" libjvm_g - debug info linked into libjvm_g.so
# in the build.sh script:
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
all:
# jvmti.make requires XSLT (J2SE 1.4.x or newer):
echo "*** An XSLT processor (J2SE 1.4.x or newer) is required" \
$(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) jvmtidocs