defs.make revision 1472
0N/A#
1472N/A# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A#
0N/A# This code is free software; you can redistribute it and/or modify it
0N/A# under the terms of the GNU General Public License version 2 only, as
0N/A# published by the Free Software Foundation.
0N/A#
0N/A# This code is distributed in the hope that it will be useful, but WITHOUT
0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A# version 2 for more details (a copy is included in the LICENSE file that
0N/A# accompanied this code).
0N/A#
0N/A# You should have received a copy of the GNU General Public License version
0N/A# 2 along with this work; if not, write to the Free Software Foundation,
0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A#
1472N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A# or visit www.oracle.com if you need additional information or have any
1472N/A# questions.
0N/A#
0N/A#
0N/A
0N/A# The common definitions for hotspot builds.
0N/A
0N/A# Default to verbose build logs (show all compile lines):
0N/AMAKE_VERBOSE=y
0N/A
0N/A# Make macros for install files or preparing targets
0N/ACD=cd
0N/ACP=cp
0N/AECHO=echo
0N/AGREP=grep
0N/AMKDIR=mkdir
0N/AMV=mv
0N/APWD=pwd
0N/ARM=rm -f
0N/ASED=sed
0N/ATAR=tar
0N/AZIPEXE=zip
0N/A
0N/Adefine install-file
0N/A@$(MKDIR) -p $(@D)
0N/A@$(RM) $@
0N/A$(CP) $< $@
0N/Aendef
0N/Adefine prep-target
0N/A@$(MKDIR) -p $(@D)
0N/A@$(RM) $@
0N/Aendef
0N/A
0N/A# Directory paths and user name
0N/A# Unless GAMMADIR is set on the command line, search upward from
0N/A# the current directory for a parent directory containing "src/share/vm".
0N/A# If that fails, look for $GAMMADIR in the environment.
0N/A# When the tree of subdirs is built, this setting is stored in each flags.make.
0N/AGAMMADIR := $(shell until ([ -d dev ]&&echo $${GAMMADIR:-/GAMMADIR/}) || ([ -d src/share/vm ]&&pwd); do cd ..; done)
0N/AHS_SRC_DIR=$(GAMMADIR)/src
91N/AHS_MAKE_DIR=$(GAMMADIR)/make
0N/AHS_BUILD_DIR=$(GAMMADIR)/build
0N/A
0N/Aifeq ($(USER),)
0N/A USER=$(USERNAME)
0N/Aendif
0N/A
0N/A# hotspot version definitions
0N/Ainclude $(GAMMADIR)/make/hotspot_version
0N/A
0N/A# Java versions needed
0N/Aifeq ($(PREVIOUS_JDK_VERSION),)
0N/A PREVIOUS_JDK_VERSION=$(JDK_PREVIOUS_VERSION)
0N/Aendif
0N/Aifeq ($(JDK_MAJOR_VERSION),)
0N/A JDK_MAJOR_VERSION=$(JDK_MAJOR_VER)
0N/Aendif
0N/Aifeq ($(JDK_MINOR_VERSION),)
0N/A JDK_MINOR_VERSION=$(JDK_MINOR_VER)
0N/Aendif
0N/Aifeq ($(JDK_MICRO_VERSION),)
0N/A JDK_MICRO_VERSION=$(JDK_MICRO_VER)
0N/Aendif
0N/Aifeq ($(JDK_MKTG_VERSION),)
0N/A JDK_MKTG_VERSION=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
0N/Aendif
0N/Aifeq ($(JDK_VERSION),)
0N/A JDK_VERSION=$(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
0N/Aendif
0N/Aifeq ($(FULL_VERSION),)
0N/A FULL_VERSION="$(JDK_VERSION)"
0N/Aendif
0N/A
0N/A# FULL_VERSION is only used to define JRE_RELEASE_VERSION which is used
0N/A# as JRE version in VM -Xinternalversion output.
0N/Aifndef JRE_RELEASE_VERSION
0N/A JRE_RELEASE_VERSION=$(FULL_VERSION)
0N/Aendif
0N/A
0N/Aifndef HOTSPOT_RELEASE_VERSION
0N/A HOTSPOT_RELEASE_VERSION=$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER)
0N/Aendif
0N/A
0N/Aifdef HOTSPOT_BUILD_VERSION
0N/A# specified in command line (PRT build)
0N/Aelse
0N/A ifdef JPRT_BUILD_VERSION
0N/A# JPR build
0N/A HOTSPOT_BUILD_VERSION=$(JPRT_BUILD_VERSION)
0N/A else
0N/A ifdef COOKED_BUILD_NUMBER
0N/A# JRE build
0N/A HOTSPOT_BUILD_VERSION=
0N/A else
0N/A HOTSPOT_BUILD_VERSION=internal
0N/A endif
0N/A endif
0N/Aendif
0N/A
0N/A# Windows should have OS predefined
0N/Aifeq ($(OS),)
0N/A OS := $(shell uname -s)
0N/A HOST := $(shell uname -n)
0N/Aendif
0N/A
0N/A# If not SunOS and not Linux, assume Windows
0N/Aifneq ($(OS), Linux)
0N/A ifneq ($(OS), SunOS)
0N/A OSNAME=windows
0N/A else
0N/A OSNAME=solaris
0N/A endif
0N/Aelse
0N/A OSNAME=linux
0N/Aendif
0N/A
0N/A# Determinations of default make arguments and platform specific settings
0N/AMAKE_ARGS=
0N/A
0N/A# ARCH_DATA_MODEL==64 is equivalent to LP64=1
0N/Aifeq ($(ARCH_DATA_MODEL), 64)
0N/A ifndef LP64
0N/A LP64 := 1
0N/A endif
0N/Aendif
0N/A
0N/A# Defaults set for product build
0N/AEXPORT_SUBDIR=
0N/A
0N/A# Change default /java path if requested
0N/Aifneq ($(ALT_SLASH_JAVA),)
0N/A SLASH_JAVA=$(ALT_SLASH_JAVA)
0N/Aendif
0N/A
0N/A# Default OUTPUTDIR
0N/AOUTPUTDIR=$(HS_BUILD_DIR)/$(OSNAME)
0N/Aifneq ($(ALT_OUTPUTDIR),)
0N/A OUTPUTDIR=$(ALT_OUTPUTDIR)
0N/Aendif
0N/A
0N/A# Find latest promoted JDK area
0N/AJDK_IMPORT_PATH=$(SLASH_JAVA)/re/j2se/$(JDK_VERSION)/promoted/latest/binaries/$(PLATFORM)
0N/Aifneq ($(ALT_JDK_IMPORT_PATH),)
0N/A JDK_IMPORT_PATH=$(ALT_JDK_IMPORT_PATH)
0N/Aendif
0N/A
0N/A# Find JDK used for javac compiles
0N/ABOOTDIR=$(SLASH_JAVA)/re/j2se/$(PREVIOUS_JDK_VERSION)/latest/binaries/$(PLATFORM)
0N/Aifneq ($(ALT_BOOTDIR),)
0N/A BOOTDIR=$(ALT_BOOTDIR)
0N/Aendif
0N/A
0N/A# The platform dependent defs.make defines platform specific variable such
0N/A# as ARCH, EXPORT_LIST etc. We must place the include here after BOOTDIR is defined.
91N/Ainclude $(GAMMADIR)/make/$(OSNAME)/makefiles/defs.make
0N/A
0N/A# We are trying to put platform specific defintions
91N/A# files to make/$(OSNAME)/makefiles dictory. However
0N/A# some definitions are common for both linux and solaris,
0N/A# so we put them here.
0N/Aifneq ($(OSNAME),windows)
91N/A ABS_OUTPUTDIR := $(shell mkdir -p $(OUTPUTDIR); $(CD) $(OUTPUTDIR); $(PWD))
0N/A ABS_BOOTDIR := $(shell $(CD) $(BOOTDIR); $(PWD))
0N/A ABS_GAMMADIR := $(shell $(CD) $(GAMMADIR); $(PWD))
91N/A ABS_OS_MAKEFILE := $(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME); $(PWD))/Makefile
0N/A
0N/A # uname, HotSpot source directory, build directory and JDK use different names
0N/A # for CPU architectures.
0N/A # ARCH - uname output
0N/A # SRCARCH - where to find HotSpot cpu and os_cpu source files
0N/A # BUILDARCH - build directory
0N/A # LIBARCH - directory name in JDK/JRE
0N/A
0N/A # Use uname output for SRCARCH, but deal with platform differences. If ARCH
0N/A # is not explicitly listed below, it is treated as x86.
1010N/A SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 zero,$(ARCH)))
0N/A ARCH/ = x86
0N/A ARCH/sparc = sparc
0N/A ARCH/sparc64= sparc
0N/A ARCH/ia64 = ia64
0N/A ARCH/amd64 = x86
0N/A ARCH/x86_64 = x86
1010N/A ARCH/zero = zero
0N/A
0N/A # BUILDARCH is usually the same as SRCARCH, except for sparcv9
0N/A BUILDARCH = $(SRCARCH)
0N/A ifeq ($(BUILDARCH), x86)
0N/A ifdef LP64
0N/A BUILDARCH = amd64
0N/A else
0N/A BUILDARCH = i486
0N/A endif
0N/A endif
0N/A ifeq ($(BUILDARCH), sparc)
0N/A ifdef LP64
0N/A BUILDARCH = sparcv9
0N/A endif
0N/A endif
0N/A
0N/A # LIBARCH is 1:1 mapping from BUILDARCH
0N/A LIBARCH = $(LIBARCH/$(BUILDARCH))
0N/A LIBARCH/i486 = i386
0N/A LIBARCH/amd64 = amd64
0N/A LIBARCH/sparc = sparc
0N/A LIBARCH/sparcv9 = sparcv9
0N/A LIBARCH/ia64 = ia64
1010N/A LIBARCH/zero = $(ZERO_LIBARCH)
0N/A
1010N/A LP64_ARCH = sparcv9 amd64 ia64 zero
0N/Aendif
0N/A
0N/A# Required make macro settings for all platforms
0N/AMAKE_ARGS += JAVA_HOME=$(ABS_BOOTDIR)
228N/AMAKE_ARGS += OUTPUTDIR=$(ABS_OUTPUTDIR)
0N/AMAKE_ARGS += GAMMADIR=$(ABS_GAMMADIR)
0N/AMAKE_ARGS += MAKE_VERBOSE=$(MAKE_VERBOSE)
0N/AMAKE_ARGS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION)
0N/AMAKE_ARGS += JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
0N/A
0N/A# Pass HOTSPOT_BUILD_VERSION as argument to OS specific Makefile
0N/A# to overwrite the default definition since OS specific Makefile also
0N/A# includes this make/defs.make file.
0N/AMAKE_ARGS += HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION)
0N/A
0N/A# Select name of export directory
0N/AEXPORT_PATH=$(OUTPUTDIR)/export-$(PLATFORM)$(EXPORT_SUBDIR)
0N/Aifneq ($(ALT_EXPORT_PATH),)
0N/A EXPORT_PATH=$(ALT_EXPORT_PATH)
0N/Aendif
0N/A
0N/A# Default jdk image if one is created for you with create_jdk
0N/AJDK_IMAGE_DIR=$(OUTPUTDIR)/jdk-$(PLATFORM)
0N/A
0N/A# Various export sub directories
0N/AEXPORT_INCLUDE_DIR = $(EXPORT_PATH)/include
0N/AEXPORT_DOCS_DIR = $(EXPORT_PATH)/docs
0N/AEXPORT_LIB_DIR = $(EXPORT_PATH)/lib
0N/AEXPORT_JRE_DIR = $(EXPORT_PATH)/jre
0N/AEXPORT_JRE_BIN_DIR = $(EXPORT_JRE_DIR)/bin
0N/AEXPORT_JRE_LIB_DIR = $(EXPORT_JRE_DIR)/lib
0N/AEXPORT_JRE_LIB_ARCH_DIR = $(EXPORT_JRE_LIB_DIR)/$(LIBARCH)
0N/A
0N/A# Common export list of files
0N/AEXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jvmti.h
1184N/AEXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jvmticmlr.h
0N/AEXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jni.h
0N/AEXPORT_LIST += $(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h
0N/AEXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jmm.h