Makefile revision 1703
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
11e9368a226272085c337e9e74b79808c16fbdbaTinderbox User# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# This code is free software; you can redistribute it and/or modify it
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# under the terms of the GNU General Public License version 2 only, as
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# published by the Free Software Foundation.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# This code is distributed in the hope that it will be useful, but WITHOUT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# version 2 for more details (a copy is included in the LICENSE file that
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# accompanied this code).
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# You should have received a copy of the GNU General Public License version
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# 2 along with this work; if not, write to the Free Software Foundation,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# or visit www.oracle.com if you need additional information or have any
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# questions.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# This makefile creates a build tree and lights off a build.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# You can go back into the build tree and perform rebuilds or
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# incremental builds as desired. Be sure to reestablish
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# environment variable settings for LD_LIBRARY_PATH and JAVA_HOME.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews# The make process now relies on java and javac. These can be
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# specified either implicitly on the PATH, by setting the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# (JDK-inherited) ALT_BOOTDIR environment variable to full path to a
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# JDK in which bin/java and bin/javac are present and working (e.g.,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# /usr/local/java/jdk1.3/solaris), or via the (JDK-inherited)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# default BOOTDIR path value. Note that one of ALT_BOOTDIR
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# or BOOTDIR has to be set. We do *not* search javac, javah, rmic etc.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# from the PATH.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Along with VM, Serviceability Agent (SA) is built for SA/JDI binding.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# JDI binding on SA produces two binaries:
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# 1. sa-jdi.jar - This is build before building libjvm[_g].so
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Please refer to ./makefiles/sa.make
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# 2. libsaproc[_g].so - Native library for SA - This is built after
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# libjsig[_g].so (signal interposition library)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Please refer to ./makefiles/vm.make
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# If $(GAMMADIR)/agent dir is not present, SA components are not built.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox Userifeq ($(GAMMADIR),)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeininclude ../../make/defs.make
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox Userelse
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox Userinclude $(GAMMADIR)/make/defs.make
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinendif
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntinclude $(GAMMADIR)/make/$(OSNAME)/makefiles/rules.make
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinifndef CC_INTERP
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserFORCE_TIERED=1
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinendif
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userifdef LP64
9c6a5d1f22f972232d7a9fd5c5fa64f10bacbdffAutomatic Updater ifeq ("$(filter $(LP64_ARCH),$(BUILDARCH))","")
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User _JUNK_ := $(shell echo >&2 \
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt $(OSNAME) $(ARCH) "*** ERROR: this platform does not support 64-bit compilers!")
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt @exit 1
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt endif
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntendif
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# The following renders pathnames in generated Makefiles valid on
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# machines other than the machine containing the build tree.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# For example, let's say my build tree lives on /files12 on
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# exact.east.sun.com. This logic will cause GAMMADIR to begin with
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# /net/exact/files12/...
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# We only do this on SunOS variants, for a couple of reasons:
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# * It is extremely rare that source trees exist on other systems
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# * It has been claimed that the Linux automounter is flakey, so
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# changing GAMMADIR in a way that exercises the automounter could
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# prove to be a source of unreliability in the build process.
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# Obviously, this Makefile is only relevant on SunOS boxes to begin
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# with, but the SunOS conditionalization will make it easier to
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# combine Makefiles in the future (assuming we ever do that).
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox Userifeq ($(OSNAME),solaris)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User # prepend current directory to relative pathnames.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein NEW_GAMMADIR := \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $(shell echo $(GAMMADIR) | \
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updater sed -e "s=^\([^/].*\)=$(shell pwd)/\1=" \
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updater )
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updater unexport NEW_GAMMADIR
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater # If NEW_GAMMADIR doesn't already start with "/net/":
77dccf2a5d9327d16b4374a135cdb99bdd48620eAutomatic Updater ifeq ($(strip $(filter /net/%,$(NEW_GAMMADIR))),)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews # prepend /net/$(HOST)
47012ae6dbf18a2503d7b33c1c9583dc38625cb7Mark Andrews # remove /net/$(HOST) if name already began with /home/
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updater # remove /net/$(HOST) if name already began with /java/
ac93437301f55ed69bf85883a497a75598c628f9Automatic Updater # remove /net/$(HOST) if name already began with /lab/
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews NEW_GAMMADIR := \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(shell echo $(NEW_GAMMADIR) | \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce sed -e "s=^\(.*\)=/net/$(HOST)\1=" \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce -e "s=^/net/$(HOST)/home/=/home/=" \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce -e "s=^/net/$(HOST)/java/=/java/=" \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce -e "s=^/net/$(HOST)/lab/=/lab/=" \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce )
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce # Don't use the new value for GAMMADIR unless a file with the new
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce # name actually exists.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce ifneq ($(wildcard $(NEW_GAMMADIR)),)
47012ae6dbf18a2503d7b33c1c9583dc38625cb7Mark Andrews GAMMADIR := $(NEW_GAMMADIR)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce endif
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce endif
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luceendif
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# There is a (semi-) regular correspondence between make targets and actions:
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User#
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# Target Tree Type Build Dir
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User#
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# debug compiler2 <os>_<arch>_compiler2/debug
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# fastdebug compiler2 <os>_<arch>_compiler2/fastdebug
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# jvmg compiler2 <os>_<arch>_compiler2/jvmg
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# optimized compiler2 <os>_<arch>_compiler2/optimized
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# profiled compiler2 <os>_<arch>_compiler2/profiled
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# product compiler2 <os>_<arch>_compiler2/product
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User#
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# debug1 compiler1 <os>_<arch>_compiler1/debug
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# fastdebug1 compiler1 <os>_<arch>_compiler1/fastdebug
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# jvmg1 compiler1 <os>_<arch>_compiler1/jvmg
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# optimized1 compiler1 <os>_<arch>_compiler1/optimized
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# profiled1 compiler1 <os>_<arch>_compiler1/profiled
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# product1 compiler1 <os>_<arch>_compiler1/product
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User#
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# debugcore core <os>_<arch>_core/debug
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# fastdebugcore core <os>_<arch>_core/fastdebug
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# jvmgcore core <os>_<arch>_core/jvmg
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# optimizedcore core <os>_<arch>_core/optimized
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# profiledcore core <os>_<arch>_core/profiled
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# productcore core <os>_<arch>_core/product
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User#
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# What you get with each target:
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User#
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# debug* - "thin" libjvm_g - debug info linked into the gamma_g launcher
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# fastdebug* - optimized compile, but with asserts enabled
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# jvmg* - "fat" libjvm_g - debug info linked into libjvm_g.so
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# optimized* - optimized compile, no asserts
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# profiled* - gprof
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# product* - the shippable thing: optimized compile, no asserts, -DPRODUCT
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# This target list needs to be coordinated with the usage message
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# in the build.sh script:
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserTARGETS = debug jvmg fastdebug optimized profiled product
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserSUBDIR_DOCS = $(OSNAME)_$(BUILDARCH)_docs
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserSUBDIRS_C1 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler1/,$(TARGETS))
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserSUBDIRS_C2 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS))
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserSUBDIRS_TIERED = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS))
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserSUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS))
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserSUBDIRS_KERNEL = $(addprefix $(OSNAME)_$(BUILDARCH)_kernel/,$(TARGETS))
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserTARGETS_C2 = $(TARGETS)
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserTARGETS_C1 = $(addsuffix 1,$(TARGETS))
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserTARGETS_TIERED = $(addsuffix tiered,$(TARGETS))
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserTARGETS_CORE = $(addsuffix core,$(TARGETS))
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserTARGETS_KERNEL = $(addsuffix kernel,$(TARGETS))
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserBUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserBUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserBUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserBUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User#-------------------------------------------------------------------------------
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# Could make everything by default, but that would take a while.
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox Userall:
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User @echo "Try '$(MAKE) <target> ...' where <target> is one or more of"
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User @echo " $(TARGETS_C2)"
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User @echo " $(TARGETS_C1)"
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User @echo " $(TARGETS_CORE)"
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox Userchecks: check_os_version check_j2se_version
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# We do not want people accidentally building on old systems (e.g. Linux 2.2.x,
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# Solaris 2.5.1, 2.6).
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# Disable this check by setting DISABLE_HOTSPOT_OS_VERSION_CHECK=ok.
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserSUPPORTED_OS_VERSION = 5.7 5.8 5.9 5.10 5.11
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserOS_VERSION := $(shell uname -r)
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserEMPTY_IF_NOT_SUPPORTED = $(filter $(SUPPORTED_OS_VERSION),$(OS_VERSION))
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox Usercheck_os_version:
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox Userifeq ($(DISABLE_HOTSPOT_OS_VERSION_CHECK)$(EMPTY_IF_NOT_SUPPORTED),)
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User $(QUIETLY) >&2 echo "*** This OS is not supported:" `uname -a`; exit 1;
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntendif
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# jvmti.make requires XSLT (J2SE 1.4.x or newer):
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox UserXSLT_CHECK = $(RUN.JAVAP) javax.xml.transform.TransformerFactory
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# If not found then fail fast.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usercheck_j2se_version:
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User $(QUIETLY) $(XSLT_CHECK) > /dev/null 2>&1; \
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User if [ $$? -ne 0 ]; then \
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User $(RUN.JAVA) -version; \
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User echo "*** An XSLT processor (J2SE 1.4.x or newer) is required" \
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User "to bootstrap this build" 1>&2; \
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User exit 1; \
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User fi
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User$(SUBDIRS_TIERED): $(BUILDTREE_MAKE)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User $(BUILDTREE) VARIANT=tiered
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User$(SUBDIRS_C2): $(BUILDTREE_MAKE)
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox Userifdef FORCE_TIERED
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User $(BUILDTREE) VARIANT=tiered FORCE_TIERED=1
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox Userelse
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User $(BUILDTREE) VARIANT=compiler2
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userendif
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User$(SUBDIRS_C1): $(BUILDTREE_MAKE)
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User $(BUILDTREE) VARIANT=compiler1
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User$(SUBDIRS_CORE): $(BUILDTREE_MAKE)
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User $(BUILDTREE) VARIANT=core
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User$(SUBDIRS_KERNEL): $(BUILDTREE_MAKE)
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User $(BUILDTREE) VARIANT=kernel
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User# Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User$(TARGETS_C2): $(SUBDIRS_C2)
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS)
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && ./test_gamma
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox Userifdef INSTALL
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) install
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox Userendif
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User
aa1905addf2f33d90aa020080e4e77a8651e829aTinderbox User$(TARGETS_TIERED): $(SUBDIRS_TIERED)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && ./test_gamma
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userifdef INSTALL
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) install
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox Userendif
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User$(TARGETS_C1): $(SUBDIRS_C1)
9c6a5d1f22f972232d7a9fd5c5fa64f10bacbdffAutomatic Updater cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS)
9c6a5d1f22f972232d7a9fd5c5fa64f10bacbdffAutomatic Updater cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && ./test_gamma
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntifdef INSTALL
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) install
9c6a5d1f22f972232d7a9fd5c5fa64f10bacbdffAutomatic Updaterendif
9c6a5d1f22f972232d7a9fd5c5fa64f10bacbdffAutomatic Updater
9c6a5d1f22f972232d7a9fd5c5fa64f10bacbdffAutomatic Updater$(TARGETS_CORE): $(SUBDIRS_CORE)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrewsifdef INSTALL
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntendif
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User$(TARGETS_KERNEL): $(SUBDIRS_KERNEL)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt cd $(OSNAME)_$(BUILDARCH)_kernel/$(patsubst %kernel,%,$@) && $(MAKE) $(MFLAGS)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt cd $(OSNAME)_$(BUILDARCH)_kernel/$(patsubst %kernel,%,$@) && ./test_gamma
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinifdef INSTALL
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein cd $(OSNAME)_$(BUILDARCH)_kernel/$(patsubst %kernel,%,$@) && $(MAKE) $(MFLAGS) install
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userendif
9c6a5d1f22f972232d7a9fd5c5fa64f10bacbdffAutomatic Updater
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Just build the tree, and nothing else:
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usertree: $(SUBDIRS_C2)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeintree1: $(SUBDIRS_C1)
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox Usertreecore: $(SUBDIRS_CORE)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usertreekernel: $(SUBDIRS_KERNEL)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
56bd026e6c96482dccab83778bf8f9c92c36bf11Tinderbox User# Doc target. This is the same for all build options.
56bd026e6c96482dccab83778bf8f9c92c36bf11Tinderbox User# Hence create a docs directory beside ...$(ARCH)_[...]
56bd026e6c96482dccab83778bf8f9c92c36bf11Tinderbox Userdocs: checks
56bd026e6c96482dccab83778bf8f9c92c36bf11Tinderbox User $(QUIETLY) mkdir -p $(SUBDIR_DOCS)
56bd026e6c96482dccab83778bf8f9c92c36bf11Tinderbox User $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) jvmtidocs
56bd026e6c96482dccab83778bf8f9c92c36bf11Tinderbox User
56bd026e6c96482dccab83778bf8f9c92c36bf11Tinderbox User# Synonyms for win32-like targets.
56bd026e6c96482dccab83778bf8f9c92c36bf11Tinderbox Usercompiler2: jvmg product
56bd026e6c96482dccab83778bf8f9c92c36bf11Tinderbox User
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeincompiler1: jvmg1 product1
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
bea931e17b7567f09107f93ab7e25c7f00abeb9cMark Andrewscore: jvmgcore productcore
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinclean_docs:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein rm -rf $(SUBDIR_DOCS)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinclean_compiler1 clean_compiler2 clean_core clean_kernel:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@)
47012ae6dbf18a2503d7b33c1c9583dc38625cb7Mark Andrews
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinclean: clean_compiler2 clean_compiler1 clean_core clean_docs clean_kernel
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userinclude $(GAMMADIR)/make/$(OSNAME)/makefiles/cscope.make
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#-------------------------------------------------------------------------------
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt.PHONY: tree tree1 treecore
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein.PHONY: all compiler1 compiler2 core
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt.PHONY: clean clean_compiler1 clean_compiler2 clean_core docs clean_docs
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein.PHONY: checks check_os_version check_j2se_version
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt