Makefile revision 2796
2605N/A# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 2605N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2605N/A# This code is free software; you can redistribute it and/or modify it 2605N/A# under the terms of the GNU General Public License version 2 only, as 2605N/A# published by the Free Software Foundation. 2605N/A# This code is distributed in the hope that it will be useful, but WITHOUT 2605N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 2605N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 2605N/A# version 2 for more details (a copy is included in the LICENSE file that 2605N/A# You should have received a copy of the GNU General Public License version 2605N/A# 2 along with this work; if not, write to the Free Software Foundation, 2605N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2605N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2605N/A# This makefile creates a build tree and lights off a build. 2605N/A# You can go back into the build tree and perform rebuilds or 2605N/A# incremental builds as desired. Be sure to reestablish 2605N/A# environment variable settings for LD_LIBRARY_PATH and JAVA_HOME. 2605N/A# The make process now relies on java and javac. These can be 2605N/A# specified either implicitly on the PATH, by setting the 2605N/A# (JDK-inherited) ALT_BOOTDIR environment variable to full path to a 2605N/A# default BOOTDIR path value. Note that one of ALT_BOOTDIR 2605N/A# or BOOTDIR has to be set. We do *not* search javac, javah, rmic etc. 2605N/A# One can set ALT_BOOTDIR or BOOTDIR to point to a jdk that runs on 2605N/A# an architecture that differs from the target architecture, as long 2605N/A# as the bootstrap jdk runs under the same flavor of OS as the target 2605N/A# (i.e., if the target is linux, point to a jdk that runs on a linux 2605N/A# box). In order to use such a bootstrap jdk, set the make variable 2637N/A# REMOTE to the desired remote command mechanism, e.g., 2637N/A# make REMOTE="rsh -l me myotherlinuxbox" 2637N/A# Along with VM, Serviceability Agent (SA) is built for SA/JDI binding. # JDI binding on SA produces two binaries: # 1. sa-jdi.jar - This is build before building libjvm[_g].so # 2. libsa[_g].so - Native library for SA - This is built after # libjsig[_g].so (signal interposition library) # If $(GAMMADIR)/agent dir is not present, SA components are not built. $(OSNAME) $(ARCH) "*** ERROR: this platform does not support 64-bit compilers!") # we need to set up LP64 correctly to satisfy sanity checks in adlc # pass USE_SUNCC further, through MFLAGS # The following renders pathnames in generated Makefiles valid on # machines other than the machine containing the build tree. # For example, let's say my build tree lives on /files12 on # We only do this on SunOS variants, for a couple of reasons: # * It is extremely rare that source trees exist on other systems # * It has been claimed that the Linux automounter is flakey, so # changing GAMMADIR in a way that exercises the automounter could # prove to be a source of unreliability in the build process. # Obviously, this Makefile is only relevant on SunOS boxes to begin # with, but the SunOS conditionalization will make it easier to # combine Makefiles in the future (assuming we ever do that). # prepend current directory to relative pathnames. sed -e "s=^\([^/].*\)=$(shell pwd)/\1=" \ # If NEW_GAMMADIR doesn't already start with "/net/": # remove /net/$(HOST) if name already began with /home/ # remove /net/$(HOST) if name already began with /java/ # remove /net/$(HOST) if name already began with /lab/ sed -e "s=^\(.*\)=/net/$(HOST)\1=" \ -e "s=^/net/$(HOST)/home/=/home/=" \ -e "s=^/net/$(HOST)/java/=/java/=" \ -e "s=^/net/$(HOST)/lab/=/lab/=" \ # Don't use the new value for GAMMADIR unless a file with the new # BUILDARCH is set to "zero" for Zero builds. VARIANTARCH # is used to give the build directories meaningful names. # There is a (semi-) regular correspondence between make targets and actions: # Target Tree Type Build Dir # What you get with each target: # debug* - "thin" libjvm_g - debug info linked into the gamma_g launcher # fastdebug* - optimized compile, but with asserts enabled # jvmg* - "fat" libjvm_g - debug info linked into libjvm_g.so # optimized* - optimized compile, no asserts # product* - the shippable thing: optimized compile, no asserts, -DPRODUCT # This target list needs to be coordinated with the usage message #------------------------------------------------------------------------------- # Could make everything by default, but that would take a while. @
echo "Try '$(MAKE) <target> ...' where <target> is one or more of"# We do not want people accidentally building on old systems (e.g. Linux 2.2.x, # Disable this check by setting DISABLE_HOTSPOT_OS_VERSION_CHECK=ok. #SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 2.7% $(QUIETLY) >&
2 echo "*** This OS is not supported:" `uname -a`;
exit 1;
# If not found then fail fast. echo "*** An XSLT processor (J2SE 1.4.x or newer) is required" \
"to bootstrap this build" 1>&
2; \
$(SED) 's/@ZERO_ARCHDEF@/$(ZERO_ARCHDEF)/g;s/@ZERO_LIBARCH@/$(ZERO_LIBARCH)/g;' < $< > $@
# Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME # Just build the tree, and nothing else: # Doc target. This is the same for all build options. # Hence create a docs directory beside ...$(ARCH)_[...] # Synonyms for win32-like targets. #-------------------------------------------------------------------------------