200N/A# Copyright (c) 2006, 2011, Oracle
and/or its affiliates. All rights reserved.
200N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
200N/A# This code is free software; you can redistribute it
and/or modify it
200N/A# under the terms of the GNU General Public License version 2 only, as
200N/A# published by the Free Software Foundation.
200N/A# This code is distributed in the hope that it will be useful, but WITHOUT
200N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
200N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
200N/A# version 2 for more details (a copy is included in the LICENSE file that
0N/A# accompanied this code).
200N/A# You should have received a copy of the GNU General Public License version
200N/A# 2 along with this work; if not, write to the Free Software Foundation,
200N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
200N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
200N/A# The common definitions for hotspot builds.
200N/A# Default to verbose build logs (show all compile lines):
200N/A# Make macros for install files or preparing targets
# Directory paths and user name
# Unless GAMMADIR is set on the command line, search upward from
# the current directory for a parent directory containing "
src/share/vm".
# If that fails, look for $GAMMADIR in the environment.
# When the tree of subdirs is built, this setting is stored in each
flags.make.GAMMADIR := $(shell until ([ -d dev ]&&echo $${GAMMADIR:-/GAMMADIR/}) || ([ -d
src/share/vm ]&&pwd); do cd ..; done)
HS_SRC_DIR=$(GAMMADIR)/src
HS_MAKE_DIR=$(GAMMADIR)/make
HS_BUILD_DIR=$(GAMMADIR)/build
# hotspot version definitions
ifeq ($(PREVIOUS_JDK_VERSION),)
PREVIOUS_JDK_VERSION=$(JDK_PREVIOUS_VERSION)
ifeq ($(JDK_MAJOR_VERSION),)
JDK_MAJOR_VERSION=$(JDK_MAJOR_VER)
ifeq ($(JDK_MINOR_VERSION),)
JDK_MINOR_VERSION=$(JDK_MINOR_VER)
ifeq ($(JDK_MICRO_VERSION),)
JDK_MICRO_VERSION=$(JDK_MICRO_VER)
ifeq ($(JDK_MKTG_VERSION),)
JDK_MKTG_VERSION=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
JDK_VERSION=$(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
FULL_VERSION="$(JDK_VERSION)"
# FULL_VERSION is only used to define JRE_RELEASE_VERSION which is used
# as JRE version in VM -Xinternalversion output.
ifndef JRE_RELEASE_VERSION
JRE_RELEASE_VERSION=$(FULL_VERSION)
ifndef HOTSPOT_RELEASE_VERSION
HOTSPOT_RELEASE_VERSION=$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER)
ifdef HOTSPOT_BUILD_VERSION
# specified in command line
ifdef COOKED_BUILD_NUMBER
ifdef USER_RELEASE_SUFFIX
HOTSPOT_BUILD_VERSION=internal-$(USER_RELEASE_SUFFIX)
HOTSPOT_BUILD_VERSION=internal
# Windows should have OS predefined
ifneq ($(findstring BSD,$(OS)),)
HOST := $(shell uname -n)
# If not SunOS, not Linux and not BSD, assume Windows
# Determinations of default make arguments and platform specific settings
# ARCH_DATA_MODEL==64 is equivalent to LP64=1
ifeq ($(ARCH_DATA_MODEL), 64)
# Defaults set for product build
# Change default /java path if requested
ifneq ($(ALT_SLASH_JAVA),)
SLASH_JAVA=$(ALT_SLASH_JAVA)
OUTPUTDIR=$(HS_BUILD_DIR)/$(OSNAME)
ifneq ($(ALT_OUTPUTDIR),)
OUTPUTDIR=$(ALT_OUTPUTDIR)
# Find latest promoted JDK area
ifneq ($(ALT_JDK_IMPORT_PATH),)
JDK_IMPORT_PATH=$(ALT_JDK_IMPORT_PATH)
# Other parts of JDK build may require an import JDK that can be executed
# on the build host. For cross-compile builds we also need an import JDK
# that matches the target arch, so for that we set ALT_JDK_TARGET_IMPORT_PATH
ifneq ($(ALT_JDK_TARGET_IMPORT_PATH),)
JDK_IMPORT_PATH=$(ALT_JDK_TARGET_IMPORT_PATH)
# Find JDK used for javac compiles
# The platform dependent
defs.make defines platform specific variable such
# as ARCH, EXPORT_LIST etc. We must place the include here after BOOTDIR is defined.
# We are trying to put platform specific defintions
# files to make/$(OSNAME)/makefiles dictory. However
# some definitions are common for both linux and solaris,
ifneq ($(OSNAME),windows)
ABS_OUTPUTDIR := $(shell mkdir -p $(OUTPUTDIR); $(CD) $(OUTPUTDIR); $(PWD))
ABS_BOOTDIR := $(shell $(CD) $(BOOTDIR); $(PWD))
ABS_GAMMADIR := $(shell $(CD) $(GAMMADIR); $(PWD))
ABS_OS_MAKEFILE := $(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME); $(PWD))/Makefile
# uname, HotSpot source directory, build directory and JDK use different names
# SRCARCH - where to find HotSpot cpu and os_cpu source files
# BUILDARCH - build directory
# LIBARCH - directory name in
JDK/JRE # Use uname output for SRCARCH, but deal with platform differences. If ARCH
# is not explicitly listed below, it is treated as x86.
SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 arm ppc zero,$(ARCH)))
# BUILDARCH is usually the same as SRCARCH, except for sparcv9
ifeq ($(BUILDARCH), sparc)
# LIBARCH is 1:1 mapping from BUILDARCH
LIBARCH = $(LIBARCH/$(BUILDARCH))
LP64_ARCH = sparcv9 amd64 ia64 zero
# Required make macro settings for all platforms
MAKE_ARGS += JAVA_HOME=$(ABS_BOOTDIR)
MAKE_ARGS += OUTPUTDIR=$(ABS_OUTPUTDIR)
MAKE_ARGS += GAMMADIR=$(ABS_GAMMADIR)
MAKE_ARGS += MAKE_VERBOSE=$(MAKE_VERBOSE)
MAKE_ARGS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION)
MAKE_ARGS += JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
# Pass HOTSPOT_BUILD_VERSION as argument to OS specific Makefile
# to overwrite the default definition since OS specific Makefile also
MAKE_ARGS += HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION)
# Select name of export directory
EXPORT_PATH=$(OUTPUTDIR)/export-$(PLATFORM)$(EXPORT_SUBDIR)
ifneq ($(ALT_EXPORT_PATH),)
EXPORT_PATH=$(ALT_EXPORT_PATH)
# Default jdk image if one is created for you with create_jdk
JDK_IMAGE_DIR=$(OUTPUTDIR)/jdk-$(PLATFORM)
# Various export sub directories
EXPORT_INCLUDE_DIR = $(EXPORT_PATH)/include
EXPORT_DOCS_DIR = $(EXPORT_PATH)/docs
EXPORT_LIB_DIR = $(EXPORT_PATH)/lib
EXPORT_JRE_DIR = $(EXPORT_PATH)/jre
EXPORT_JRE_BIN_DIR = $(EXPORT_JRE_DIR)/bin
EXPORT_JRE_LIB_DIR = $(EXPORT_JRE_DIR)/lib
EXPORT_JRE_LIB_ARCH_DIR = $(EXPORT_JRE_LIB_DIR)/$(LIBARCH)
# non-universal macosx builds need to appear universal
ifeq ($(OS_VENDOR), Darwin)
ifneq ($(MACOSX_UNIVERSAL), true)
EXPORT_JRE_LIB_ARCH_DIR = $(EXPORT_JRE_LIB_DIR)
# Common export list of files
EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/
jvmti.hEXPORT_LIST += $(EXPORT_INCLUDE_DIR)/
jni.hEXPORT_LIST += $(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/
jni_md.hEXPORT_LIST += $(EXPORT_INCLUDE_DIR)/
jmm.hEXPORT_LIST += $(EXPORT_INCLUDE_DIR)/
jfr.h