spec.gmk.in revision 899:8b92b08993a8
1178825Sdfr# 2233294Sstas# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 3233294Sstas# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4233294Sstas# 5178825Sdfr# This code is free software; you can redistribute it and/or modify it 6233294Sstas# under the terms of the GNU General Public License version 2 only, as 7178825Sdfr# published by the Free Software Foundation. Oracle designates this 8233294Sstas# particular file as subject to the "Classpath" exception as provided 9233294Sstas# by Oracle in the LICENSE file that accompanied this code. 10233294Sstas# 11178825Sdfr# This code is distributed in the hope that it will be useful, but WITHOUT 12233294Sstas# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13233294Sstas# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14178825Sdfr# version 2 for more details (a copy is included in the LICENSE file that 15233294Sstas# accompanied this code). 16233294Sstas# 17233294Sstas# You should have received a copy of the GNU General Public License version 18178825Sdfr# 2 along with this work; if not, write to the Free Software Foundation, 19233294Sstas# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20233294Sstas# 21233294Sstas# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22178825Sdfr# or visit www.oracle.com if you need additional information or have any 23233294Sstas# questions. 24233294Sstas# 25233294Sstas 26233294Sstas# Configured @DATE_WHEN_CONFIGURED@ to build 27233294Sstas# for target system @OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU@ 28233294Sstas# (called @OPENJDK_TARGET_AUTOCONF_NAME@ by autoconf) 29233294Sstas# on build system @OPENJDK_BUILD_OS@-@OPENJDK_BUILD_CPU@ 30233294Sstas# (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf) 31233294Sstas# using 'configure @CONFIGURE_COMMAND_LINE@' 32233294Sstas 33233294Sstas# When calling macros, the spaces between arguments are 34178825Sdfr# often semantically important! Sometimes we need to subst 35178825Sdfr# spaces and commas, therefore we need the following macros. 36178825SdfrX:= 37178825SdfrSPACE:=$(X) $(X) 38178825SdfrCOMMA:=, 39178825SdfrHASH:=\# 40178825SdfrSQUOTE:=' 41178825Sdfr#' 42178825SdfrDQUOTE:=" 43178825Sdfr#" 44178825Sdfrdefine NEWLINE 45178825Sdfr 46178825Sdfr 47233294Sstasendef 48178825Sdfr 49178825Sdfr# A self-referential reference to this file. 50178825SdfrSPEC:=@SPEC@ 51178825Sdfr 52178825Sdfr# Specify where the spec file is. 53178825SdfrMAKE_ARGS="SPEC=$(SPEC)" 54234027Sstas 55233294SstasMAKE:=@MAKE@ 56234027Sstas 57233294Sstas# Pass along the verbosity and log level settings. 58178825Sdfrifeq (,$(findstring VERBOSE=,$(MAKE))) 59178825Sdfr MAKE:=$(MAKE) $(VERBOSE) VERBOSE="$(VERBOSE)" LOG_LEVEL="$(LOG_LEVEL)" 60178825Sdfrendif 61178825Sdfr 62178825Sdfr# No implicit variables or rules! 63178825Sdfrifeq (,$(findstring -R,$(MAKE))) 64178825Sdfr MAKE:=$(MAKE) -R 65178825Sdfrendif 66178825Sdfr 67178825Sdfr# Specify where the common include directory for makefiles is. 68178825Sdfrifeq (,$(findstring -I @SRC_ROOT@/common/makefiles,$(MAKE))) 69178825Sdfr MAKE:=$(MAKE) -I @SRC_ROOT@/common/makefiles 70233294Sstasendif 71178825Sdfr 72178825Sdfr# The "human readable" name of this configuration 73233294SstasCONF_NAME:=@CONF_NAME@ 74233294Sstas 75178825Sdfr# The built jdk will run in this target system. 76178825SdfrOPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@ 77178825SdfrOPENJDK_TARGET_OS_API:=@OPENJDK_TARGET_OS_API@ 78178825SdfrOPENJDK_TARGET_OS_ENV:=@OPENJDK_TARGET_OS_ENV@ 79178825Sdfr 80178825SdfrOPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@ 81178825SdfrOPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@ 82233294SstasOPENJDK_TARGET_CPU_BITS:=@OPENJDK_TARGET_CPU_BITS@ 83233294SstasOPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@ 84178825Sdfr 85178825SdfrCOMPILE_TYPE:=@COMPILE_TYPE@ 86178825Sdfr 87178825Sdfr# Legacy support 88178825SdfrOPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@ 89178825SdfrOPENJDK_TARGET_CPU_LIBDIR:=@OPENJDK_TARGET_CPU_LIBDIR@ 90178825SdfrOPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@ 91178825SdfrOPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@ 92178825SdfrOPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@ 93178825SdfrOPENJDK_TARGET_CPU_JLI_CFLAGS:=@OPENJDK_TARGET_CPU_JLI_CFLAGS@ 94178825SdfrOPENJDK_TARGET_OS_API_DIR:=@OPENJDK_TARGET_OS_API_DIR@ 95178825Sdfr 96178825Sdfr# We are building on this build system. 97178825Sdfr# When not cross-compiling, it is the same as the target. 98178825SdfrOPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@ 99178825SdfrOPENJDK_BUILD_OS_API:=@OPENJDK_BUILD_OS_API@ 100233294Sstas 101178825SdfrOPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@ 102233294SstasOPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@ 103233294SstasOPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@ 104233294SstasOPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@ 105233294Sstas 106178825Sdfr# Legacy OS values for use in release file. 107178825SdfrREQUIRED_OS_NAME:=@REQUIRED_OS_NAME@ 108178825SdfrREQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@ 109178825Sdfr 110233294Sstas@SET_OPENJDK@ 111178825SdfrLIBM:=-lm 112178825SdfrLIBDL:=@LIBDL@ 113233294Sstas 114178825Sdfr# colon or semicolon 115178825SdfrPATH_SEP:=@PATH_SEP@ 116178825Sdfr 117178825Sdfrifeq ($(OPENJDK_TARGET_OS), windows) 118178825Sdfr # On Windows, the Visual Studio toolchain needs the LIB and INCLUDE 119178825Sdfr # environment variables (in Windows path style), and the PATH needs to 120178825Sdfr # be adjusted to include Visual Studio tools (but this needs to be in 121233294Sstas # cygwin/msys style). 122178825Sdfr export PATH:=@VS_PATH@ 123234027Sstas export INCLUDE:=@VS_INCLUDE@ 124233294Sstas export LIB:=@VS_LIB@ 125234027Sstasendif 126233294Sstas 127234027Sstas# The sys root where standard headers and libraries are found. 128233294Sstas# Usually not needed since the configure script should have 129233294Sstas# taken it into account already when setting CFLAGS et al. 130233294SstasSYS_ROOT:=@SYS_ROOT@ 131233294Sstas 132233294Sstas# Paths to the source code 133234027SstasSRC_ROOT:=@SRC_ROOT@ 134233294SstasADD_SRC_ROOT:=@ADD_SRC_ROOT@ 135234027SstasOVERRIDE_SRC_ROOT:=@OVERRIDE_SRC_ROOT@ 136233294SstasTOPDIR:=@SRC_ROOT@ 137234027SstasOUTPUT_ROOT:=@OUTPUT_ROOT@ 138233294SstasJDK_TOPDIR:=@JDK_TOPDIR@ 139233294SstasLANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@ 140233294SstasCORBA_TOPDIR:=@CORBA_TOPDIR@ 141233294SstasJAXP_TOPDIR:=@JAXP_TOPDIR@ 142233294SstasJAXWS_TOPDIR:=@JAXWS_TOPDIR@ 143233294SstasHOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@ 144233294SstasNASHORN_TOPDIR:=@NASHORN_TOPDIR@ 145233294SstasCOPYRIGHT_YEAR:=@COPYRIGHT_YEAR@ 146233294Sstas 147233294Sstas# Location where build customization files may be found 148178825SdfrCUSTOM_MAKE_DIR:=@CUSTOM_MAKE_DIR@ 149233294Sstas 150233294Sstas# Information gathered from the version.numbers file. 151233294SstasJDK_MAJOR_VERSION:=@JDK_MAJOR_VERSION@ 152233294SstasJDK_MINOR_VERSION:=@JDK_MINOR_VERSION@ 153178825SdfrJDK_MICRO_VERSION:=@JDK_MICRO_VERSION@ 154178825SdfrJDK_UPDATE_VERSION:=@JDK_UPDATE_VERSION@ 155233294SstasJDK_BUILD_NUMBER:=@JDK_BUILD_NUMBER@ 156233294SstasMILESTONE:=@MILESTONE@ 157178825SdfrLAUNCHER_NAME:=@LAUNCHER_NAME@ 158233294SstasPRODUCT_NAME:=@PRODUCT_NAME@ 159178825SdfrPRODUCT_SUFFIX:=@PRODUCT_SUFFIX@ 160178825SdfrJDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@ 161178825SdfrCOMPANY_NAME:=@COMPANY_NAME@ 162233294SstasMACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@ 163233294SstasMACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@ 164178825Sdfr 165178825Sdfr# Different version strings generated from the above information. 166178825SdfrJDK_VERSION:=@JDK_VERSION@ 167178825SdfrRUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX) 168178825SdfrCOOKED_BUILD_NUMBER:=@COOKED_BUILD_NUMBER@ 169178825Sdfr# These variables need to be generated here so that MILESTONE and 170178825Sdfr# JDK_BUILD_NUMBER can be overridden on the make command line. 171178825Sdfrifeq ($(MILESTONE),) 172233294Sstas RELEASE=$(JDK_VERSION)$(BUILD_VARIANT_RELEASE) 173233294Sstaselse 174178825Sdfr RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE) 175178825Sdfrendif 176178825Sdfrifeq ($(JDK_BUILD_NUMBER),b00) 177178825Sdfr USER_RELEASE_SUFFIX=@USER_RELEASE_SUFFIX@ 178178825Sdfr FULL_VERSION=$(RELEASE)-$(USER_RELEASE_SUFFIX)-$(JDK_BUILD_NUMBER) 179178825Sdfrelse 180178825Sdfr FULL_VERSION=$(RELEASE)-$(JDK_BUILD_NUMBER) 181233294Sstasendif 182178825SdfrJRE_RELEASE_VERSION:=$(FULL_VERSION) 183178825Sdfr 184178825Sdfr# How to compile the code: release, fastdebug or slowdebug 185178825SdfrDEBUG_LEVEL:=@DEBUG_LEVEL@ 186233294Sstas 187178825Sdfr# This is the JDK variant to build. 188178825Sdfr# The JDK variant is a name for a specific set of modules to be compiled for the JDK. 189178825SdfrJDK_VARIANT:=@JDK_VARIANT@ 190178825Sdfr 191178825Sdfr# Should we compile support for running with a graphical UI? (ie headful) 192233294Sstas# Should we compile support for running without? (ie headless) 193233294SstasSUPPORT_HEADFUL:=@SUPPORT_HEADFUL@ 194233294SstasSUPPORT_HEADLESS:=@SUPPORT_HEADLESS@ 195178825Sdfr# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options. 196233294Sstas@BUILD_HEADLESS@ 197178825Sdfr 198178825Sdfr# These are the libjvms that we want to build. 199178825Sdfr# The java launcher uses the default. 200178825Sdfr# The others can be selected by specifying -client -server -minimal1 -kernel -zero or -zeroshark 201178825Sdfr# on the java launcher command line. 202178825SdfrJVM_VARIANTS:=@JVM_VARIANTS@ 203233294SstasJVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@ 204233294SstasJVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@ 205233294SstasJVM_VARIANT_MINIMAL1:=@JVM_VARIANT_MINIMAL1@ 206178825SdfrJVM_VARIANT_KERNEL:=@JVM_VARIANT_KERNEL@ 207178825SdfrJVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@ 208178825SdfrJVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@ 209178825Sdfr 210178825Sdfr# Universal binaries on macosx 211178825SdfrMACOSX_UNIVERSAL=@MACOSX_UNIVERSAL@ 212233294Sstas 213233294Sstas# Legacy setting: -debug or -fastdebug 214233294Sstas# Still used in version string... 215233294SstasBUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@ 216233294Sstas 217233294Sstas# JDK_OUTPUTDIR specifies where a working jvm is built. 218233294Sstas# You can run $(JDK_OUTPUTDIR)/bin/java 219233294Sstas# Though the layout of the contents of $(JDK_OUTPUTDIR) is not 220233294Sstas# yet the same as a default installation. 221233294Sstas# 222233294Sstas# When you run "make install" it will create the standardized 223233294Sstas# layout for the jdk and the jre inside the IMAGES_OUTPUTDIR subdir. 224233294Sstas# Then it will copy the contents of the jdk into the installation 225233294Sstas# directory. 226233294Sstas 227233294SstasBUILD_OUTPUT:=@BUILD_OUTPUT@ 228233294Sstas# Colon left out to be able to override IMAGES_OUTPUTDIR for bootcycle-images 229233294SstasLANGTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/langtools 230233294SstasCORBA_OUTPUTDIR=$(BUILD_OUTPUT)/corba 231233294SstasJAXP_OUTPUTDIR=$(BUILD_OUTPUT)/jaxp 232233294SstasJAXWS_OUTPUTDIR=$(BUILD_OUTPUT)/jaxws 233233294SstasHOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot 234233294SstasJDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk 235233294SstasNASHORN_OUTPUTDIR=$(BUILD_OUTPUT)/nashorn 236233294SstasIMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images 237233294SstasJCE_OUTPUTDIR=$(BUILD_OUTPUT)/jce-release 238233294Sstas 239233294SstasLANGTOOLS_DIST=$(LANGTOOLS_OUTPUTDIR)/dist 240233294SstasCORBA_DIST=$(CORBA_OUTPUTDIR)/dist 241233294SstasJAXP_DIST=$(JAXP_OUTPUTDIR)/dist 242233294SstasJAXWS_DIST=$(JAXWS_OUTPUTDIR)/dist 243233294SstasHOTSPOT_DIST=@HOTSPOT_DIST@ 244233294SstasNASHORN_DIST=$(NASHORN_OUTPUTDIR)/dist 245233294Sstas 246178825SdfrBUILD_HOTSPOT=@BUILD_HOTSPOT@ 247233294Sstas 248178825Sdfr# The boot jdk to use 249233294SstasBOOT_JDK:=@BOOT_JDK@ 250233294SstasBOOT_JDK_JVMARGS:=@BOOT_JDK_JVMARGS@ 251178825SdfrBOOT_RTJAR:=@BOOT_RTJAR@ 252233294SstasBOOT_TOOLSJAR=$(BOOT_JDK)/lib/tools.jar 253233294Sstas 254233294Sstas# When compiling Java source to be run by the boot jdk 255233294Sstas# use these extra flags, eg -source 6 -target 6 256233294SstasBOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@ 257233294Sstas 258178825Sdfr# Information about the build system 259233294SstasNUM_CORES:=@NUM_CORES@ 260233294Sstas# Enable sjavac support = use a javac server, 261233294Sstas# multi core javac compilation and dependency tracking. 262233294SstasENABLE_SJAVAC:=@ENABLE_SJAVAC@ 263233294Sstas# Store sjavac server synchronization files here, and 264233294Sstas# the sjavac server log files. 265233294SstasSJAVAC_SERVER_DIR:=@SJAVAC_SERVER_DIR@ 266233294Sstas 267178825Sdfr# Number of parallel jobs to use for compilation 268233294SstasJOBS?=@JOBS@ 269178825Sdfr 270233294Sstas# The OpenJDK makefiles should be changed to using the standard 271233294Sstas# configure output ..._CFLAGS and ..._LIBS. In the meantime we 272233294Sstas# extract the information here. 273178825SdfrFREETYPE2_LIB_PATH:=@FREETYPE2_LIB_PATH@ 274233294SstasFREETYPE2_LIBS:=@FREETYPE2_LIBS@ 275233294SstasFREETYPE2_CFLAGS:=@FREETYPE2_CFLAGS@ 276178825SdfrUSING_SYSTEM_FT_LIB=@USING_SYSTEM_FT_LIB@ 277233294SstasCUPS_CFLAGS:=@CUPS_CFLAGS@ 278233294SstasALSA_LIBS:=@ALSA_LIBS@ 279233294SstasALSA_CFLAGS:=@ALSA_CFLAGS@ 280233294Sstas 281233294SstasPACKAGE_PATH=@PACKAGE_PATH@ 282178825Sdfr 283233294Sstas# Source file for cacerts 284178825SdfrCACERTS_FILE=@CACERTS_FILE@ 285178825Sdfr 286233294Sstas# Enable unlimited crypto policy 287178825SdfrUNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@ 288 289# Necessary additional compiler flags to compile X11 290X_CFLAGS:=@X_CFLAGS@ 291X_LIBS:=@X_LIBS@ 292OPENWIN_HOME:=@OPENWIN_HOME@ 293 294# The lowest required version of macosx to enforce compatiblity for 295MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@ 296 297# There are two types: CC or CL 298# CC is gcc and others behaving reasonably similar. 299# CL is cl.exe only. 300COMPILER_TYPE:=@COMPILER_TYPE@ 301COMPILER_NAME:=@COMPILER_NAME@ 302 303COMPILER_SUPPORTS_TARGET_BITS_FLAG=@COMPILER_SUPPORTS_TARGET_BITS_FLAG@ 304 305CC_OUT_OPTION:=@CC_OUT_OPTION@ 306EXE_OUT_OPTION:=@EXE_OUT_OPTION@ 307LD_OUT_OPTION:=@LD_OUT_OPTION@ 308AR_OUT_OPTION:=@AR_OUT_OPTION@ 309 310# Flags used for overriding the default opt setting for a C/C++ source file. 311C_O_FLAG_HIGHEST:=@C_O_FLAG_HIGHEST@ 312C_O_FLAG_HI:=@C_O_FLAG_HI@ 313C_O_FLAG_NORM:=@C_O_FLAG_NORM@ 314C_O_FLAG_NONE:=@C_O_FLAG_NONE@ 315CXX_O_FLAG_HIGHEST:=@CXX_O_FLAG_HIGHEST@ 316CXX_O_FLAG_HI:=@CXX_O_FLAG_HI@ 317CXX_O_FLAG_NORM:=@CXX_O_FLAG_NORM@ 318CXX_O_FLAG_NONE:=@CXX_O_FLAG_NONE@ 319 320C_FLAG_DEPS:=@C_FLAG_DEPS@ 321CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@ 322 323# Tools that potentially need to be cross compilation aware. 324CC:=@FIXPATH@ @CCACHE@ @CC@ 325 326# CFLAGS used to compile the jdk native libraries (C-code) 327CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@ 328CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@ 329 330# CFLAGS used to compile the jdk native launchers (C-code) 331CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@ 332CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@ 333 334CXX:=@FIXPATH@ @CCACHE@ @CXX@ 335#CXXFLAGS:=@CXXFLAGS@ 336 337OBJC:=@CCACHE@ @OBJC@ 338#OBJCFLAGS:=@OBJCFLAGS@ 339 340CPP:=@FIXPATH@ @CPP@ 341#CPPFLAGS:=@CPPFLAGS@ 342 343# The linker can be gcc or ld on posix systems, or link.exe on windows systems. 344LD:=@FIXPATH@ @LD@ 345 346# LDFLAGS used to link the jdk native libraries (C-code) 347LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@ 348LDFLAGS_JDKLIB_SUFFIX:=@LDFLAGS_JDKLIB_SUFFIX@ 349 350# On some platforms the linker cannot be used to create executables, thus 351# the need for a separate LDEXE command. 352LDEXE:=@FIXPATH@ @LDEXE@ 353 354# LDFLAGS used to link the jdk native launchers (C-code) 355LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@ 356LDFLAGS_JDKEXE_SUFFIX:=@LDFLAGS_JDKEXE_SUFFIX@ 357 358# LDFLAGS specific to C++ linking. 359LDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@ 360 361# Sometimes a different linker is needed for c++ libs 362LDCXX:=@FIXPATH@ @LDCXX@ 363# The flags for linking libstdc++ linker. 364LIBCXX:=@LIBCXX@ 365 366# Sometimes a different linker is needed for c++ executables 367LDEXECXX:=@FIXPATH@ @LDEXECXX@ 368 369# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the 370# build platform. 371BUILD_CC:=@FIXPATH@ @BUILD_CC@ 372BUILD_LD:=@FIXPATH@ @BUILD_LD@ 373 374AS:=@FIXPATH@ @AS@ 375 376# AR is used to create a static library (is ar in posix, lib.exe in windows) 377AR:=@FIXPATH@ @AR@ 378ARFLAGS:=@ARFLAGS@ 379 380NM:=@NM@ 381GNM:=@GNM@ 382STRIP:=@STRIP@ 383MCS:=@MCS@ 384 385LIPO:=@LIPO@ 386 387# Command to create a shared library 388SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@ 389 390# Options to linker to specify a mapfile. 391# (Note absence of := assignment, because we do not want to evaluate the macro body here) 392SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@ 393 394# Options for C/CXX compiler to be used if linking is performed 395# using reorder file 396C_FLAG_REORDER:=@C_FLAG_REORDER@ 397CXX_FLAG_REORDER:=@CXX_FLAG_REORDER@ 398 399# 400# Options for generating debug symbols 401ENABLE_DEBUG_SYMBOLS:=@ENABLE_DEBUG_SYMBOLS@ 402CFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@ 403CXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@ 404ZIP_DEBUGINFO_FILES:=@ZIP_DEBUGINFO_FILES@ 405 406# 407# Compress (or not) jars 408COMPRESS_JARS=@COMPRESS_JARS@ 409 410# Options to linker to specify the library name. 411# (Note absence of := assignment, because we do not want to evaluate the macro body here) 412SET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@ 413 414# Set origin using the linker, ie use the relative path to the dependent library to find the dependees. 415# (Note absence of := assignment, because we do not want to evaluate the macro body here) 416SET_SHARED_LIBRARY_ORIGIN=@SET_SHARED_LIBRARY_ORIGIN@ 417SET_EXECUTABLE_ORIGIN=@SET_EXECUTABLE_ORIGIN@ 418 419# Different OS:es have different ways of naming shared libraries. 420# The SHARED_LIBRARY macro takes "verify" as and argument and returns: 421# "libverify.so" or "libverify.dylib" or "verify.dll" depending on platform. 422# (Note absence of := assignment, because we do not want to evaluate the macro body here) 423SHARED_LIBRARY=@SHARED_LIBRARY@ 424STATIC_LIBRARY=@STATIC_LIBRARY@ 425LIBRARY_PREFIX:=@LIBRARY_PREFIX@ 426SHARED_LIBRARY_SUFFIX:=@SHARED_LIBRARY_SUFFIX@ 427STATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@ 428EXE_SUFFIX:=@EXE_SUFFIX@ 429OBJ_SUFFIX:=@OBJ_SUFFIX@ 430 431POST_STRIP_CMD:=@POST_STRIP_CMD@ 432POST_MCS_CMD:=@POST_MCS_CMD@ 433 434JAVA_FLAGS:=@BOOT_JDK_JVMARGS@ 435 436JAVA=@FIXPATH@ $(BOOT_JDK)/bin/java $(JAVA_FLAGS) 437 438JAVAC=@FIXPATH@ $(BOOT_JDK)/bin/javac 439# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid 440# overriding that value by using ?=. 441JAVAC_FLAGS?=@JAVAC_FLAGS@ 442 443JAVAH=@FIXPATH@ $(BOOT_JDK)/bin/javah 444 445JAR=@FIXPATH@ $(BOOT_JDK)/bin/jar 446 447RMIC=@FIXPATH@ $(BOOT_JDK)/bin/rmic 448 449NATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii 450 451JARSIGNER=@FIXPATH@ $(BOOT_JDK)/bin/jarsigner 452 453# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ... 454BOOTSTRAP_JAVAC_JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar 455BOOTSTRAP_JAVAC_ARGS:="-Xbootclasspath/p:$(BOOTSTRAP_JAVAC_JAR)" -cp $(BOOTSTRAP_JAVAC_JAR) 456NEW_JAVAC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javac.Main 457NEW_JAVADOC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javadoc.Main 458 459# Base flags for RC 460# Guarding this against resetting value. Legacy make files include spec multiple 461# times. 462ifndef RC_FLAGS 463RC_FLAGS:=@RC_FLAGS@ 464endif 465 466# A specific java binary with specific options can be used to run 467# the long running background sjavac servers and other long running tasks. 468SJAVAC_SERVER_JAVA:=@FIXPATH@ @SJAVAC_SERVER_JAVA@ 469 470# Tools adhering to a minimal and common standard of posix compliance. 471AWK:=@AWK@ 472BASENAME:=@BASENAME@ 473BASH:=@BASH@ 474CAT:=@CAT@ 475CCACHE:=@CCACHE@ 476# CD is going away, but remains to cater for legacy makefiles. 477CD:=cd 478CHMOD:=@CHMOD@ 479CODESIGN:=@CODESIGN@ 480COMM:=@COMM@ 481CP:=@CP@ 482CPIO:=@CPIO@ 483CUT:=@CUT@ 484DATE:=@DATE@ 485DIFF:=@DIFF@ 486DIRNAME:=@DIRNAME@ 487FIND:=@FIND@ 488FIND_DELETE:=@FIND_DELETE@ 489ECHO:=@ECHO@ 490EGREP:=@EGREP@ 491FGREP:=@FGREP@ 492GREP:=@GREP@ 493HEAD:=@HEAD@ 494LS:=@LS@ 495LN:=@LN@ 496MKDIR:=@MKDIR@ 497MV:=@MV@ 498NAWK:=@NAWK@ 499PRINTF:=@PRINTF@ 500PWD:=@THEPWDCMD@ 501RM:=@RM@ 502SED:=@SED@ 503SH:=@SH@ 504SORT:=@SORT@ 505TAR:=@TAR@ 506TAIL:=@TAIL@ 507TEE:=@TEE@ 508TIME:=@TIME@ 509IS_GNU_TIME:=@IS_GNU_TIME@ 510TR:=@TR@ 511TOUCH:=@TOUCH@ 512UNIQ:=@UNIQ@ 513WC:=@WC@ 514XARGS:=@XARGS@ 515ZIPEXE:=@ZIP@ 516ZIP:=@ZIP@ 517UNZIP:=@UNZIP@ 518MT:=@FIXPATH@ @MT@ 519RC:=@FIXPATH@ @RC@ 520DUMPBIN:=@FIXPATH@ @DUMPBIN@ 521CYGPATH:=@CYGPATH@ 522LDD:=@LDD@ 523OTOOL:=@OTOOL@ 524READELF:=@READELF@ 525EXPR:=@EXPR@ 526FILE:=@FILE@ 527HG:=@HG@ 528OBJCOPY:=@OBJCOPY@ 529SETFILE:=@SETFILE@ 530XATTR:=@XATTR@ 531JT_HOME:=@JT_HOME@ 532JTREGEXE:=@JTREGEXE@ 533 534FIXPATH:=@FIXPATH@ 535 536# Where the build output is stored for your convenience. 537BUILD_LOG:=@BUILD_LOG@ 538BUILD_LOG_PREVIOUS:=@BUILD_LOG_PREVIOUS@ 539# Disable the build log wrapper on sjavac+winapi until 540# we have solved how to prevent the log wrapper to wait 541# for the background sjavac server process. 542ifeq (@ENABLE_SJAVAC@X@OPENJDK_BUILD_OS_API@,yesXwinapi) 543 BUILD_LOG_WRAPPER:= 544else 545 BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@ 546endif 547 548# Build setup 549ENABLE_JFR=@ENABLE_JFR@ 550ENABLE_INTREE_EC=@ENABLE_INTREE_EC@ 551USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@ 552USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@ 553USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@ 554LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@ 555MSVCR_DLL:=@MSVCR_DLL@ 556 557 558# ADD_SRCS takes a single argument with source roots 559# and appends any corresponding source roots found 560# below --with-add-source-root and below 561# --with-override-source-root. It is the responsibility 562# of the next macro to get rid of superfluous files. 563ADD_SRCS=$1 564ifneq (,$(ADD_SRC_ROOT)) 565 # Append wildcard rule to pickup any matching source roots found below ADD_SRC_ROOT 566 ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(ADD_SRC_ROOT),$1)) 567endif 568ifneq (,$(OVERRIDE_SRC_ROOT)) 569 # Append wildcard rule to pickup any matching source roots found below OVERRIDE_SRC_ROOT 570 ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(OVERRIDE_SRC_ROOT),$1)) 571endif 572 573# OVR_SRCS creates a filter expression to filter out sources in 574# the original source directory that lie inside directories below 575# --with-override-source-root. 576# Use := here since we want to scan for these files here. To avoid recomputation later. 577# We cannot do the scan in configure, since that would force us to rerun configure when 578# we add overridden sources. 579ifneq (,$(OVERRIDE_SRC_ROOT)) 580 OVR_SRCS:=$(addsuffix %,$(subst $(OVERRIDE_SRC_ROOT),$(SRC_ROOT),$(sort $(dir $(shell $(FIND) $(OVERRIDE_SRC_ROOT) -type f))))) 581else 582 OVR_SRCS:= 583endif 584 585#################################################### 586# 587# INSTALLATION 588# 589 590# Common prefix for all installed files. Defaults to /usr/local, 591# but /opt/myjdk is another common version. 592INSTALL_PREFIX=@prefix@ 593 594# Directories containing architecture-dependent files should be relative to exec_prefix 595INSTALL_EXECPREFIX=@exec_prefix@ 596 597# java,javac,javah,javap etc are installed here. 598INSTALL_BINDIR=@bindir@ 599 600# Read only architecture-independent data 601INSTALL_DATADIR=@datadir@ 602 603# Root of above. 604INSTALL_DATAROOTDIR=@datarootdir@ 605 606# Doc files, other than info and man. 607INSTALL_DOCDIR=@docdir@ 608 609# Html documentation 610INSTALL_HTMLDIR=@htmldir@ 611 612# Installing C header files, JNI headers for example. 613INSTALL_INCLUDEDIR=@includedir@ 614 615# Installing library files.... 616INSTALL_INCLUDEDIR=@libdir@ 617 618# Executables that other programs run. 619INSTALL_LIBEXECDIR=@libexecdir@ 620 621# Locale-dependent but architecture-independent data, such as message catalogs. 622INSTALL_LOCALEDIR=@localedir@ 623 624# Modifiable single-machine data 625INSTALL_LOCALSTATEDIR=@localstatedir@ 626 627# Man pages 628INSTALL_MANDIR=@mandir@ 629 630# Modifiable architecture-independent data. 631INSTALL_SHAREDSTATEDIR=@sharedstatedir@ 632 633# Read-only single-machine data 634INSTALL_SYSCONFDIR=@sysconfdir@ 635 636 637#################################################### 638# 639# Misc 640# 641 642# Name of Service Agent library 643SALIB_NAME=@SALIB_NAME@ 644 645INCLUDE_SA=@INCLUDE_SA@ 646 647OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@ 648OS_VERSION_MINOR:=@OS_VERSION_MINOR@ 649OS_VERSION_MICRO:=@OS_VERSION_MICRO@ 650 651# Images directory definitions 652JDK_IMAGE_SUBDIR:=j2sdk-image 653JRE_IMAGE_SUBDIR:=j2re-image 654JDK_OVERLAY_IMAGE_SUBDIR:=j2sdk-overlay-image 655JRE_OVERLAY_IMAGE_SUBDIR:=j2re-overlay-image 656# Colon left out to be able to override output dir for bootcycle-images 657JDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR) 658JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR) 659JDK_OVERLAY_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_OVERLAY_IMAGE_SUBDIR) 660JRE_OVERLAY_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_OVERLAY_IMAGE_SUBDIR) 661 662# Macosx bundles directory definitions 663JDK_BUNDLE_SUBDIR=j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents 664JRE_BUNDLE_SUBDIR=j2re-bundle/jre$(JDK_VERSION).jre/Contents 665JDK_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_BUNDLE_SUBDIR) 666JRE_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR) 667 668# Include the custom-spec.gmk file if it exists 669-include $(dir @SPEC@)/custom-spec.gmk 670