spec.gmk.in revision 1480:cfd05cc6c27b
1219820Sjeff# 2219820Sjeff# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. 3219820Sjeff# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4219820Sjeff# 5219820Sjeff# This code is free software; you can redistribute it and/or modify it 6219820Sjeff# under the terms of the GNU General Public License version 2 only, as 7219820Sjeff# published by the Free Software Foundation. Oracle designates this 8219820Sjeff# particular file as subject to the "Classpath" exception as provided 9219820Sjeff# by Oracle in the LICENSE file that accompanied this code. 10219820Sjeff# 11219820Sjeff# This code is distributed in the hope that it will be useful, but WITHOUT 12219820Sjeff# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13219820Sjeff# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14219820Sjeff# version 2 for more details (a copy is included in the LICENSE file that 15219820Sjeff# accompanied this code). 16219820Sjeff# 17219820Sjeff# You should have received a copy of the GNU General Public License version 18219820Sjeff# 2 along with this work; if not, write to the Free Software Foundation, 19219820Sjeff# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20219820Sjeff# 21219820Sjeff# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22219820Sjeff# or visit www.oracle.com if you need additional information or have any 23219820Sjeff# questions. 24219820Sjeff# 25219820Sjeff 26219820Sjeff# Configured @DATE_WHEN_CONFIGURED@ to build 27219820Sjeff# for target system @OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU@ 28219820Sjeff# (called @OPENJDK_TARGET_AUTOCONF_NAME@ by autoconf) 29219820Sjeff# on build system @OPENJDK_BUILD_OS@-@OPENJDK_BUILD_CPU@ 30219820Sjeff# (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf) 31219820Sjeff# using 'configure @CONFIGURE_COMMAND_LINE@' 32219820Sjeff 33219820Sjeff# When calling macros, the spaces between arguments are 34219820Sjeff# often semantically important! Sometimes we need to subst 35219820Sjeff# spaces and commas, therefore we need the following macros. 36219820SjeffX:= 37219820SjeffSPACE:=$(X) $(X) 38219820SjeffCOMMA:=, 39219820SjeffDOLLAR:=$$ 40219820SjeffHASH:=\# 41219820SjeffLEFT_PAREN:=( 42219820SjeffRIGHT_PAREN:=) 43219820SjeffSQUOTE:=' 44219820Sjeff#' 45219820SjeffDQUOTE:=" 46219820Sjeff#" 47219820Sjeffdefine NEWLINE 48219820Sjeff 49219820Sjeff 50219820Sjeffendef 51219820Sjeff 52219820Sjeff# The command line given to configure. 53219820SjeffCONFIGURE_COMMAND_LINE:=@CONFIGURE_COMMAND_LINE@ 54219820Sjeff 55219820Sjeff# A self-referential reference to this file. 56219820SjeffSPEC:=@SPEC@ 57219820Sjeff 58219820Sjeff# What make to use for main processing, after bootstrapping top-level Makefile. 59219820SjeffMAKE := @MAKE@ 60219820Sjeff 61219820Sjeff# The default make arguments 62219820SjeffMAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \ 63219820Sjeff MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" LOG_LEVEL=$(LOG_LEVEL) 64219820Sjeff 65219820SjeffOUTPUT_SYNC_SUPPORTED:=@OUTPUT_SYNC_SUPPORTED@ 66219820SjeffOUTPUT_SYNC:=@OUTPUT_SYNC@ 67219820Sjeff 68219820Sjeff# Override the shell with bash 69219820SjeffBASH:=@BASH@ 70219820SjeffBASH_ARGS:=@BASH_ARGS@ 71219820SjeffSHELL:=$(BASH) $(BASH_ARGS) 72219820Sjeff 73219820Sjeff# The "human readable" name of this configuration 74219820SjeffCONF_NAME:=@CONF_NAME@ 75219820Sjeff 76219820Sjeff# The built jdk will run in this target system. 77219820SjeffOPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@ 78219820SjeffOPENJDK_TARGET_OS_TYPE:=@OPENJDK_TARGET_OS_TYPE@ 79219820SjeffOPENJDK_TARGET_OS_ENV:=@OPENJDK_TARGET_OS_ENV@ 80219820Sjeff 81219820SjeffOPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@ 82219820SjeffOPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@ 83219820SjeffOPENJDK_TARGET_CPU_BITS:=@OPENJDK_TARGET_CPU_BITS@ 84219820SjeffOPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@ 85219820Sjeff 86219820SjeffCOMPILE_TYPE:=@COMPILE_TYPE@ 87219820Sjeff 88219820Sjeff# Legacy support 89219820SjeffOPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@ 90219820SjeffOPENJDK_TARGET_CPU_LIBDIR:=@OPENJDK_TARGET_CPU_LIBDIR@ 91219820SjeffOPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@ 92219820SjeffOPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@ 93219820SjeffOPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@ 94219820SjeffOPENJDK_TARGET_CPU_JLI_CFLAGS:=@OPENJDK_TARGET_CPU_JLI_CFLAGS@ 95219820SjeffOPENJDK_TARGET_OS_EXPORT_DIR:=@OPENJDK_TARGET_OS_EXPORT_DIR@ 96219820Sjeff 97219820Sjeff# We are building on this build system. 98219820Sjeff# When not cross-compiling, it is the same as the target. 99219820SjeffOPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@ 100219820SjeffOPENJDK_BUILD_OS_TYPE:=@OPENJDK_BUILD_OS_TYPE@ 101219820SjeffOPENJDK_BUILD_OS_ENV:=@OPENJDK_BUILD_OS_ENV@ 102219820Sjeff 103219820SjeffOPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@ 104219820SjeffOPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@ 105219820SjeffOPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@ 106219820SjeffOPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@ 107219820Sjeff 108219820Sjeff# Legacy OS values for use in release file. 109219820SjeffREQUIRED_OS_NAME:=@REQUIRED_OS_NAME@ 110219820SjeffREQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@ 111219820Sjeff 112219820Sjeff@SET_OPENJDK@ 113219820SjeffLIBM:=-lm 114219820SjeffLIBDL:=@LIBDL@ 115219820Sjeff 116219820Sjeff# colon or semicolon 117219820SjeffPATH_SEP:=@PATH_SEP@ 118219820Sjeff 119219820Sjeff# Save the original path before replacing it with the Visual Studio tools 120219820SjeffORIGINAL_PATH:=@ORIGINAL_PATH@ 121219820Sjeffifeq ($(OPENJDK_TARGET_OS), windows) 122219820Sjeff # On Windows, the Visual Studio toolchain needs the PATH to be adjusted 123219820Sjeff # to include Visual Studio tools (this needs to be in cygwin/msys style). 124219820Sjeff export PATH:=@VS_PATH@ 125219820Sjeffendif 126219820Sjeff 127219820SjeffSYSROOT_CFLAGS := @SYSROOT_CFLAGS@ 128219820SjeffSYSROOT_LDFLAGS := @SYSROOT_LDFLAGS@ 129219820Sjeff 130219820Sjeff# Paths to the source code 131219820SjeffADD_SRC_ROOT:=@ADD_SRC_ROOT@ 132219820SjeffOVERRIDE_SRC_ROOT:=@OVERRIDE_SRC_ROOT@ 133219820Sjeff 134219820Sjeff# The top-level directory of the forest (SRC_ROOT is a traditional alias) 135219820SjeffTOPDIR:=@TOPDIR@ 136219820Sjeff# These two versions of TOPDIR are used in string comparisons 137219820SjeffORIGINAL_TOPDIR:=@ORIGINAL_TOPDIR@ 138219820SjeffCANONICAL_TOPDIR:=@CANONICAL_TOPDIR@ 139219820SjeffSRC_ROOT:=@TOPDIR@ 140219820Sjeff 141219820SjeffOUTPUT_ROOT:=@OUTPUT_ROOT@ 142219820SjeffJDK_TOPDIR:=@JDK_TOPDIR@ 143219820SjeffLANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@ 144219820SjeffCORBA_TOPDIR:=@CORBA_TOPDIR@ 145219820SjeffJAXP_TOPDIR:=@JAXP_TOPDIR@ 146219820SjeffJAXWS_TOPDIR:=@JAXWS_TOPDIR@ 147219820SjeffHOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@ 148219820SjeffNASHORN_TOPDIR:=@NASHORN_TOPDIR@ 149219820SjeffCOPYRIGHT_YEAR:=@COPYRIGHT_YEAR@ 150219820Sjeff 151219820Sjeff# Information gathered from the version.numbers file. 152219820SjeffJDK_MAJOR_VERSION:=@JDK_MAJOR_VERSION@ 153219820SjeffJDK_MINOR_VERSION:=@JDK_MINOR_VERSION@ 154219820SjeffJDK_MICRO_VERSION:=@JDK_MICRO_VERSION@ 155219820SjeffJDK_UPDATE_VERSION:=@JDK_UPDATE_VERSION@ 156219820SjeffJDK_BUILD_NUMBER:=@JDK_BUILD_NUMBER@ 157219820SjeffMILESTONE:=@MILESTONE@ 158219820SjeffLAUNCHER_NAME:=@LAUNCHER_NAME@ 159219820SjeffPRODUCT_NAME:=@PRODUCT_NAME@ 160219820SjeffPRODUCT_SUFFIX:=@PRODUCT_SUFFIX@ 161219820SjeffJDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@ 162219820SjeffCOMPANY_NAME:=@COMPANY_NAME@ 163219820SjeffMACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@ 164219820SjeffMACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@ 165219820SjeffUSER_RELEASE_SUFFIX=@USER_RELEASE_SUFFIX@ 166219820Sjeff 167219820Sjeff# Different version strings generated from the above information. 168219820SjeffJDK_VERSION:=@JDK_VERSION@ 169219820SjeffRUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX) 170219820SjeffCOOKED_BUILD_NUMBER:=@COOKED_BUILD_NUMBER@ 171219820Sjeff# These variables need to be generated here so that MILESTONE and 172219820Sjeff# JDK_BUILD_NUMBER can be overridden on the make command line. 173219820Sjeffifeq ($(MILESTONE), fcs) 174219820Sjeff RELEASE=$(JDK_VERSION)$(BUILD_VARIANT_RELEASE) 175219820Sjeffelse 176219820Sjeff RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE) 177219820Sjeffendif 178219820Sjeff 179219820Sjeffifneq ($(USER_RELEASE_SUFFIX), ) 180219820Sjeff FULL_VERSION=$(RELEASE)-$(USER_RELEASE_SUFFIX)-$(JDK_BUILD_NUMBER) 181219820Sjeffelse 182219820Sjeff FULL_VERSION=$(RELEASE)-$(JDK_BUILD_NUMBER) 183219820Sjeffendif 184219820SjeffJRE_RELEASE_VERSION:=$(FULL_VERSION) 185219820SjeffJDK_VERSION_FOR_MANIFEST := $(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(if $(JDK_UPDATE_VERSION),$(JDK_UPDATE_VERSION),0).$(COOKED_BUILD_NUMBER) 186219820Sjeff 187219820Sjeff# How to compile the code: release, fastdebug or slowdebug 188219820SjeffDEBUG_LEVEL:=@DEBUG_LEVEL@ 189219820Sjeff 190219820Sjeff# This is the JDK variant to build. 191219820Sjeff# The JDK variant is a name for a specific set of modules to be compiled for the JDK. 192219820SjeffJDK_VARIANT:=@JDK_VARIANT@ 193219820Sjeff 194219820Sjeff# Should we compile support for running with a graphical UI? (ie headful) 195219820Sjeff# Should we compile support for running without? (ie headless) 196219820SjeffSUPPORT_HEADFUL:=@SUPPORT_HEADFUL@ 197219820SjeffSUPPORT_HEADLESS:=@SUPPORT_HEADLESS@ 198219820Sjeff# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options. 199219820Sjeff@BUILD_HEADLESS@ 200219820Sjeff 201219820Sjeff# These are the libjvms that we want to build. 202219820Sjeff# The java launcher uses the default. 203219820Sjeff# The others can be selected by specifying -client -server -minimal1 -kernel -zero or -zeroshark 204219820Sjeff# on the java launcher command line. 205219820SjeffJVM_VARIANTS:=@JVM_VARIANTS@ 206219820SjeffJVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@ 207219820SjeffJVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@ 208219820SjeffJVM_VARIANT_MINIMAL1:=@JVM_VARIANT_MINIMAL1@ 209219820SjeffJVM_VARIANT_KERNEL:=@JVM_VARIANT_KERNEL@ 210219820SjeffJVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@ 211219820SjeffJVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@ 212219820SjeffJVM_VARIANT_CORE:=@JVM_VARIANT_CORE@ 213219820Sjeff 214219820Sjeff# Universal binaries on macosx 215219820SjeffMACOSX_UNIVERSAL=@MACOSX_UNIVERSAL@ 216219820Sjeff 217219820Sjeff# Legacy setting: -debug or -fastdebug 218219820Sjeff# Still used in version string... 219219820SjeffBUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@ 220219820Sjeff 221219820Sjeff# JDK_OUTPUTDIR specifies where a working jvm is built. 222219820Sjeff# You can run $(JDK_OUTPUTDIR)/bin/java 223219820Sjeff# Though the layout of the contents of $(JDK_OUTPUTDIR) is not 224219820Sjeff# yet the same as a default installation. 225219820Sjeff# 226219820Sjeff# When you run "make install" it will create the standardized 227219820Sjeff# layout for the jdk and the jre inside the IMAGES_OUTPUTDIR subdir. 228219820Sjeff# Then it will copy the contents of the jdk into the installation 229219820Sjeff# directory. 230219820Sjeff 231219820SjeffBUILD_OUTPUT:=@BUILD_OUTPUT@ 232219820Sjeff# Colon left out to be able to override IMAGES_OUTPUTDIR for bootcycle-images 233219820SjeffSUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/support 234219820SjeffBUILDTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/buildtools 235219820Sjeff 236219820SjeffHOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot 237219820SjeffJDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk 238219820SjeffIMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images 239219820SjeffTESTMAKE_OUTPUTDIR=$(BUILD_OUTPUT)/test-make 240219820SjeffMAKESUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/make-support 241219820Sjeff# This does not get overridden in a bootcycle build 242219820SjeffCONFIGURESUPPORT_OUTPUTDIR:=@CONFIGURESUPPORT_OUTPUTDIR@ 243219820Sjeff 244219820SjeffHOTSPOT_DIST=@HOTSPOT_DIST@ 245219820Sjeff 246219820SjeffBUILD_HOTSPOT=@BUILD_HOTSPOT@ 247219820Sjeff 248219820Sjeff# The boot jdk to use. This is overridden in bootcycle-spec.gmk. Make sure to keep 249219820Sjeff# it in sync. 250219820SjeffBOOT_JDK:=@BOOT_JDK@ 251219820Sjeff 252219820Sjeff# When compiling Java source to be run by the boot jdk 253219820Sjeff# use these extra flags, eg -source 6 -target 6 254219820SjeffBOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@ 255219820Sjeff 256219820Sjeff# Information about the build system 257219820SjeffNUM_CORES:=@NUM_CORES@ 258219820SjeffMEMORY_SIZE:=@MEMORY_SIZE@ 259219820Sjeff# Enable sjavac support = use a javac server, 260219820Sjeff# multi core javac compilation and dependency tracking. 261219820SjeffENABLE_SJAVAC:=@ENABLE_SJAVAC@ 262219820Sjeff# Store sjavac server synchronization files here, and 263219820Sjeff# the sjavac server log files. 264219820SjeffSJAVAC_SERVER_DIR=$(MAKESUPPORT_OUTPUTDIR)/javacservers 265219820Sjeff 266219820Sjeff# Number of parallel jobs to use for compilation 267219820SjeffJOBS?=@JOBS@ 268219820Sjeff 269219820SjeffFREETYPE_LIBS:=@FREETYPE_LIBS@ 270219820SjeffFREETYPE_CFLAGS:=@FREETYPE_CFLAGS@ 271219820SjeffFREETYPE_BUNDLE_LIB_PATH=@FREETYPE_BUNDLE_LIB_PATH@ 272219820SjeffCUPS_CFLAGS:=@CUPS_CFLAGS@ 273219820SjeffALSA_LIBS:=@ALSA_LIBS@ 274219820SjeffALSA_CFLAGS:=@ALSA_CFLAGS@ 275219820Sjeff 276219820SjeffPACKAGE_PATH=@PACKAGE_PATH@ 277219820Sjeff 278219820Sjeff# Source file for cacerts 279219820SjeffCACERTS_FILE=@CACERTS_FILE@ 280219820Sjeff 281219820Sjeff# Enable unlimited crypto policy 282219820SjeffUNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@ 283219820Sjeff 284219820Sjeff# Enable RMIConnector IIOP transport 285219820SjeffRMICONNECTOR_IIOP=@RMICONNECTOR_IIOP@ 286219820Sjeff 287219820SjeffGCOV_ENABLED=@GCOV_ENABLED@ 288219820Sjeff 289219820Sjeff# Necessary additional compiler flags to compile X11 290219820SjeffX_CFLAGS:=@X_CFLAGS@ 291219820SjeffX_LIBS:=@X_LIBS@ 292219820Sjeff 293219820Sjeff# The lowest required version of macosx to enforce compatiblity for 294219820SjeffMACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@ 295219820Sjeff 296219820Sjeff# Toolchain type: gcc, clang, solstudio, lxc, microsoft... 297219820SjeffTOOLCHAIN_TYPE:=@TOOLCHAIN_TYPE@ 298219820Sjeff 299219820Sjeff# Option used to tell the compiler whether to create 32- or 64-bit executables 300219820SjeffCOMPILER_TARGET_BITS_FLAG:=@COMPILER_TARGET_BITS_FLAG@ 301219820SjeffCOMPILER_SUPPORTS_TARGET_BITS_FLAG=@COMPILER_SUPPORTS_TARGET_BITS_FLAG@ 302219820Sjeff 303219820SjeffCC_OUT_OPTION:=@CC_OUT_OPTION@ 304219820SjeffEXE_OUT_OPTION:=@EXE_OUT_OPTION@ 305219820SjeffLD_OUT_OPTION:=@LD_OUT_OPTION@ 306219820SjeffAR_OUT_OPTION:=@AR_OUT_OPTION@ 307219820Sjeff 308219820Sjeff# Flags used for overriding the default opt setting for a C/C++ source file. 309219820SjeffC_O_FLAG_HIGHEST:=@C_O_FLAG_HIGHEST@ 310219820SjeffC_O_FLAG_HI:=@C_O_FLAG_HI@ 311219820SjeffC_O_FLAG_NORM:=@C_O_FLAG_NORM@ 312219820SjeffC_O_FLAG_NONE:=@C_O_FLAG_NONE@ 313219820SjeffCXX_O_FLAG_HIGHEST:=@CXX_O_FLAG_HIGHEST@ 314219820SjeffCXX_O_FLAG_HI:=@CXX_O_FLAG_HI@ 315219820SjeffCXX_O_FLAG_NORM:=@CXX_O_FLAG_NORM@ 316219820SjeffCXX_O_FLAG_NONE:=@CXX_O_FLAG_NONE@ 317219820Sjeff 318219820SjeffC_FLAG_DEPS:=@C_FLAG_DEPS@ 319219820SjeffCXX_FLAG_DEPS:=@CXX_FLAG_DEPS@ 320219820Sjeff 321219820SjeffDISABLE_WARNING_PREFIX := @DISABLE_WARNING_PREFIX@ 322219820SjeffCFLAGS_WARNINGS_ARE_ERRORS:=@CFLAGS_WARNINGS_ARE_ERRORS@ 323219820Sjeff 324219820Sjeff# A global flag (true or false) determining if native warnings are considered errors. 325219820SjeffWARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@ 326219820Sjeff 327219820SjeffCFLAGS_CCACHE:=@CFLAGS_CCACHE@ 328219820Sjeff 329219820Sjeff# Tools that potentially need to be cross compilation aware. 330219820SjeffCC:=@FIXPATH@ @CCACHE@ @CC@ 331219820Sjeff 332219820Sjeff# CFLAGS used to compile the jdk native libraries (C-code) 333219820SjeffCFLAGS_JDKLIB:=@CFLAGS_JDKLIB@ 334219820SjeffCXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@ 335219820Sjeff 336219820Sjeff# CFLAGS used to compile the jdk native launchers (C-code) 337219820SjeffCFLAGS_JDKEXE:=@CFLAGS_JDKEXE@ 338219820SjeffCXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@ 339219820Sjeff 340219820SjeffCXX:=@FIXPATH@ @CCACHE@ @CXX@ 341219820Sjeff#CXXFLAGS:=@CXXFLAGS@ 342219820Sjeff 343219820SjeffCPP:=@FIXPATH@ @CPP@ 344219820Sjeff#CPPFLAGS:=@CPPFLAGS@ 345219820Sjeff 346219820Sjeff# The linker can be gcc or ld on unix systems, or link.exe on windows systems. 347219820SjeffLD:=@FIXPATH@ @LD@ 348219820Sjeff 349219820Sjeff# Xcode SDK path 350219820SjeffSDKROOT:=@SDKROOT@ 351219820Sjeff 352219820Sjeff# The linker on older SuSE distros (e.g. on SLES 10) complains with: 353219820Sjeff# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable." 354219820Sjeff# if feeded with a version script which contains named tags. 355219820SjeffUSING_BROKEN_SUSE_LD:=@USING_BROKEN_SUSE_LD@ 356219820Sjeff 357219820Sjeff# LDFLAGS used to link the jdk native libraries (C-code) 358219820SjeffLDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@ 359219820SjeffLDFLAGS_JDKLIB_SUFFIX:=@LDFLAGS_JDKLIB_SUFFIX@ 360219820Sjeff 361219820Sjeff# LDFLAGS used to link the jdk native launchers (C-code) 362219820SjeffLDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@ 363219820SjeffLDFLAGS_JDKEXE_SUFFIX:=@LDFLAGS_JDKEXE_SUFFIX@ 364219820Sjeff 365219820Sjeff# LDFLAGS specific to C++ linking. 366219820SjeffLDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@ 367219820Sjeff 368219820Sjeff# Sometimes a different linker is needed for c++ libs 369219820SjeffLDCXX:=@FIXPATH@ @LDCXX@ 370219820Sjeff# The flags for linking libstdc++ linker. 371219820SjeffLIBCXX:=@LIBCXX@ 372219820Sjeff 373219820Sjeff# Compiler and linker flags used when building native tests 374219820SjeffCFLAGS_TESTLIB:=@CFLAGS_TESTLIB@ 375219820SjeffCXXFLAGS_TESTLIB:=@CXXFLAGS_TESTLIB@ 376219820SjeffCFLAGS_TESTEXE:=@CFLAGS_TESTEXE@ 377219820SjeffCXXFLAGS_TESTEXE:=@CXXFLAGS_TESTEXE@ 378219820SjeffLDFLAGS_TESTLIB:=@LDFLAGS_TESTLIB@ 379219820SjeffLDFLAGS_TESTLIB_SUFFIX:=@LDFLAGS_TESTLIB_SUFFIX@ 380219820SjeffLDFLAGS_TESTEXE:=@LDFLAGS_TESTEXE@ 381219820SjeffLDFLAGS_TESTEXE_SUFFIX:=@LDFLAGS_TESTEXE_SUFFIX@ 382219820Sjeff 383219820Sjeff# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the 384219820Sjeff# build platform. 385219820SjeffBUILD_CC:=@FIXPATH@ @BUILD_CC@ 386219820SjeffBUILD_LD:=@FIXPATH@ @BUILD_LD@ 387219820Sjeff 388219820SjeffAS:=@FIXPATH@ @AS@ 389219820Sjeff 390219820Sjeff# AR is used to create a static library (is ar in unix, lib.exe in windows) 391219820SjeffAR:=@FIXPATH@ @AR@ 392219820SjeffARFLAGS:=@ARFLAGS@ 393219820Sjeff 394219820SjeffNM:=@NM@ 395219820SjeffGNM:=@GNM@ 396219820SjeffSTRIP:=@STRIP@ 397219820Sjeff 398219820SjeffLIPO:=@LIPO@ 399219820Sjeff 400219820Sjeff# Options to linker to specify a mapfile. 401219820Sjeff# (Note absence of := assignment, because we do not want to evaluate the macro body here) 402219820SjeffSET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@ 403219820Sjeff 404219820Sjeff# Options for C/CXX compiler to be used if linking is performed 405219820Sjeff# using reorder file 406219820SjeffC_FLAG_REORDER:=@C_FLAG_REORDER@ 407219820SjeffCXX_FLAG_REORDER:=@CXX_FLAG_REORDER@ 408219820Sjeff 409219820Sjeff# 410219820Sjeff# Options for generating debug symbols 411219820SjeffENABLE_DEBUG_SYMBOLS:=@ENABLE_DEBUG_SYMBOLS@ 412219820SjeffCFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@ 413219820SjeffCXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@ 414219820SjeffZIP_DEBUGINFO_FILES:=@ZIP_DEBUGINFO_FILES@ 415219820Sjeff 416219820Sjeff# 417219820Sjeff# Compress (or not) jars 418219820SjeffCOMPRESS_JARS=@COMPRESS_JARS@ 419219820Sjeff 420219820Sjeff# Options to linker to specify the library name. 421219820Sjeff# (Note absence of := assignment, because we do not want to evaluate the macro body here) 422219820SjeffSET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@ 423219820Sjeff 424219820Sjeff# Set origin using the linker, ie use the relative path to the dependent library to find the dependees. 425219820Sjeff# (Note absence of := assignment, because we do not want to evaluate the macro body here) 426219820SjeffSET_SHARED_LIBRARY_ORIGIN=@SET_SHARED_LIBRARY_ORIGIN@ 427219820SjeffSET_EXECUTABLE_ORIGIN=@SET_EXECUTABLE_ORIGIN@ 428219820Sjeff 429219820Sjeff# Different OS:es have different ways of naming shared libraries. 430219820Sjeff# The SHARED_LIBRARY macro takes "verify" as and argument and returns: 431219820Sjeff# "libverify.so" or "libverify.dylib" or "verify.dll" depending on platform. 432219820Sjeff# (Note absence of := assignment, because we do not want to evaluate the macro body here) 433219820SjeffSHARED_LIBRARY=@SHARED_LIBRARY@ 434219820SjeffSTATIC_LIBRARY=@STATIC_LIBRARY@ 435219820SjeffLIBRARY_PREFIX:=@LIBRARY_PREFIX@ 436219820SjeffSHARED_LIBRARY_SUFFIX:=@SHARED_LIBRARY_SUFFIX@ 437219820SjeffSTATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@ 438219820SjeffEXE_SUFFIX:=@EXE_SUFFIX@ 439219820SjeffOBJ_SUFFIX:=@OBJ_SUFFIX@ 440219820Sjeff 441219820SjeffPOST_STRIP_CMD:=@POST_STRIP_CMD@ 442219820Sjeff 443219820SjeffJAVA_FLAGS:=@JAVA_FLAGS@ 444219820SjeffJAVA_FLAGS_BIG:=@JAVA_FLAGS_BIG@ 445219820SjeffJAVA_FLAGS_SMALL:=@JAVA_FLAGS_SMALL@ 446219820SjeffJAVA_TOOL_FLAGS_SMALL:=@JAVA_TOOL_FLAGS_SMALL@ 447219820SjeffSJAVAC_SERVER_JAVA_FLAGS:=@SJAVAC_SERVER_JAVA_FLAGS@ 448219820Sjeff 449219820Sjeff# The *_CMD variables are defined separately to be easily overridden in bootcycle-spec.gmk 450219820Sjeff# for bootcycle-images build. Make sure to keep them in sync. Do not use the *_CMD 451219820Sjeff# versions of the variables directly. 452219820SjeffJAVA_CMD:=@JAVA@ 453219820SjeffJAVAC_CMD:=@JAVAC@ 454219820SjeffJAVAH_CMD:=@JAVAH@ 455219820SjeffJAR_CMD:=@JAR@ 456219820SjeffJARSIGNER_CMD:=@JARSIGNER@ 457219820SjeffSJAVAC_SERVER_JAVA_CMD:=@SJAVAC_SERVER_JAVA@ 458219820Sjeff# These variables are meant to be used. They are defined with = instead of := to make 459219820Sjeff# it possible to override only the *_CMD variables. 460219820SjeffJAVA=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS) 461219820SjeffJAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS) 462219820SjeffJAVAC=@FIXPATH@ $(JAVAC_CMD) 463219820SjeffJAVAH=@FIXPATH@ $(JAVAH_CMD) 464219820SjeffJAR=@FIXPATH@ $(JAR_CMD) 465219820SjeffJARSIGNER=@FIXPATH@ $(JARSIGNER_CMD) 466219820Sjeff# A specific java binary with specific options can be used to run 467219820Sjeff# the long running background sjavac servers and other long running tasks. 468219820SjeffSJAVAC_SERVER_JAVA=@FIXPATH@ $(SJAVAC_SERVER_JAVA_CMD) $(SJAVAC_SERVER_JAVA_FLAGS) 469219820Sjeff 470219820Sjeff# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid 471219820Sjeff# overriding that value by using ?=. 472219820SjeffJAVAC_FLAGS?=@JAVAC_FLAGS@ 473219820Sjeff 474219820Sjeff# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ... 475219820Sjeff# Use = assignment to be able to override in bootcycle-spec.gmk 476219820SjeffINTERIM_LANGTOOLS_JAR = $(BUILDTOOLS_OUTPUTDIR)/interim_langtools.jar 477219820SjeffINTERIM_LANGTOOLS_ARGS = "-Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR)" -cp $(INTERIM_LANGTOOLS_JAR) 478219820SjeffNEW_JAVAC = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javac.Main 479219820SjeffNEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javadoc.Main 480219820Sjeff 481219820Sjeff# The interim corba jar is needed for running rmic 482219820SjeffINTERIM_CORBA_JAR = $(BUILDTOOLS_OUTPUTDIR)/interim_corba.jar 483219820Sjeff 484219820Sjeff# Base flags for RC 485219820Sjeff# Guarding this against resetting value. Legacy make files include spec multiple 486219820Sjeff# times. 487219820Sjeffifndef RC_FLAGS 488219820Sjeff RC_FLAGS:=@RC_FLAGS@ 489219820Sjeffendif 490219820Sjeff 491219820Sjeff# Tools adhering to a minimal and common standard of posix compliance. 492219820SjeffAWK:=@AWK@ 493219820SjeffBASENAME:=@BASENAME@ 494219820SjeffCAT:=@CAT@ 495219820SjeffCCACHE:=@CCACHE@ 496219820Sjeff# CD is going away, but remains to cater for legacy makefiles. 497219820SjeffCD:=cd 498219820SjeffCHMOD:=@CHMOD@ 499219820SjeffCODESIGN:=@CODESIGN@ 500219820SjeffCOMM:=@COMM@ 501219820SjeffCP:=@CP@ 502219820SjeffCPIO:=@CPIO@ 503219820SjeffCUT:=@CUT@ 504219820SjeffDATE:=@DATE@ 505219820SjeffDIFF:=@DIFF@ 506219820SjeffDIRNAME:=@DIRNAME@ 507219820SjeffDSYMUTIL:=@DSYMUTIL@ 508219820SjeffFIND:=@FIND@ 509219820SjeffFIND_DELETE:=@FIND_DELETE@ 510219820SjeffECHO:=@ECHO@ 511219820SjeffEGREP:=@EGREP@ 512219820SjeffFGREP:=@FGREP@ 513219820SjeffGREP:=@GREP@ 514219820SjeffHEAD:=@HEAD@ 515219820SjeffLS:=@LS@ 516219820SjeffLN:=@LN@ 517219820SjeffMKDIR:=@MKDIR@ 518219820SjeffMV:=@MV@ 519219820SjeffNAWK:=@NAWK@ 520219820SjeffPRINTF:=@PRINTF@ 521219820SjeffPWD:=@THEPWDCMD@ 522219820SjeffRM:=@RM@ 523219820SjeffSED:=@SED@ 524219820SjeffSH:=@SH@ 525219820SjeffSORT:=@SORT@ 526219820SjeffTAR:=@TAR@ 527219820SjeffTAIL:=@TAIL@ 528219820SjeffTEE:=@TEE@ 529219820SjeffTIME:=@TIME@ 530219820SjeffIS_GNU_TIME:=@IS_GNU_TIME@ 531219820SjeffTR:=@TR@ 532219820SjeffTOUCH:=@TOUCH@ 533219820SjeffUNIQ:=@UNIQ@ 534219820SjeffWC:=@WC@ 535219820SjeffXARGS:=@XARGS@ 536219820SjeffZIPEXE:=@ZIP@ 537219820SjeffZIP:=@ZIP@ 538219820SjeffUNZIP:=@UNZIP@ 539219820SjeffMT:=@FIXPATH@ @MT@ 540219820SjeffRC:=@FIXPATH@ @RC@ 541219820SjeffDUMPBIN:=@FIXPATH@ @DUMPBIN@ 542219820SjeffCYGPATH:=@CYGPATH@ 543219820SjeffLDD:=@LDD@ 544219820SjeffOTOOL:=@OTOOL@ 545219820SjeffREADELF:=@READELF@ 546219820SjeffEXPR:=@EXPR@ 547219820SjeffFILE:=@FILE@ 548219820SjeffHG:=@HG@ 549219820SjeffOBJCOPY:=@OBJCOPY@ 550219820SjeffSETFILE:=@SETFILE@ 551219820SjeffXATTR:=@XATTR@ 552219820SjeffJT_HOME:=@JT_HOME@ 553219820SjeffJTREGEXE:=@JTREGEXE@ 554219820SjeffXCODEBUILD=@XCODEBUILD@ 555219820SjeffFIXPATH:=@FIXPATH@ 556219820Sjeff 557219820Sjeff# Build setup 558219820SjeffENABLE_JFR=@ENABLE_JFR@ 559219820SjeffENABLE_INTREE_EC=@ENABLE_INTREE_EC@ 560219820SjeffUSE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@ 561219820SjeffUSE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@ 562219820SjeffUSE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@ 563219820SjeffLIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@ 564219820SjeffMSVCR_DLL:=@MSVCR_DLL@ 565219820SjeffMSVCP_DLL:=@MSVCP_DLL@ 566219820Sjeff 567219820Sjeff 568219820Sjeff# ADD_SRCS takes a single argument with source roots 569219820Sjeff# and appends any corresponding source roots found 570219820Sjeff# below --with-add-source-root and below 571219820Sjeff# --with-override-source-root. It is the responsibility 572219820Sjeff# of the next macro to get rid of superfluous files. 573219820SjeffADD_SRCS=$1 574219820Sjeffifneq (,$(ADD_SRC_ROOT)) 575219820Sjeff # Append wildcard rule to pickup any matching source roots found below ADD_SRC_ROOT 576219820Sjeff ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(ADD_SRC_ROOT),$1)) 577219820Sjeffendif 578219820Sjeffifneq (,$(OVERRIDE_SRC_ROOT)) 579219820Sjeff # Append wildcard rule to pickup any matching source roots found below OVERRIDE_SRC_ROOT 580219820Sjeff ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(OVERRIDE_SRC_ROOT),$1)) 581219820Sjeffendif 582219820Sjeff 583219820Sjeff# OVR_SRCS creates a filter expression to filter out sources in 584219820Sjeff# the original source directory that lie inside directories below 585219820Sjeff# --with-override-source-root. 586219820Sjeff# Use := here since we want to scan for these files here. To avoid recomputation later. 587219820Sjeff# We cannot do the scan in configure, since that would force us to rerun configure when 588219820Sjeff# we add overridden sources. 589219820Sjeffifneq (,$(OVERRIDE_SRC_ROOT)) 590219820Sjeff OVR_SRCS:=$(addsuffix %,$(subst $(OVERRIDE_SRC_ROOT),$(SRC_ROOT),$(sort $(dir $(shell $(FIND) $(OVERRIDE_SRC_ROOT) -type f))))) 591219820Sjeffelse 592219820Sjeff OVR_SRCS:= 593219820Sjeffendif 594219820Sjeff 595219820Sjeff#################################################### 596219820Sjeff# 597219820Sjeff# INSTALLATION 598219820Sjeff# 599219820Sjeff 600219820Sjeff# Common prefix for all installed files. Defaults to /usr/local, 601219820Sjeff# but /opt/myjdk is another common version. 602219820SjeffINSTALL_PREFIX=@prefix@ 603219820Sjeff 604219820Sjeff# Directories containing architecture-dependent files should be relative to exec_prefix 605219820SjeffINSTALL_EXECPREFIX=@exec_prefix@ 606219820Sjeff 607219820Sjeff# java,javac,javah,javap etc are installed here. 608219820SjeffINSTALL_BINDIR=@bindir@ 609219820Sjeff 610219820Sjeff# Read only architecture-independent data 611219820SjeffINSTALL_DATADIR=@datadir@ 612219820Sjeff 613219820Sjeff# Root of above. 614219820SjeffINSTALL_DATAROOTDIR=@datarootdir@ 615219820Sjeff 616219820Sjeff# Doc files, other than info and man. 617219820SjeffINSTALL_DOCDIR=@docdir@ 618219820Sjeff 619219820Sjeff# Html documentation 620219820SjeffINSTALL_HTMLDIR=@htmldir@ 621219820Sjeff 622219820Sjeff# Installing C header files, JNI headers for example. 623219820SjeffINSTALL_INCLUDEDIR=@includedir@ 624219820Sjeff 625219820Sjeff# Installing library files.... 626219820SjeffINSTALL_INCLUDEDIR=@libdir@ 627219820Sjeff 628219820Sjeff# Executables that other programs run. 629219820SjeffINSTALL_LIBEXECDIR=@libexecdir@ 630219820Sjeff 631219820Sjeff# Locale-dependent but architecture-independent data, such as message catalogs. 632219820SjeffINSTALL_LOCALEDIR=@localedir@ 633219820Sjeff 634219820Sjeff# Modifiable single-machine data 635219820SjeffINSTALL_LOCALSTATEDIR=@localstatedir@ 636219820Sjeff 637219820Sjeff# Man pages 638219820SjeffINSTALL_MANDIR=@mandir@ 639219820Sjeff 640219820Sjeff# Modifiable architecture-independent data. 641219820SjeffINSTALL_SHAREDSTATEDIR=@sharedstatedir@ 642219820Sjeff 643219820Sjeff# Read-only single-machine data 644219820SjeffINSTALL_SYSCONFDIR=@sysconfdir@ 645219820Sjeff 646219820Sjeff#################################################### 647219820Sjeff# 648219820Sjeff# Libraries 649219820Sjeff# 650219820Sjeff 651219820SjeffUSE_EXTERNAL_LCMS:=@USE_EXTERNAL_LCMS@ 652219820SjeffLCMS_CFLAGS:=@LCMS_CFLAGS@ 653219820SjeffLCMS_LIBS:=@LCMS_LIBS@ 654219820Sjeff 655219820SjeffUSE_EXTERNAL_LIBPNG:=@USE_EXTERNAL_LIBPNG@ 656219820SjeffPNG_LIBS:=@PNG_LIBS@ 657219820SjeffPNG_CFLAGS:=@PNG_CFLAGS@ 658219820Sjeff 659219820Sjeff 660219820Sjeff#################################################### 661219820Sjeff# 662219820Sjeff# Misc 663219820Sjeff# 664219820Sjeff 665219820Sjeff# Name of Service Agent library 666219820SjeffSALIB_NAME=@SALIB_NAME@ 667219820Sjeff 668219820SjeffINCLUDE_SA=@INCLUDE_SA@ 669219820Sjeff 670219820SjeffOS_VERSION_MAJOR:=@OS_VERSION_MAJOR@ 671219820SjeffOS_VERSION_MINOR:=@OS_VERSION_MINOR@ 672219820SjeffOS_VERSION_MICRO:=@OS_VERSION_MICRO@ 673219820Sjeff 674219820Sjeff# Images directory definitions 675219820SjeffJDK_IMAGE_SUBDIR:=jdk 676219820SjeffJRE_IMAGE_SUBDIR:=jre 677219820Sjeff 678219820Sjeff# Colon left out to be able to override output dir for bootcycle-images 679219820SjeffJDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR) 680219820SjeffJRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR) 681219820Sjeff 682219820Sjeff# Test image, as above 683219820SjeffTEST_IMAGE_SUBDIR:=test 684219820SjeffTEST_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(TEST_IMAGE_SUBDIR) 685219820Sjeff 686219820Sjeff# Symbols image 687219820SjeffSYMBOLS_IMAGE_SUBDIR:=symbols 688219820SjeffSYMBOLS_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(SYMBOLS_IMAGE_SUBDIR) 689219820Sjeff 690219820Sjeff# Macosx bundles directory definitions 691219820SjeffJDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle/jdk$(JDK_VERSION).jdk/Contents 692219820SjeffJRE_MACOSX_BUNDLE_SUBDIR=jre-bundle/jre$(JDK_VERSION).jre/Contents 693219820SjeffJDK_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR) 694219820SjeffJRE_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR) 695219820Sjeff 696219820Sjeff# This macro is called to allow inclusion of closed source counterparts. 697219820Sjeff# Unless overridden in closed sources, it expands to nothing. 698219820Sjeff# Usage: This function is called in an open makefile, with the following 699219820Sjeff# arguments: 700219820Sjeff# $1 the name of the repo, or empty if the top-level repo. 701219820Sjeff# $2 the name of the makefile 702219820Sjeffdefine IncludeCustomExtension 703219820Sjeffendef 704219820Sjeff 705219820Sjeff# Include the custom-spec.gmk file if it exists 706219820Sjeff-include $(dir @SPEC@)/custom-spec.gmk 707219820Sjeff