spec.gmk.in revision 2648:6558c37afe83
167754Smsmith#
267754Smsmith# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
367754Smsmith# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
477424Smsmith#
5104470Siwasaki# This code is free software; you can redistribute it and/or modify it
667754Smsmith# under the terms of the GNU General Public License version 2 only, as
767754Smsmith# published by the Free Software Foundation.  Oracle designates this
867754Smsmith# particular file as subject to the "Classpath" exception as provided
967754Smsmith# by Oracle in the LICENSE file that accompanied this code.
1067754Smsmith#
1167754Smsmith# This code is distributed in the hope that it will be useful, but WITHOUT
1267754Smsmith# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1391116Smsmith# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1470243Smsmith# version 2 for more details (a copy is included in the LICENSE file that
1567754Smsmith# accompanied this code).
1667754Smsmith#
1767754Smsmith# You should have received a copy of the GNU General Public License version
1867754Smsmith# 2 along with this work; if not, write to the Free Software Foundation,
1967754Smsmith# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2067754Smsmith#
2167754Smsmith# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2267754Smsmith# or visit www.oracle.com if you need additional information or have any
2367754Smsmith# questions.
2467754Smsmith#
2567754Smsmith
2667754Smsmith# Configured @DATE_WHEN_CONFIGURED@ to build
2767754Smsmith# for target system @OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU@
2867754Smsmith#   (called @OPENJDK_TARGET_AUTOCONF_NAME@ by autoconf)
2967754Smsmith# on build system @OPENJDK_BUILD_OS@-@OPENJDK_BUILD_CPU@
3067754Smsmith#   (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf)
3167754Smsmith# using 'configure @CONFIGURE_COMMAND_LINE@'
3267754Smsmith
3367754Smsmith# The command line given to configure.
3467754SmsmithCONFIGURE_COMMAND_LINE:=@CONFIGURE_COMMAND_LINE@
3567754Smsmith
3667754Smsmith# A self-referential reference to this file.
3767754SmsmithSPEC:=@SPEC@
3867754Smsmith
3967754Smsmith# SPACE and COMMA are defined in MakeBase.gmk, but they are also used in
4067754Smsmith# some definitions here, and are needed if MakeBase.gmk is not included before
4167754Smsmith# this file.
4267754SmsmithX:=
4367754SmsmithSPACE:=$(X) $(X)
4467754SmsmithCOMMA:=,
4567754Smsmith
4667754Smsmith# What make to use for main processing, after bootstrapping top-level Makefile.
4767754SmsmithMAKE := @MAKE@
4867754Smsmith
4967754Smsmith# The default make arguments
5067754SmsmithMAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \
5167754Smsmith    MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" $(MAKE_LOG_VARS)
5267754Smsmith
5367754SmsmithOUTPUT_SYNC_SUPPORTED:=@OUTPUT_SYNC_SUPPORTED@
5467754SmsmithOUTPUT_SYNC:=@OUTPUT_SYNC@
5567754Smsmith
5667754Smsmith# Override the shell with bash
5767754SmsmithBASH:=@BASH@
5867754SmsmithBASH_ARGS:=@BASH_ARGS@
5967754SmsmithSHELL:=$(BASH) $(BASH_ARGS)
6067754Smsmith
6167754Smsmith# The "human readable" name of this configuration
6267754SmsmithCONF_NAME:=@CONF_NAME@
6367754Smsmith
6467754Smsmith# The built jdk will run in this target system.
6567754SmsmithOPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
6667754SmsmithOPENJDK_TARGET_OS_TYPE:=@OPENJDK_TARGET_OS_TYPE@
6767754SmsmithOPENJDK_TARGET_OS_ENV:=@OPENJDK_TARGET_OS_ENV@
6867754Smsmith
6967754SmsmithOPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@
7067754SmsmithOPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@
7167754SmsmithOPENJDK_TARGET_CPU_BITS:=@OPENJDK_TARGET_CPU_BITS@
7267754SmsmithOPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
7367754Smsmith
7467754SmsmithCOMPILE_TYPE:=@COMPILE_TYPE@
7567754Smsmith
7667754Smsmith# Legacy support
7767754SmsmithOPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@
7867754SmsmithOPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@
7967754SmsmithOPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@
8067754SmsmithOPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
8167754SmsmithOPENJDK_TARGET_OS_EXPORT_DIR:=@OPENJDK_TARGET_OS_EXPORT_DIR@
8267754Smsmith
8367754SmsmithHOTSPOT_TARGET_OS := @HOTSPOT_TARGET_OS@
8467754SmsmithHOTSPOT_TARGET_OS_TYPE := @HOTSPOT_TARGET_OS_TYPE@
8567754Smsmith
8667754SmsmithHOTSPOT_TARGET_CPU := @HOTSPOT_TARGET_CPU@
8767754SmsmithHOTSPOT_TARGET_CPU_ARCH := @HOTSPOT_TARGET_CPU_ARCH@
8867754SmsmithHOTSPOT_TARGET_CPU_DEFINE := @HOTSPOT_TARGET_CPU_DEFINE@
8967754Smsmith
9067754SmsmithOPENJDK_TARGET_BUNDLE_PLATFORM:=@OPENJDK_TARGET_BUNDLE_PLATFORM@
9167754SmsmithJDK_ARCH_ABI_PROP_NAME := @JDK_ARCH_ABI_PROP_NAME@
9267754Smsmith
9367754Smsmith# We are building on this build system.
9467754Smsmith# When not cross-compiling, it is the same as the target.
9567754SmsmithOPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
9667754SmsmithOPENJDK_BUILD_OS_TYPE:=@OPENJDK_BUILD_OS_TYPE@
9767754SmsmithOPENJDK_BUILD_OS_ENV:=@OPENJDK_BUILD_OS_ENV@
9867754Smsmith
9967754SmsmithOPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@
10067754SmsmithOPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
10167754SmsmithOPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
10267754SmsmithOPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
10367754Smsmith
10467754Smsmith# Target platform value in ModuleTarget class file attribute.
10567754SmsmithOPENJDK_MODULE_TARGET_PLATFORM:=@OPENJDK_MODULE_TARGET_PLATFORM@
10667754Smsmith
10767754Smsmith# OS_* properties in release file
10867754SmsmithRELEASE_FILE_OS_NAME:=@RELEASE_FILE_OS_NAME@
10967754SmsmithRELEASE_FILE_OS_ARCH:=@RELEASE_FILE_OS_ARCH@
11067754Smsmith
11167754SmsmithLIBM:=@LIBM@
11267754SmsmithLIBDL:=@LIBDL@
11367754Smsmith
11467754Smsmith# colon or semicolon
11567754SmsmithPATH_SEP:=@PATH_SEP@
11667754Smsmith
11767754Smsmith# Save the original path before replacing it with the Visual Studio tools
11877424SmsmithORIGINAL_PATH:=@ORIGINAL_PATH@
11967754Smsmithifeq ($(OPENJDK_TARGET_OS), windows)
12067754Smsmith  # On Windows, the Visual Studio toolchain needs the PATH to be adjusted
12167754Smsmith  # to include Visual Studio tools (this needs to be in cygwin/msys style).
12267754Smsmith  export PATH:=@VS_PATH@
12367754Smsmithendif
12467754Smsmith
12567754SmsmithSYSROOT_CFLAGS := @SYSROOT_CFLAGS@
12677424SmsmithSYSROOT_LDFLAGS := @SYSROOT_LDFLAGS@
12791116Smsmith
12867754Smsmith# The top-level directory of the forest (SRC_ROOT is a traditional alias)
12967754SmsmithTOPDIR:=@TOPDIR@
13067754Smsmith# These two versions of TOPDIR are used in string comparisons
13167754SmsmithORIGINAL_TOPDIR:=@ORIGINAL_TOPDIR@
13277424SmsmithCANONICAL_TOPDIR:=@CANONICAL_TOPDIR@
13369746SmsmithSRC_ROOT:=@TOPDIR@
13469746Smsmith
13569746SmsmithOUTPUT_ROOT:=@OUTPUT_ROOT@
13669746SmsmithJDK_TOPDIR:=@JDK_TOPDIR@
13769746SmsmithLANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@
13869746SmsmithCORBA_TOPDIR:=@CORBA_TOPDIR@
13969746SmsmithJAXP_TOPDIR:=@JAXP_TOPDIR@
14069746SmsmithJAXWS_TOPDIR:=@JAXWS_TOPDIR@
14169746SmsmithHOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@
14269746SmsmithNASHORN_TOPDIR:=@NASHORN_TOPDIR@
14369746Smsmith
14469746SmsmithIMPORT_MODULES_CLASSES:=@IMPORT_MODULES_CLASSES@
14577424SmsmithIMPORT_MODULES_CMDS:=@IMPORT_MODULES_CMDS@
14669746SmsmithIMPORT_MODULES_LIBS:=@IMPORT_MODULES_LIBS@
14769746SmsmithIMPORT_MODULES_CONF:=@IMPORT_MODULES_CONF@
14869746SmsmithIMPORT_MODULES_LEGAL:=@IMPORT_MODULES_LEGAL@
14969746SmsmithIMPORT_MODULES_MAN:=@IMPORT_MODULES_MAN@
15091116SmsmithIMPORT_MODULES_SRC:=@IMPORT_MODULES_SRC@
15169746SmsmithIMPORT_MODULES_MAKE:=@IMPORT_MODULES_MAKE@
15283174Smsmith
15369746SmsmithCOPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
15469746Smsmith
15569746Smsmith# New (JEP-223) version information
15669746Smsmith
15769746Smsmith## Building blocks of the version string
15869746Smsmith# First three version numbers, with well-specified meanings (numerical)
15969746SmsmithVERSION_MAJOR := @VERSION_MAJOR@
16099679SiwasakiVERSION_MINOR := @VERSION_MINOR@
16199679SiwasakiVERSION_SECURITY := @VERSION_SECURITY@
16299679Siwasaki# Optional fourth element for use by OpenJDK consumers (numerical)
16399679SiwasakiVERSION_PATCH := @VERSION_PATCH@
16499679Siwasaki# The pre-release identifier (string)
16599679SiwasakiVERSION_PRE := @VERSION_PRE@
16699679Siwasaki# The build number (numerical)
16799679SiwasakiVERSION_BUILD := @VERSION_BUILD@
16899679Siwasaki# Optional build information (string)
16999679SiwasakiVERSION_OPT := @VERSION_OPT@
17099679Siwasaki
17199679Siwasaki## Composite variables
17299679Siwasaki# The version number as a dot separated sequence of numbers, e.g. 9.0.1
17399679SiwasakiVERSION_NUMBER := @VERSION_NUMBER@
17469746Smsmith# VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
17569746SmsmithVERSION_NUMBER_FOUR_POSITIONS := @VERSION_NUMBER_FOUR_POSITIONS@
17699146Siwasaki# The complete version string, with additional build information
17782367SmsmithVERSION_STRING := @VERSION_STRING@
17877424Smsmith# The short version string, without trailing zeroes and just PRE, if present.
17977424SmsmithVERSION_SHORT := @VERSION_SHORT@
18069746Smsmith# The Java specification version. It usually equals the major version number.
18169746SmsmithVERSION_SPECIFICATION := @VERSION_MAJOR@
18269746Smsmith# A GA version is defined by the PRE string being empty. Rather than testing for
18369746Smsmith# that, this variable defines it with true/false.
18469746SmsmithVERSION_IS_GA := @VERSION_IS_GA@
18569746Smsmith
18669746Smsmith# Convenience CFLAGS settings for passing version information into native programs.
18769746SmsmithVERSION_CFLAGS := \
18869746Smsmith    -DVERSION_MAJOR=$(VERSION_MAJOR) \
18969746Smsmith    -DVERSION_MINOR=$(VERSION_MINOR) \
19077424Smsmith    -DVERSION_SECURITY=$(VERSION_SECURITY) \
19167754Smsmith    -DVERSION_PATCH=$(VERSION_PATCH) \
19291116Smsmith    -DVERSION_PRE='"$(VERSION_PRE)"' \
19391116Smsmith    -DVERSION_BUILD=$(VERSION_BUILD) \
19491116Smsmith    -DVERSION_OPT='"$(VERSION_OPT)"' \
19599679Siwasaki    -DVERSION_NUMBER='"$(VERSION_NUMBER)"' \
19667754Smsmith    -DVERSION_STRING='"$(VERSION_STRING)"' \
19767754Smsmith    -DVERSION_SHORT='"$(VERSION_SHORT)"' \
19867754Smsmith    -DVERSION_SPECIFICATION='"$(VERSION_SPECIFICATION)"' \
19991116Smsmith    #
20091116Smsmith
20167754Smsmith# Platform naming variables
20299679SiwasakiLAUNCHER_NAME:=@LAUNCHER_NAME@
203102550SiwasakiPRODUCT_NAME:=@PRODUCT_NAME@
204102550SiwasakiPRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
20599679SiwasakiJDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@
20667754SmsmithCOMPANY_NAME:=@COMPANY_NAME@
20767754SmsmithHOTSPOT_VM_DISTRO:=@HOTSPOT_VM_DISTRO@
20867754SmsmithMACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
20967754SmsmithMACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
21077424SmsmithUSERNAME:=@USERNAME@
21167754Smsmith
21267754Smsmith# Different naming strings generated from the above information.
21367754SmsmithRUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX)
21467754Smsmith
21567754Smsmith# How to compile the code: release, fastdebug or slowdebug
21667754SmsmithDEBUG_LEVEL:=@DEBUG_LEVEL@
21767754SmsmithHOTSPOT_DEBUG_LEVEL:=@HOTSPOT_DEBUG_LEVEL@
21877424Smsmith
21967754Smsmith# This is the JDK variant to build.
22083174Smsmith# The JDK variant is a name for a specific set of modules to be compiled for the JDK.
22167754SmsmithJDK_VARIANT:=@JDK_VARIANT@
22269746Smsmith
22367754Smsmith# Which JVM variants to build (space-separated list)
22467754SmsmithJVM_VARIANTS := @JVM_VARIANTS@
22591116SmsmithJVM_VARIANT_MAIN := @JVM_VARIANT_MAIN@
22667754Smsmith
22767754Smsmith# Lists of features per variant. Only relevant for the variants listed in
22867754Smsmith# JVM_VARIANTS.
22985756SmsmithJVM_FEATURES_server := @JVM_FEATURES_server@
23067754SmsmithJVM_FEATURES_client := @JVM_FEATURES_client@
23167754SmsmithJVM_FEATURES_core := @JVM_FEATURES_core@
23267754SmsmithJVM_FEATURES_minimal := @JVM_FEATURES_minimal@
23367754SmsmithJVM_FEATURES_zero := @JVM_FEATURES_zero@
23467754SmsmithJVM_FEATURES_zeroshark := @JVM_FEATURES_zeroshark@
23567754SmsmithJVM_FEATURES_custom := @JVM_FEATURES_custom@
23667754Smsmith
23783174Smsmith# Used for make-time verifications
23877424SmsmithVALID_JVM_FEATURES := @VALID_JVM_FEATURES@
23969746SmsmithVALID_JVM_VARIANTS := @VALID_JVM_VARIANTS@
24069746Smsmith
24167754Smsmith# Control wether Hotspot builds gtest tests
24267754SmsmithBUILD_GTEST := @BUILD_GTEST@
24399146Siwasaki
24499146Siwasaki# Control use of precompiled header in hotspot libjvm build
24567754SmsmithUSE_PRECOMPILED_HEADER := @USE_PRECOMPILED_HEADER@
24677424Smsmith
24777424Smsmith# Only build headless support or not
24867754SmsmithENABLE_HEADLESS_ONLY := @ENABLE_HEADLESS_ONLY@
24977424Smsmith
25077424SmsmithENABLE_FULL_DOCS := @ENABLE_FULL_DOCS@
25177424Smsmith
25267754Smsmith# JDK_OUTPUTDIR specifies where a working jvm is built.
25367754Smsmith# You can run $(JDK_OUTPUTDIR)/bin/java
25467754Smsmith# Though the layout of the contents of $(JDK_OUTPUTDIR) is not
25567754Smsmith# yet the same as a default installation.
25667754Smsmith#
25785756Smsmith# When you run "make install" it will create the standardized
25877424Smsmith# layout for the jdk and the jre inside the IMAGES_OUTPUTDIR subdir.
25969746Smsmith# Then it will copy the contents of the jdk into the installation
26069746Smsmith# directory.
26167754Smsmith
26267754SmsmithBUILD_OUTPUT:=@BUILD_OUTPUT@
26367754Smsmith# Colon left out to be able to override IMAGES_OUTPUTDIR for bootcycle-images
26467754SmsmithSUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/support
26567754SmsmithBUILDTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/buildtools
26667754Smsmith
26767754SmsmithHOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
26867754SmsmithJDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
26991116SmsmithIMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
27067754SmsmithBUNDLES_OUTPUTDIR=$(BUILD_OUTPUT)/bundles
27191116SmsmithTESTMAKE_OUTPUTDIR=$(BUILD_OUTPUT)/test-make
27291116SmsmithMAKESUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/make-support
27367754Smsmith
27467754Smsmith# This does not get overridden in a bootcycle build
27567754SmsmithCONFIGURESUPPORT_OUTPUTDIR:=@CONFIGURESUPPORT_OUTPUTDIR@
27691116SmsmithBUILDJDK_OUTPUTDIR=$(BUILD_OUTPUT)/buildjdk
27767754Smsmith
27891116SmsmithBUILD_FAILURE_HANDLER := @BUILD_FAILURE_HANDLER@
27999679Siwasaki
28091116SmsmithENABLE_GENERATE_CLASSLIST := @ENABLE_GENERATE_CLASSLIST@
28167754Smsmith
28267754Smsmith# The boot jdk to use. This is overridden in bootcycle-spec.gmk. Make sure to keep
28399679Siwasaki# it in sync.
28467754SmsmithBOOT_JDK:=@BOOT_JDK@
28567754Smsmith
28667754SmsmithBUILD_JDK:=@BUILD_JDK@
28777424SmsmithCREATE_BUILDJDK:=@CREATE_BUILDJDK@
28867754SmsmithEXTERNAL_BUILDJDK:=@EXTERNAL_BUILDJDK@
28982367Smsmith
29067754Smsmith# When compiling Java source to be run by the boot jdk
29169746Smsmith# use these extra flags, eg -source 6 -target 6
29269746SmsmithBOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
29367754Smsmith
29467754Smsmith# Information about the build system
29567754SmsmithNUM_CORES:=@NUM_CORES@
29667754SmsmithMEMORY_SIZE:=@MEMORY_SIZE@
29767754Smsmith# Enable sjavac support = use a javac server,
29867754Smsmith# multi core javac compilation and dependency tracking.
29967754SmsmithENABLE_SJAVAC:=@ENABLE_SJAVAC@
30067754SmsmithENABLE_JAVAC_SERVER:=@ENABLE_JAVAC_SERVER@
30185756Smsmith# Store sjavac server synchronization files here, and
30267754Smsmith# the sjavac server log files.
30367754SmsmithSJAVAC_SERVER_DIR=$(MAKESUPPORT_OUTPUTDIR)/javacservers
30467754Smsmith
30567754Smsmith# Number of parallel jobs to use for compilation
30677424SmsmithJOBS?=@JOBS@
30767754SmsmithTEST_JOBS?=@TEST_JOBS@
30867754Smsmith
30967754Smsmith# Default make target
31067754SmsmithDEFAULT_MAKE_TARGET:=@DEFAULT_MAKE_TARGET@
311100966Siwasaki
31267754SmsmithFREETYPE_LIBS:=@FREETYPE_LIBS@
31367754SmsmithFREETYPE_CFLAGS:=@FREETYPE_CFLAGS@
31467754SmsmithFREETYPE_BUNDLE_LIB_PATH=@FREETYPE_BUNDLE_LIB_PATH@
31599146SiwasakiCUPS_CFLAGS:=@CUPS_CFLAGS@
31682367SmsmithALSA_LIBS:=@ALSA_LIBS@
31767754SmsmithALSA_CFLAGS:=@ALSA_CFLAGS@
31867754SmsmithLIBFFI_LIBS:=@LIBFFI_LIBS@
31967754SmsmithLIBFFI_CFLAGS:=@LIBFFI_CFLAGS@
32091116SmsmithENABLE_LIBFFI_BUNDLING:=@ENABLE_LIBFFI_BUNDLING@
32199679SiwasakiLIBFFI_LIB_FILE:=@LIBFFI_LIB_FILE@
32277424Smsmith
32367754SmsmithPACKAGE_PATH=@PACKAGE_PATH@
32469746Smsmith
32567754Smsmith# Source file for cacerts
32667754SmsmithCACERTS_FILE=@CACERTS_FILE@
32791116Smsmith
32867754Smsmith# Enable unlimited crypto policy
32991116SmsmithUNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
33091116Smsmith
33191116SmsmithGCOV_ENABLED=@GCOV_ENABLED@
33267754Smsmith
33367754Smsmith# Necessary additional compiler flags to compile X11
33482367SmsmithX_CFLAGS:=@X_CFLAGS@
33582367SmsmithX_LIBS:=@X_LIBS@
33691116Smsmith
33767754Smsmith# The lowest required version of macosx to enforce compatiblity for
33869746SmsmithMACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
33967754Smsmith
34067754Smsmith# Toolchain type: gcc, clang, solstudio, lxc, microsoft...
34167754SmsmithTOOLCHAIN_TYPE:=@TOOLCHAIN_TYPE@
34267754SmsmithTOOLCHAIN_VERSION := @TOOLCHAIN_VERSION@
34369746SmsmithCC_VERSION_NUMBER := @CC_VERSION_NUMBER@
34467754SmsmithCXX_VERSION_NUMBER := @CXX_VERSION_NUMBER@
34567754Smsmith
34667754Smsmith# Legacy support
34767754SmsmithHOTSPOT_TOOLCHAIN_TYPE := @HOTSPOT_TOOLCHAIN_TYPE@
34869746Smsmith
34970243Smsmith# Option used to tell the compiler whether to create 32- or 64-bit executables
35070243SmsmithCOMPILER_TARGET_BITS_FLAG:=@COMPILER_TARGET_BITS_FLAG@
35169746SmsmithCOMPILER_SUPPORTS_TARGET_BITS_FLAG=@COMPILER_SUPPORTS_TARGET_BITS_FLAG@
35267754Smsmith
35367754Smsmith# Option used to pass a command file to the compiler
35491116SmsmithCOMPILER_COMMAND_FILE_FLAG:=@COMPILER_COMMAND_FILE_FLAG@
35567754Smsmith
35699679Siwasaki# Option for specifying a file which saves the binder commands
35791116Smsmith# produced by the link step (for debugging, currently AIX only)
35891116SmsmithCOMPILER_BINDCMD_FILE_FLAG:=@COMPILER_BINDCMD_FILE_FLAG@
35991116Smsmith
36091116SmsmithCC_OUT_OPTION:=@CC_OUT_OPTION@
36191116SmsmithEXE_OUT_OPTION:=@EXE_OUT_OPTION@
36291116SmsmithLD_OUT_OPTION:=@LD_OUT_OPTION@
36391116SmsmithAR_OUT_OPTION:=@AR_OUT_OPTION@
36491116Smsmith
36591116Smsmith# Flags used for overriding the default opt setting for a C/C++ source file.
36691116SmsmithC_O_FLAG_HIGHEST_JVM:=@C_O_FLAG_HIGHEST_JVM@
36799679SiwasakiC_O_FLAG_HIGHEST:=@C_O_FLAG_HIGHEST@
36891116SmsmithC_O_FLAG_HI:=@C_O_FLAG_HI@
36991116SmsmithC_O_FLAG_NORM:=@C_O_FLAG_NORM@
37071867SmsmithC_O_FLAG_NONE:=@C_O_FLAG_NONE@
37171867SmsmithC_O_FLAG_SIZE:=@C_O_FLAG_SIZE@
37271867SmsmithCXX_O_FLAG_HIGHEST_JVM:=@CXX_O_FLAG_HIGHEST_JVM@
37391116SmsmithCXX_O_FLAG_HIGHEST:=@CXX_O_FLAG_HIGHEST@
37471867SmsmithCXX_O_FLAG_HI:=@CXX_O_FLAG_HI@
37591116SmsmithCXX_O_FLAG_NORM:=@CXX_O_FLAG_NORM@
37667754SmsmithCXX_O_FLAG_NONE:=@CXX_O_FLAG_NONE@
37767754SmsmithCXX_O_FLAG_SIZE:=@CXX_O_FLAG_SIZE@
37867754Smsmith
37991116SmsmithC_FLAG_DEPS:=@C_FLAG_DEPS@
38067754SmsmithCXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
38169746Smsmith
38267754SmsmithDISABLE_WARNING_PREFIX := @DISABLE_WARNING_PREFIX@
38367754SmsmithCFLAGS_WARNINGS_ARE_ERRORS:=@CFLAGS_WARNINGS_ARE_ERRORS@
38477424Smsmith
38569746Smsmith# A global flag (true or false) determining if native warnings are considered errors.
38669746SmsmithWARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@
38767754Smsmith
38869746SmsmithCFLAGS_CCACHE:=@CFLAGS_CCACHE@
38967754SmsmithCXXSTD_CXXFLAG=@CXXSTD_CXXFLAG@
39067754Smsmith
39177424Smsmith# Tools that potentially need to be cross compilation aware.
39267754SmsmithCC:=@FIXPATH@ @CCACHE@ @ICECC@ @CC@
39367754Smsmith
39467754Smsmith# CFLAGS used to compile the jdk native libraries (C-code)
39567754SmsmithCFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
39667754SmsmithCXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
39777424Smsmith
39877424Smsmith# CFLAGS used to compile the jdk native launchers (C-code)
39977424SmsmithCFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
40067754SmsmithCXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
40169746Smsmith
40267754SmsmithLDFLAGS_HASH_STYLE := @LDFLAGS_HASH_STYLE@
40367754Smsmith
40469746SmsmithJVM_CFLAGS := @JVM_CFLAGS@
40567754SmsmithJVM_CFLAGS_SYMBOLS := @JVM_CFLAGS_SYMBOLS@
40669746SmsmithJVM_LDFLAGS := @JVM_LDFLAGS@
40769746SmsmithJVM_ASFLAGS := @JVM_ASFLAGS@
40869746SmsmithJVM_LIBS := @JVM_LIBS@
40969746SmsmithJVM_RCFLAGS := @JVM_RCFLAGS@
41069746Smsmith
41169746Smsmith# Flags for zeroshark
41269746SmsmithLLVM_CFLAGS := @LLVM_CFLAGS@
41399679SiwasakiLLVM_LIBS := @LLVM_LIBS@
41477424SmsmithLLVM_LDFLAGS := @LLVM_LDFLAGS@
41567754Smsmith
41669746Smsmith# These flags might contain variables set by a custom extension that is included later.
41767754SmsmithEXTRA_CFLAGS = @EXTRA_CFLAGS@
41867754SmsmithEXTRA_CXXFLAGS = @EXTRA_CXXFLAGS@
41999679SiwasakiEXTRA_LDFLAGS = @EXTRA_LDFLAGS@
42099679Siwasaki
42199679SiwasakiCXX:=@FIXPATH@ @CCACHE@ @ICECC@ @CXX@
42299679Siwasaki
42369746SmsmithCPP:=@FIXPATH@ @CPP@
42467754Smsmith
42567754Smsmith# The linker can be gcc or ld on unix systems, or link.exe on windows systems.
42669746SmsmithLD:=@FIXPATH@ @LD@
42769746Smsmith
42869746Smsmith# Xcode SDK path
42977424SmsmithSDKROOT:=@SDKROOT@
43069746Smsmith
43169746Smsmith# The linker on older SuSE distros (e.g. on SLES 10) complains with:
43269746Smsmith# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
43369746Smsmith# if feeded with a version script which contains named tags.
43467754SmsmithUSING_BROKEN_SUSE_LD:=@USING_BROKEN_SUSE_LD@
435104470Siwasaki
436104470Siwasaki# LDFLAGS used to link the jdk native libraries (C-code)
437104470SiwasakiLDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
438104470SiwasakiJDKLIB_LIBS:=@JDKLIB_LIBS@
43969746Smsmith
44069746Smsmith# LDFLAGS used to link the jdk native launchers (C-code)
44169746SmsmithLDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
44269746SmsmithJDKEXE_LIBS:=@JDKEXE_LIBS@
44369746Smsmith
44469746Smsmith# LDFLAGS specific to C++ linking.
44569746SmsmithLDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@
44669746Smsmith
44769746Smsmith# Sometimes a different linker is needed for c++ libs
44867754SmsmithLDCXX:=@FIXPATH@ @LDCXX@
44967754Smsmith# The flags for linking libstdc++ linker.
45067754SmsmithLIBCXX:=@LIBCXX@
45167754Smsmith
45269746Smsmith# Compiler and linker flags used when building native tests
45367754SmsmithCFLAGS_TESTLIB:=@CFLAGS_TESTLIB@
45467754SmsmithCXXFLAGS_TESTLIB:=@CXXFLAGS_TESTLIB@
45567754SmsmithCFLAGS_TESTEXE:=@CFLAGS_TESTEXE@
45667754SmsmithCXXFLAGS_TESTEXE:=@CXXFLAGS_TESTEXE@
45767754SmsmithLDFLAGS_TESTLIB:=@LDFLAGS_TESTLIB@
45867754SmsmithLDFLAGS_TESTEXE:=@LDFLAGS_TESTEXE@
45969746Smsmith
46067754Smsmith# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
46167754Smsmith# build platform.
46267754SmsmithBUILD_CC:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CC@
46367754SmsmithBUILD_CXX:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CXX@
46467754SmsmithBUILD_LD:=@FIXPATH@ @BUILD_LD@
46567754SmsmithBUILD_LDCXX:=@FIXPATH@ @BUILD_LDCXX@
46669746SmsmithBUILD_AS:=@FIXPATH@ @BUILD_AS@
46767754SmsmithBUILD_AR:=@FIXPATH@ @BUILD_AR@
46867754SmsmithBUILD_NM:=@FIXPATH@ @BUILD_NM@
46969746SmsmithBUILD_OBJCOPY:=@BUILD_OBJCOPY@
47067754SmsmithBUILD_STRIP:=@BUILD_STRIP@
47167754SmsmithBUILD_SYSROOT_CFLAGS:=@BUILD_SYSROOT_CFLAGS@
47267754SmsmithBUILD_SYSROOT_LDFLAGS:=@BUILD_SYSROOT_LDFLAGS@
47369746Smsmith
47467754SmsmithAS:=@FIXPATH@ @AS@
47567754Smsmith
47667754Smsmith# AR is used to create a static library (is ar in unix, lib.exe in windows)
47767754SmsmithAR:=@FIXPATH@ @AR@
47867754SmsmithARFLAGS:=@ARFLAGS@
47967754Smsmith
48069746SmsmithNM:=@NM@
48169746SmsmithGNM:=@GNM@
48267754SmsmithSTRIP:=@STRIP@
48369746Smsmith
48469746SmsmithLIPO:=@LIPO@
48569746Smsmith
48669746Smsmith# Options to linker to specify a mapfile.
48769746Smsmith# (Note absence of := assignment, because we do not want to evaluate the macro body here)
48867754SmsmithSET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@
48967754Smsmith
49067754Smsmith# Options for C/CXX compiler to be used if linking is performed
49169746Smsmith#   using reorder file
49269746SmsmithC_FLAG_REORDER:=@C_FLAG_REORDER@
49369746SmsmithCXX_FLAG_REORDER:=@CXX_FLAG_REORDER@
49471867Smsmith
49571867Smsmith#
49671867Smsmith# Options for generating debug symbols
49771867SmsmithCOMPILE_WITH_DEBUG_SYMBOLS := @COMPILE_WITH_DEBUG_SYMBOLS@
49871867SmsmithCOPY_DEBUG_SYMBOLS := @COPY_DEBUG_SYMBOLS@
499104470SiwasakiZIP_EXTERNAL_DEBUG_SYMBOLS := @ZIP_EXTERNAL_DEBUG_SYMBOLS@
50071867Smsmith
501104470SiwasakiCFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@
50271867SmsmithCXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@
50371867Smsmith
50471867Smsmith#
50571867Smsmith# Compress (or not) jars
50691116SmsmithCOMPRESS_JARS=@COMPRESS_JARS@
50782367Smsmith
508104470Siwasaki# Options to linker to specify the library name.
50971867Smsmith# (Note absence of := assignment, because we do not want to evaluate the macro body here)
51071867SmsmithSET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@
51171867Smsmith
51271867SmsmithSHARED_LIBRARY_FLAGS=@SHARED_LIBRARY_FLAGS@
51371867Smsmith
51471867Smsmith# Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
515104470Siwasaki# (Note absence of := assignment, because we do not want to evaluate the macro body here)
516104470SiwasakiSET_SHARED_LIBRARY_ORIGIN=@SET_SHARED_LIBRARY_ORIGIN@
517104470SiwasakiSET_EXECUTABLE_ORIGIN=@SET_EXECUTABLE_ORIGIN@
518104470Siwasaki
519104470Siwasaki# Different OS:es have different ways of naming shared libraries.
520104470Siwasaki# The SHARED_LIBRARY macro takes "verify" as and argument and returns:
521104470Siwasaki#    "libverify.so" or "libverify.dylib" or "verify.dll" depending on platform.
522104470Siwasaki# (Note absence of := assignment, because we do not want to evaluate the macro body here)
523104470SiwasakiSHARED_LIBRARY=@SHARED_LIBRARY@
52471867SmsmithSTATIC_LIBRARY=@STATIC_LIBRARY@
52571867SmsmithLIBRARY_PREFIX:=@LIBRARY_PREFIX@
52671867SmsmithSHARED_LIBRARY_SUFFIX:=@SHARED_LIBRARY_SUFFIX@
52771867SmsmithSTATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@
52871867SmsmithEXE_SUFFIX:=@EXE_SUFFIX@
52971867SmsmithOBJ_SUFFIX:=@OBJ_SUFFIX@
53071867SmsmithSTATIC_BUILD:=@STATIC_BUILD@
53171867Smsmith
532104470SiwasakiSTRIPFLAGS:=@STRIPFLAGS@
53371867Smsmith
534104470SiwasakiJAVA_FLAGS:=@JAVA_FLAGS@
53571867SmsmithJAVA_FLAGS_BIG:=@JAVA_FLAGS_BIG@
53671867SmsmithJAVA_FLAGS_SMALL:=@JAVA_FLAGS_SMALL@
53771867SmsmithJAVA_FLAGS_JAVAC:=@JAVA_FLAGS_JAVAC@
53871867SmsmithJAVA_TOOL_FLAGS_SMALL:=@JAVA_TOOL_FLAGS_SMALL@
53991116SmsmithSJAVAC_SERVER_JAVA_FLAGS:=@SJAVAC_SERVER_JAVA_FLAGS@
54082367Smsmith
541104470Siwasaki# The *_CMD variables are defined separately to be easily overridden in bootcycle-spec.gmk
54271867Smsmith# for bootcycle-images build. Make sure to keep them in sync. Do not use the *_CMD
54371867Smsmith# versions of the variables directly.
54471867SmsmithJAVA_CMD:=@JAVA@
54571867SmsmithJAVAC_CMD:=@JAVAC@
54671867SmsmithJAVAH_CMD:=@JAVAH@
54771867SmsmithJAR_CMD:=@JAR@
548104470SiwasakiJLINK_CMD := @JLINK@
549104470SiwasakiJMOD_CMD := @JMOD@
550104470SiwasakiJARSIGNER_CMD:=@JARSIGNER@
551104470SiwasakiSJAVAC_SERVER_JAVA_CMD:=@SJAVAC_SERVER_JAVA@
552104470Siwasaki# These variables are meant to be used. They are defined with = instead of := to make
553104470Siwasaki# it possible to override only the *_CMD variables.
554104470SiwasakiJAVA=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
555104470SiwasakiJAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
556104470SiwasakiJAVA_JAVAC=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_JAVAC) $(JAVA_FLAGS)
55771867SmsmithJAVAC=@FIXPATH@ $(JAVAC_CMD)
55871867SmsmithJAVAH=@FIXPATH@ $(JAVAH_CMD)
55971867SmsmithJAR=@FIXPATH@ $(JAR_CMD)
56069746SmsmithJLINK = @FIXPATH@ $(JLINK_CMD) $(JAVA_TOOL_FLAGS_SMALL)
56167754SmsmithJMOD = @FIXPATH@ $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
56271867SmsmithJARSIGNER=@FIXPATH@ $(JARSIGNER_CMD)
56371867Smsmith# A specific java binary with specific options can be used to run
56471867Smsmith# the long running background sjavac servers and other long running tasks.
565104470SiwasakiSJAVAC_SERVER_JAVA=@FIXPATH@ @FIXPATH_DETACH_FLAG@ $(SJAVAC_SERVER_JAVA_CMD) \
56671867Smsmith    $(SJAVAC_SERVER_JAVA_FLAGS)
567104470Siwasaki
56871867Smsmith# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
56971867Smsmith# overriding that value by using ?=.
57071867SmsmithJAVAC_FLAGS?=@JAVAC_FLAGS@
57171867Smsmith
57291116Smsmith
57382367SmsmithBUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
574104470SiwasakiBUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
57567754Smsmith
57671867Smsmith# Use ?= as this can be overridden from bootcycle-spec.gmk
57771867SmsmithBOOT_JDK_MODULAR ?= @BOOT_JDK_MODULAR@
57871867Smsmith
57971867SmsmithINTERIM_LANGTOOLS_OVERRIDE_MODULES := java.compiler jdk.compiler \
58071867Smsmith    jdk.jdeps jdk.javadoc
581104470SiwasakiINTERIM_RMIC_OVERRIDE_MODULES := jdk.rmic
582104470Siwasakiifeq ($(BOOT_JDK_MODULAR), true)
583104470Siwasaki  INTERIM_LANGTOOLS_OVERRIDE_MODULES_ARGS = $(foreach m, \
584104470Siwasaki      $(INTERIM_LANGTOOLS_OVERRIDE_MODULES), \
585104470Siwasaki      --patch-module $m=$(BUILDTOOLS_OUTPUTDIR)/override_modules/$m)
586104470Siwasaki  INTERIM_RMIC_OVERRIDE_MODULES_ARGS = $(foreach m, \
587104470Siwasaki      $(INTERIM_LANGTOOLS_OVERRIDE_MODULES) \
588104470Siwasaki      $(INTERIM_RMIC_OVERRIDE_MODULES), \
589104470Siwasaki      --patch-module $m=$(BUILDTOOLS_OUTPUTDIR)/override_modules/$m)
59071867Smsmith  INTERIM_LANGTOOLS_ARGS = $(INTERIM_LANGTOOLS_OVERRIDE_MODULES_ARGS)
59171867Smsmith  JAVAC_MAIN_CLASS = -m jdk.compiler/com.sun.tools.javac.Main
59271867Smsmith  JAVADOC_MAIN_CLASS = -m jdk.javadoc/jdk.javadoc.internal.tool.Main
59371867Smsmithelse
59471867Smsmith  INTERIM_LANGTOOLS_OVERRIDE_MODULES_ARGS = \
59571867Smsmith      -Xbootclasspath/p:$(call PathList, \
59671867Smsmith          $(addprefix $(BUILDTOOLS_OUTPUTDIR)/override_modules/, \
597104470Siwasaki              $(INTERIM_LANGTOOLS_OVERRIDE_MODULES)))
59867754Smsmith  INTERIM_RMIC_OVERRIDE_MODULES_ARGS = \
59991116Smsmith      -Xbootclasspath/p:$(call PathList, \
60091116Smsmith          $(addprefix $(BUILDTOOLS_OUTPUTDIR)/override_modules/, \
60191116Smsmith              $(INTERIM_LANGTOOLS_OVERRIDE_MODULES) \
60291116Smsmith              $(INTERIM_RMIC_OVERRIDE_MODULES)))
60391116Smsmith  INTERIM_LANGTOOLS_ARGS = $(INTERIM_LANGTOOLS_OVERRIDE_MODULES_ARGS) \
60491116Smsmith      -cp $(BUILDTOOLS_OUTPUTDIR)/override_modules/jdk.compiler
60591116Smsmith  JAVAC_MAIN_CLASS = com.sun.tools.javac.Main
60691116Smsmith  JAVADOC_MAIN_CLASS = jdk.javadoc.internal.tool.Main
60791116Smsmithendif
60882367Smsmith# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...
609104470Siwasaki# Use = assignment to be able to override in bootcycle-spec.gmk
61067754SmsmithNEW_JAVAC   = $(INTERIM_LANGTOOLS_ARGS) $(JAVAC_MAIN_CLASS)
61169746SmsmithNEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS)
61267754Smsmith
61369746SmsmithJLINK_KEEP_PACKAGED_MODULES:=@JLINK_KEEP_PACKAGED_MODULES@
61467754Smsmith
61567754Smsmith# Base flags for RC
61667754Smsmith# Guarding this against resetting value. Legacy make files include spec multiple
61767754Smsmith# times.
61867754Smsmithifndef RC_FLAGS
619104470Siwasaki  RC_FLAGS:=@RC_FLAGS@
62067754Smsmithendif
62191116Smsmith
62291116Smsmith# Tools adhering to a minimal and common standard of posix compliance.
62367754SmsmithAWK:=@AWK@
624104470SiwasakiBASENAME:=@BASENAME@
62567754SmsmithCAT:=@CAT@
62691116SmsmithCCACHE:=@CCACHE@
62791116Smsmith# CD is going away, but remains to cater for legacy makefiles.
62891116SmsmithCD:=cd
629104470SiwasakiCHMOD:=@CHMOD@
63091116SmsmithCODESIGN:=@CODESIGN@
63191116SmsmithCOMM:=@COMM@
63291116SmsmithCP:=@CP@
63391116SmsmithCPIO:=@CPIO@
63491116SmsmithCUT:=@CUT@
63591116SmsmithDATE:=@DATE@
63691116SmsmithDIFF:=@DIFF@
637104470SiwasakiDIRNAME:=@DIRNAME@
63891116SmsmithDSYMUTIL:=@DSYMUTIL@
63991116SmsmithFIND:=@FIND@
64091116SmsmithFIND_DELETE:=@FIND_DELETE@
64169746SmsmithFLOCK:=@FLOCK@
64267754SmsmithECHO:=@ECHO@
64367754SmsmithEGREP:=@EGREP@
64467754SmsmithFGREP:=@FGREP@
64567754SmsmithGREP:=@GREP@
64677424SmsmithGZIP:=@GZIP@
64767754SmsmithHEAD:=@HEAD@
648104470SiwasakiLS:=@LS@
64967754SmsmithLN:=@LN@
65091116SmsmithMKDIR:=@MKDIR@
65191116SmsmithMV:=@MV@
65291116SmsmithNAWK:=@NAWK@
65391116SmsmithNICE:=@NICE@
65491116SmsmithPANDOC:=@FIXPATH@ @PANDOC@
65591116SmsmithPATCH:=@PATCH@
65691116SmsmithPRINTF:=@PRINTF@
65791116SmsmithRM:=@RM@
65891116SmsmithRMDIR:=@RMDIR@
65991116SmsmithSED:=@SED@
660104470SiwasakiSH:=@SH@
66169746SmsmithSORT:=@SORT@
66269746SmsmithTAR:=@TAR@
66367754SmsmithTAIL:=@TAIL@
66469746SmsmithTEE:=@TEE@
66567754SmsmithTIME:=@TIME@
66667754SmsmithIS_GNU_TIME:=@IS_GNU_TIME@
66769746SmsmithTR:=@TR@
66867754SmsmithTOUCH:=@TOUCH@
66969746SmsmithUNIQ:=@UNIQ@
67069746SmsmithWC:=@WC@
67182367SmsmithXARGS:=@XARGS@
672104470SiwasakiZIPEXE:=@ZIPEXE@
67367754SmsmithUNZIP:=@UNZIP@
67467754SmsmithMT:=@FIXPATH@ @MT@
67569746SmsmithRC:=@FIXPATH@ @RC@
67669746SmsmithDUMPBIN:=@FIXPATH@ @DUMPBIN@
67767754SmsmithCYGPATH:=@CYGPATH@
67870243SmsmithLDD:=@LDD@
67969746SmsmithOTOOL:=@OTOOL@
68069746SmsmithREADELF:=@READELF@
68169746SmsmithEXPR:=@EXPR@
68277424SmsmithFILE:=@FILE@
68399679SiwasakiDOT:=@DOT@
68469746SmsmithHG:=@HG@
68569746SmsmithOBJCOPY:=@OBJCOPY@
68669746SmsmithSETFILE:=@SETFILE@
68769746SmsmithXATTR:=@XATTR@
68869746SmsmithJT_HOME:=@JT_HOME@
68969746SmsmithJTREGEXE:=@JTREGEXE@
69067754SmsmithXCODEBUILD=@XCODEBUILD@
69167754SmsmithDTRACE := @DTRACE@
69269746SmsmithFIXPATH:=@FIXPATH@
69367754Smsmith
69467754SmsmithTAR_TYPE:=@TAR_TYPE@
69567754SmsmithTAR_CREATE_EXTRA_PARAM:=@TAR_CREATE_EXTRA_PARAM@
69667754SmsmithTAR_INCLUDE_PARAM:=@TAR_INCLUDE_PARAM@
69767754SmsmithTAR_SUPPORTS_TRANSFORM:=@TAR_SUPPORTS_TRANSFORM@
69867754Smsmith
69967754Smsmith# Build setup
70067754SmsmithENABLE_AOT:=@ENABLE_AOT@
70169746SmsmithENABLE_INTREE_EC:=@ENABLE_INTREE_EC@
70267754SmsmithUSE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
70367754SmsmithUSE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
70467754SmsmithUSE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
705LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
706MSVCR_DLL:=@MSVCR_DLL@
707MSVCP_DLL:=@MSVCP_DLL@
708STLPORT_LIB:=@STLPORT_LIB@
709
710####################################################
711#
712# INSTALLATION
713#
714
715# Common prefix for all installed files. Defaults to /usr/local,
716# but /opt/myjdk is another common version.
717INSTALL_PREFIX=@prefix@
718
719# Directories containing architecture-dependent files should be relative to exec_prefix
720INSTALL_EXECPREFIX=@exec_prefix@
721
722# java,javac,javah,javap etc are installed here.
723INSTALL_BINDIR=@bindir@
724
725# Read only architecture-independent data
726INSTALL_DATADIR=@datadir@
727
728# Root of above.
729INSTALL_DATAROOTDIR=@datarootdir@
730
731# Doc files, other than info and man.
732INSTALL_DOCDIR=@docdir@
733
734# Html documentation
735INSTALL_HTMLDIR=@htmldir@
736
737# Installing C header files, JNI headers for example.
738INSTALL_INCLUDEDIR=@includedir@
739
740# Installing library files....
741INSTALL_INCLUDEDIR=@libdir@
742
743# Executables that other programs run.
744INSTALL_LIBEXECDIR=@libexecdir@
745
746# Locale-dependent but architecture-independent data, such as message catalogs.
747INSTALL_LOCALEDIR=@localedir@
748
749# Modifiable single-machine data
750INSTALL_LOCALSTATEDIR=@localstatedir@
751
752# Man pages
753INSTALL_MANDIR=@mandir@
754
755# Modifiable architecture-independent data.
756INSTALL_SHAREDSTATEDIR=@sharedstatedir@
757
758# Read-only single-machine data
759INSTALL_SYSCONFDIR=@sysconfdir@
760
761####################################################
762#
763# Libraries
764#
765
766USE_EXTERNAL_LCMS:=@USE_EXTERNAL_LCMS@
767LCMS_CFLAGS:=@LCMS_CFLAGS@
768LCMS_LIBS:=@LCMS_LIBS@
769
770USE_EXTERNAL_LIBPNG:=@USE_EXTERNAL_LIBPNG@
771PNG_LIBS:=@PNG_LIBS@
772PNG_CFLAGS:=@PNG_CFLAGS@
773
774ELF_CFLAGS:=@ELF_CFLAGS@
775ELF_LIBS:=@ELF_LIBS@
776
777####################################################
778#
779# Misc
780#
781
782INCLUDE_SA=@INCLUDE_SA@
783INCLUDE_GRAAL=@INCLUDE_GRAAL@
784
785OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
786OS_VERSION_MINOR:=@OS_VERSION_MINOR@
787OS_VERSION_MICRO:=@OS_VERSION_MICRO@
788
789# Images directory definitions
790JDK_IMAGE_SUBDIR:=jdk
791JRE_IMAGE_SUBDIR:=jre
792JRE_COMPACT1_IMAGE_SUBDIR := jre-compact1
793JRE_COMPACT2_IMAGE_SUBDIR := jre-compact2
794JRE_COMPACT3_IMAGE_SUBDIR := jre-compact3
795
796# Colon left out to be able to override output dir for bootcycle-images
797JDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
798JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
799
800JRE_COMPACT1_IMAGE_DIR := $(IMAGES_OUTPUTDIR)/$(JRE_COMPACT1_IMAGE_SUBDIR)
801JRE_COMPACT2_IMAGE_DIR := $(IMAGES_OUTPUTDIR)/$(JRE_COMPACT2_IMAGE_SUBDIR)
802JRE_COMPACT3_IMAGE_DIR := $(IMAGES_OUTPUTDIR)/$(JRE_COMPACT3_IMAGE_SUBDIR)
803
804# Test image, as above
805TEST_IMAGE_SUBDIR:=test
806TEST_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(TEST_IMAGE_SUBDIR)
807
808# Symbols image
809SYMBOLS_IMAGE_SUBDIR:=symbols
810SYMBOLS_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(SYMBOLS_IMAGE_SUBDIR)
811
812# Interim image
813INTERIM_JMODS_DIR := $(SUPPORT_OUTPUTDIR)/interim-jmods
814INTERIM_IMAGE_DIR := $(SUPPORT_OUTPUTDIR)/interim-image
815
816# Docs image
817DOCS_IMAGE_SUBDIR := docs
818DOCS_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(DOCS_IMAGE_SUBDIR)
819# Output docs directly into image
820DOCS_OUTPUTDIR := $(DOCS_IMAGE_DIR)
821
822# Macosx bundles directory definitions
823JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle
824JRE_MACOSX_BUNDLE_SUBDIR=jre-bundle
825JDK_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR)
826JRE_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR)
827JDK_MACOSX_CONTENTS_SUBDIR=jdk-$(VERSION_NUMBER).jdk/Contents
828JRE_MACOSX_CONTENTS_SUBDIR=jre-$(VERSION_NUMBER).jre/Contents
829JDK_MACOSX_CONTENTS_DIR=$(JDK_MACOSX_BUNDLE_DIR)/$(JDK_MACOSX_CONTENTS_SUBDIR)
830JRE_MACOSX_CONTENTS_DIR=$(JRE_MACOSX_BUNDLE_DIR)/$(JRE_MACOSX_CONTENTS_SUBDIR)
831
832# Bundle names
833BASE_NAME := $(VERSION_SHORT)+$(VERSION_BUILD)_$(OPENJDK_TARGET_BUNDLE_PLATFORM)
834ifeq ($(DEBUG_LEVEL), fastdebug)
835  DEBUG_PART := -debug
836else ifneq ($(DEBUG_LEVEL), release)
837  DEBUG_PART := -$(DEBUG_LEVEL)
838endif
839JDK_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART).tar.gz
840JRE_BUNDLE_NAME := jre-$(BASE_NAME)_bin$(DEBUG_PART).tar.gz
841JRE_COMPACT1_BUNDLE_NAME := \
842    jre-$(VERSION_SHORT)+$(VERSION_BUILD)-compact1_$(OPENJDK_TARGET_BUNDLE_PLATFORM)_bin$(DEBUG_PART).tar.gz
843JRE_COMPACT2_BUNDLE_NAME := \
844    jre-$(VERSION_SHORT)+$(VERSION_BUILD)-compact2_$(OPENJDK_TARGET_BUNDLE_PLATFORM)_bin$(DEBUG_PART).tar.gz
845JRE_COMPACT3_BUNDLE_NAME := \
846    jre-$(VERSION_SHORT)+$(VERSION_BUILD)-compact3_$(OPENJDK_TARGET_BUNDLE_PLATFORM)_bin$(DEBUG_PART).tar.gz
847JDK_SYMBOLS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
848JRE_SYMBOLS_BUNDLE_NAME := jre-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
849TEST_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz
850DOCS_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
851
852JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_BUNDLE_NAME)
853JRE_BUNDLE :=  $(BUNDLES_OUTPUTDIR)/$(JRE_BUNDLE_NAME)
854JDK_SYMBOLS_BUNDLE :=  $(BUNDLES_OUTPUTDIR)/$(JDK_SYMBOLS_BUNDLE_NAME)
855JRE_SYMBOLS_BUNDLE :=  $(BUNDLES_OUTPUTDIR)/$(JRE_SYMBOLS_BUNDLE_NAME)
856TEST_BUNDLE :=  $(BUNDLES_OUTPUTDIR)/$(TEST_BUNDLE_NAME)
857DOCS_BUNDLE :=  $(BUNDLES_OUTPUTDIR)/$(DOCS_BUNDLE_NAME)
858
859# This macro is called to allow inclusion of closed source counterparts.
860# Unless overridden in closed sources, it expands to nothing.
861# Usage: This function is called in an open makefile, with the following
862# arguments:
863# $1 the name of the repo, or empty if the top-level repo.
864# $2 the name of the makefile
865define IncludeCustomExtension
866endef
867
868# Include the custom-spec.gmk file if it exists
869-include $(dir @SPEC@)/custom-spec.gmk
870