1 #
   2 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 # Configured @DATE_WHEN_CONFIGURED@ to build
  27 # for target system @OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU@
  28 #   (called @OPENJDK_TARGET_AUTOCONF_NAME@ by autoconf)
  29 # on build system @OPENJDK_BUILD_OS@-@OPENJDK_BUILD_CPU@
  30 #   (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf)
  31 # using 'configure @CONFIGURE_COMMAND_LINE@'
  32 
  33 # The command line given to configure.
  34 CONFIGURE_COMMAND_LINE:=@CONFIGURE_COMMAND_LINE@
  35 
  36 # A self-referential reference to this file.
  37 SPEC:=@SPEC@
  38 
  39 # SPACE and COMMA are defined in MakeBase.gmk, but they are also used in
  40 # some definitions here, and are needed if MakeBase.gmk is not included before
  41 # this file.
  42 X:=
  43 SPACE:=$(X) $(X)
  44 COMMA:=,
  45 
  46 # What make to use for main processing, after bootstrapping top-level Makefile.
  47 MAKE := @MAKE@
  48 
  49 # The default make arguments
  50 MAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \
  51     MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" LOG_LEVEL=$(LOG_LEVEL)
  52 
  53 OUTPUT_SYNC_SUPPORTED:=@OUTPUT_SYNC_SUPPORTED@
  54 OUTPUT_SYNC:=@OUTPUT_SYNC@
  55 
  56 # Override the shell with bash
  57 BASH:=@BASH@
  58 BASH_ARGS:=@BASH_ARGS@
  59 SHELL:=$(BASH) $(BASH_ARGS)
  60 
  61 # The "human readable" name of this configuration
  62 CONF_NAME:=@CONF_NAME@
  63 
  64 # The built jdk will run in this target system.
  65 OPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
  66 OPENJDK_TARGET_OS_TYPE:=@OPENJDK_TARGET_OS_TYPE@
  67 OPENJDK_TARGET_OS_ENV:=@OPENJDK_TARGET_OS_ENV@
  68 
  69 OPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@
  70 OPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@
  71 OPENJDK_TARGET_CPU_BITS:=@OPENJDK_TARGET_CPU_BITS@
  72 OPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
  73 
  74 COMPILE_TYPE:=@COMPILE_TYPE@
  75 
  76 # Legacy support
  77 OPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@
  78 OPENJDK_TARGET_CPU_LIBDIR:=@OPENJDK_TARGET_CPU_LIBDIR@
  79 OPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@
  80 OPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@
  81 OPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
  82 OPENJDK_TARGET_CPU_JLI_CFLAGS:=@OPENJDK_TARGET_CPU_JLI_CFLAGS@
  83 OPENJDK_TARGET_OS_EXPORT_DIR:=@OPENJDK_TARGET_OS_EXPORT_DIR@
  84 
  85 # We are building on this build system.
  86 # When not cross-compiling, it is the same as the target.
  87 OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
  88 OPENJDK_BUILD_OS_TYPE:=@OPENJDK_BUILD_OS_TYPE@
  89 OPENJDK_BUILD_OS_ENV:=@OPENJDK_BUILD_OS_ENV@
  90 
  91 OPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@
  92 OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
  93 OPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
  94 OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
  95 
  96 # Legacy OS values for use in release file.
  97 REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
  98 REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
  99 
 100 @SET_OPENJDK@
 101 LIBM:=@LIBM@
 102 LIBDL:=@LIBDL@
 103 
 104 # colon or semicolon
 105 PATH_SEP:=@PATH_SEP@
 106 
 107 # Save the original path before replacing it with the Visual Studio tools
 108 ORIGINAL_PATH:=@ORIGINAL_PATH@
 109 ifeq ($(OPENJDK_TARGET_OS), windows)
 110   # On Windows, the Visual Studio toolchain needs the PATH to be adjusted
 111   # to include Visual Studio tools (this needs to be in cygwin/msys style).
 112   export PATH:=@VS_PATH@
 113 endif
 114 
 115 SYSROOT_CFLAGS := @SYSROOT_CFLAGS@
 116 SYSROOT_LDFLAGS := @SYSROOT_LDFLAGS@
 117 
 118 # The top-level directory of the forest (SRC_ROOT is a traditional alias)
 119 TOPDIR:=@TOPDIR@
 120 # These two versions of TOPDIR are used in string comparisons
 121 ORIGINAL_TOPDIR:=@ORIGINAL_TOPDIR@
 122 CANONICAL_TOPDIR:=@CANONICAL_TOPDIR@
 123 SRC_ROOT:=@TOPDIR@
 124 
 125 OUTPUT_ROOT:=@OUTPUT_ROOT@
 126 JDK_TOPDIR:=@JDK_TOPDIR@
 127 LANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@
 128 CORBA_TOPDIR:=@CORBA_TOPDIR@
 129 JAXP_TOPDIR:=@JAXP_TOPDIR@
 130 JAXWS_TOPDIR:=@JAXWS_TOPDIR@
 131 HOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@
 132 NASHORN_TOPDIR:=@NASHORN_TOPDIR@
 133 
 134 IMPORT_MODULES_CLASSES:=@IMPORT_MODULES_CLASSES@
 135 IMPORT_MODULES_CMDS:=@IMPORT_MODULES_CMDS@
 136 IMPORT_MODULES_LIBS:=@IMPORT_MODULES_LIBS@
 137 IMPORT_MODULES_CONF:=@IMPORT_MODULES_CONF@
 138 IMPORT_MODULES_SRC:=@IMPORT_MODULES_SRC@
 139 IMPORT_MODULES_MAKE:=@IMPORT_MODULES_MAKE@
 140 
 141 COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
 142 
 143 # New (JEP-223) version information
 144 
 145 ## Building blocks of the version string
 146 # First three version numbers, with well-specified meanings (numerical)
 147 VERSION_MAJOR := @VERSION_MAJOR@
 148 VERSION_MINOR := @VERSION_MINOR@
 149 VERSION_SECURITY := @VERSION_SECURITY@
 150 # Optional fourth element for use by OpenJDK consumers (numerical)
 151 VERSION_PATCH := @VERSION_PATCH@
 152 # The pre-release identifier (string)
 153 VERSION_PRE := @VERSION_PRE@
 154 # The build number (numerical)
 155 VERSION_BUILD := @VERSION_BUILD@
 156 # Optional build information (string)
 157 VERSION_OPT := @VERSION_OPT@
 158 
 159 ## Composite variables
 160 # The version number as a dot separated sequence of numbers, e.g. 9.0.1
 161 VERSION_NUMBER := @VERSION_NUMBER@
 162 # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
 163 VERSION_NUMBER_FOUR_POSITIONS := @VERSION_NUMBER_FOUR_POSITIONS@
 164 # The complete version string, with additional build information
 165 VERSION_STRING := @VERSION_STRING@
 166 # The short version string, without trailing zeroes and just PRE, if present.
 167 VERSION_SHORT := @VERSION_SHORT@
 168 # The Java specification version. It should be equal to version number.
 169 VERSION_SPECIFICATION := @VERSION_NUMBER@
 170 # A GA version is defined by the PRE string being empty. Rather than testing for
 171 # that, this variable defines it with true/false.
 172 VERSION_IS_GA := @VERSION_IS_GA@
 173 
 174 # Convenience CFLAGS settings for passing version information into native programs.
 175 VERSION_CFLAGS := \
 176     -DVERSION_MAJOR=$(VERSION_MAJOR) \
 177     -DVERSION_MINOR=$(VERSION_MINOR) \
 178     -DVERSION_SECURITY=$(VERSION_SECURITY) \
 179     -DVERSION_PATCH=$(VERSION_PATCH) \
 180     -DVERSION_PRE='"$(VERSION_PRE)"' \
 181     -DVERSION_BUILD=$(VERSION_BUILD) \
 182     -DVERSION_OPT='"$(VERSION_OPT)"' \
 183     -DVERSION_NUMBER='"$(VERSION_NUMBER)"' \
 184     -DVERSION_STRING='"$(VERSION_STRING)"' \
 185     -DVERSION_SHORT='"$(VERSION_SHORT)"' \
 186     -DVERSION_SPECIFICATION='"$(VERSION_SPECIFICATION)"' \
 187     #
 188 
 189 # Platform naming variables
 190 LAUNCHER_NAME:=@LAUNCHER_NAME@
 191 PRODUCT_NAME:=@PRODUCT_NAME@
 192 PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
 193 JDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@
 194 COMPANY_NAME:=@COMPANY_NAME@
 195 MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
 196 MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
 197 USERNAME:=@USERNAME@
 198 
 199 # Different naming strings generated from the above information.
 200 RUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX)
 201 
 202 # How to compile the code: release, fastdebug or slowdebug
 203 DEBUG_LEVEL:=@DEBUG_LEVEL@
 204 
 205 # This is the JDK variant to build.
 206 # The JDK variant is a name for a specific set of modules to be compiled for the JDK.
 207 JDK_VARIANT:=@JDK_VARIANT@
 208 
 209 # Should we compile support for running with a graphical UI? (ie headful)
 210 # Should we compile support for running without? (ie headless)
 211 SUPPORT_HEADFUL:=@SUPPORT_HEADFUL@
 212 SUPPORT_HEADLESS:=@SUPPORT_HEADLESS@
 213 # Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options.
 214 @BUILD_HEADLESS@
 215 
 216 # These are the libjvms that we want to build.
 217 # The java launcher uses the default.
 218 # The others can be selected by specifying -client -server -minimal1 -zero or -zeroshark
 219 # on the java launcher command line.
 220 JVM_VARIANTS:=@JVM_VARIANTS@
 221 JVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@
 222 JVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@
 223 JVM_VARIANT_MINIMAL1:=@JVM_VARIANT_MINIMAL1@
 224 JVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@
 225 JVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@
 226 JVM_VARIANT_CORE:=@JVM_VARIANT_CORE@
 227 
 228 # Universal binaries on macosx
 229 MACOSX_UNIVERSAL=@MACOSX_UNIVERSAL@
 230 
 231 # Legacy setting: -debug or -fastdebug
 232 # Still used in version string...
 233 BUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@
 234 
 235 # JDK_OUTPUTDIR specifies where a working jvm is built.
 236 # You can run $(JDK_OUTPUTDIR)/bin/java
 237 # Though the layout of the contents of $(JDK_OUTPUTDIR) is not
 238 # yet the same as a default installation.
 239 #
 240 # When you run "make install" it will create the standardized
 241 # layout for the jdk and the jre inside the IMAGES_OUTPUTDIR subdir.
 242 # Then it will copy the contents of the jdk into the installation
 243 # directory.
 244 
 245 BUILD_OUTPUT:=@BUILD_OUTPUT@
 246 # Colon left out to be able to override IMAGES_OUTPUTDIR for bootcycle-images
 247 SUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/support
 248 BUILDTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/buildtools
 249 
 250 HOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
 251 JDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
 252 IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
 253 TESTMAKE_OUTPUTDIR=$(BUILD_OUTPUT)/test-make
 254 MAKESUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/make-support
 255 # This does not get overridden in a bootcycle build
 256 CONFIGURESUPPORT_OUTPUTDIR:=@CONFIGURESUPPORT_OUTPUTDIR@
 257 BUILDJDK_OUTPUTDIR=$(BUILD_OUTPUT)/buildjdk
 258 
 259 HOTSPOT_DIST=@HOTSPOT_DIST@
 260 
 261 BUILD_HOTSPOT=@BUILD_HOTSPOT@
 262 
 263 BUILD_FAILURE_HANDLER := @BUILD_FAILURE_HANDLER@
 264 
 265 # The boot jdk to use. This is overridden in bootcycle-spec.gmk. Make sure to keep
 266 # it in sync.
 267 BOOT_JDK:=@BOOT_JDK@
 268 
 269 BUILD_JDK:=@BUILD_JDK@
 270 CREATE_BUILDJDK:=@CREATE_BUILDJDK@
 271 
 272 # When compiling Java source to be run by the boot jdk
 273 # use these extra flags, eg -source 6 -target 6
 274 BOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
 275 
 276 # Information about the build system
 277 NUM_CORES:=@NUM_CORES@
 278 MEMORY_SIZE:=@MEMORY_SIZE@
 279 # Enable sjavac support = use a javac server,
 280 # multi core javac compilation and dependency tracking.
 281 ENABLE_SJAVAC:=@ENABLE_SJAVAC@
 282 ENABLE_JAVAC_SERVER:=@ENABLE_JAVAC_SERVER@
 283 # Store sjavac server synchronization files here, and
 284 # the sjavac server log files.
 285 SJAVAC_SERVER_DIR=$(MAKESUPPORT_OUTPUTDIR)/javacservers
 286 
 287 # Number of parallel jobs to use for compilation
 288 JOBS?=@JOBS@
 289 TEST_JOBS?=@TEST_JOBS@
 290 
 291 # Default make target
 292 DEFAULT_MAKE_TARGET:=@DEFAULT_MAKE_TARGET@
 293 
 294 FREETYPE_LIBS:=@FREETYPE_LIBS@
 295 FREETYPE_CFLAGS:=@FREETYPE_CFLAGS@
 296 FREETYPE_BUNDLE_LIB_PATH=@FREETYPE_BUNDLE_LIB_PATH@
 297 CUPS_CFLAGS:=@CUPS_CFLAGS@
 298 ALSA_LIBS:=@ALSA_LIBS@
 299 ALSA_CFLAGS:=@ALSA_CFLAGS@
 300 LIBFFI_LIBS:=@LIBFFI_LIBS@
 301 LIBFFI_CFLAGS:=@LIBFFI_CFLAGS@
 302 
 303 PACKAGE_PATH=@PACKAGE_PATH@
 304 
 305 # Source file for cacerts
 306 CACERTS_FILE=@CACERTS_FILE@
 307 
 308 # Enable unlimited crypto policy
 309 UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
 310 
 311 GCOV_ENABLED=@GCOV_ENABLED@
 312 
 313 # Necessary additional compiler flags to compile X11
 314 X_CFLAGS:=@X_CFLAGS@
 315 X_LIBS:=@X_LIBS@
 316 
 317 # The lowest required version of macosx to enforce compatiblity for
 318 MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
 319 
 320 # Toolchain type: gcc, clang, solstudio, lxc, microsoft...
 321 TOOLCHAIN_TYPE:=@TOOLCHAIN_TYPE@
 322 TOOLCHAIN_VERSION := @TOOLCHAIN_VERSION@
 323 
 324 # Option used to tell the compiler whether to create 32- or 64-bit executables
 325 COMPILER_TARGET_BITS_FLAG:=@COMPILER_TARGET_BITS_FLAG@
 326 COMPILER_SUPPORTS_TARGET_BITS_FLAG=@COMPILER_SUPPORTS_TARGET_BITS_FLAG@
 327 
 328 # Option used to pass a command file to the compiler
 329 COMPILER_COMMAND_FILE_FLAG:=@COMPILER_COMMAND_FILE_FLAG@
 330 
 331 # Option for specifying a file which saves the binder commands
 332 # produced by the link step (for debugging, currently AIX only)
 333 COMPILER_BINDCMD_FILE_FLAG:=@COMPILER_BINDCMD_FILE_FLAG@
 334 
 335 CC_OUT_OPTION:=@CC_OUT_OPTION@
 336 EXE_OUT_OPTION:=@EXE_OUT_OPTION@
 337 LD_OUT_OPTION:=@LD_OUT_OPTION@
 338 AR_OUT_OPTION:=@AR_OUT_OPTION@
 339 
 340 # Flags used for overriding the default opt setting for a C/C++ source file.
 341 C_O_FLAG_HIGHEST:=@C_O_FLAG_HIGHEST@
 342 C_O_FLAG_HI:=@C_O_FLAG_HI@
 343 C_O_FLAG_NORM:=@C_O_FLAG_NORM@
 344 C_O_FLAG_NONE:=@C_O_FLAG_NONE@
 345 CXX_O_FLAG_HIGHEST:=@CXX_O_FLAG_HIGHEST@
 346 CXX_O_FLAG_HI:=@CXX_O_FLAG_HI@
 347 CXX_O_FLAG_NORM:=@CXX_O_FLAG_NORM@
 348 CXX_O_FLAG_NONE:=@CXX_O_FLAG_NONE@
 349 
 350 C_FLAG_DEPS:=@C_FLAG_DEPS@
 351 CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
 352 
 353 DISABLE_WARNING_PREFIX := @DISABLE_WARNING_PREFIX@
 354 CFLAGS_WARNINGS_ARE_ERRORS:=@CFLAGS_WARNINGS_ARE_ERRORS@
 355 
 356 # A global flag (true or false) determining if native warnings are considered errors.
 357 WARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@
 358 
 359 CFLAGS_CCACHE:=@CFLAGS_CCACHE@
 360 NO_NULL_POINTER_CHECK_FLAG=@NO_NULL_POINTER_CHECK_CFLAG@
 361 NO_LIFETIME_DSE_CFLAG=@NO_LIFETIME_DSE_CFLAG@
 362 CXXSTD_CXXFLAG=@CXXSTD_CXXFLAG@
 363 
 364 # Tools that potentially need to be cross compilation aware.
 365 CC:=@FIXPATH@ @CCACHE@ @ICECC@ @CC@
 366 
 367 # CFLAGS used to compile the jdk native libraries (C-code)
 368 CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
 369 CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
 370 
 371 # CFLAGS used to compile the jdk native launchers (C-code)
 372 CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
 373 CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
 374 
 375 LDFLAGS_HASH_STYLE := @LDFLAGS_HASH_STYLE@
 376 
 377 CXX:=@FIXPATH@ @CCACHE@ @ICECC@ @CXX@
 378 
 379 CPP:=@FIXPATH@ @CPP@
 380 
 381 # The linker can be gcc or ld on unix systems, or link.exe on windows systems.
 382 LD:=@FIXPATH@ @LD@
 383 
 384 # Xcode SDK path
 385 SDKROOT:=@SDKROOT@
 386 
 387 # The linker on older SuSE distros (e.g. on SLES 10) complains with:
 388 # "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
 389 # if feeded with a version script which contains named tags.
 390 USING_BROKEN_SUSE_LD:=@USING_BROKEN_SUSE_LD@
 391 
 392 # LDFLAGS used to link the jdk native libraries (C-code)
 393 LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
 394 JDKLIB_LIBS:=@JDKLIB_LIBS@
 395 
 396 # LDFLAGS used to link the jdk native launchers (C-code)
 397 LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
 398 JDKEXE_LIBS:=@JDKEXE_LIBS@
 399 
 400 # LDFLAGS specific to C++ linking.
 401 LDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@
 402 
 403 # Sometimes a different linker is needed for c++ libs
 404 LDCXX:=@FIXPATH@ @LDCXX@
 405 # The flags for linking libstdc++ linker.
 406 LIBCXX:=@LIBCXX@
 407 
 408 # Compiler and linker flags used when building native tests
 409 CFLAGS_TESTLIB:=@CFLAGS_TESTLIB@
 410 CXXFLAGS_TESTLIB:=@CXXFLAGS_TESTLIB@
 411 CFLAGS_TESTEXE:=@CFLAGS_TESTEXE@
 412 CXXFLAGS_TESTEXE:=@CXXFLAGS_TESTEXE@
 413 LDFLAGS_TESTLIB:=@LDFLAGS_TESTLIB@
 414 LDFLAGS_TESTEXE:=@LDFLAGS_TESTEXE@
 415 
 416 # BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
 417 # build platform.
 418 BUILD_CC:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CC@
 419 BUILD_CXX:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CXX@
 420 BUILD_LD:=@FIXPATH@ @BUILD_LD@
 421 BUILD_LDCXX:=@FIXPATH@ @BUILD_LDCXX@
 422 BUILD_AS:=@FIXPATH@ @BUILD_AS@
 423 BUILD_AR:=@FIXPATH@ @BUILD_AR@
 424 BUILD_NM:=@FIXPATH@ @BUILD_NM@
 425 BUILD_OBJCOPY:=@BUILD_OBJCOPY@
 426 BUILD_STRIP:=@BUILD_STRIP@
 427 BUILD_SYSROOT_CFLAGS:=@BUILD_SYSROOT_CFLAGS@
 428 BUILD_SYSROOT_LDFLAGS:=@BUILD_SYSROOT_LDFLAGS@
 429 
 430 AS:=@FIXPATH@ @AS@
 431 
 432 # AR is used to create a static library (is ar in unix, lib.exe in windows)
 433 AR:=@FIXPATH@ @AR@
 434 ARFLAGS:=@ARFLAGS@
 435 
 436 NM:=@NM@
 437 GNM:=@GNM@
 438 STRIP:=@STRIP@
 439 
 440 LIPO:=@LIPO@
 441 
 442 # Options to linker to specify a mapfile.
 443 # (Note absence of := assignment, because we do not want to evaluate the macro body here)
 444 SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@
 445 
 446 # Options for C/CXX compiler to be used if linking is performed
 447 #   using reorder file
 448 C_FLAG_REORDER:=@C_FLAG_REORDER@
 449 CXX_FLAG_REORDER:=@CXX_FLAG_REORDER@
 450 
 451 #
 452 # Options for generating debug symbols
 453 COMPILE_WITH_DEBUG_SYMBOLS := @COMPILE_WITH_DEBUG_SYMBOLS@
 454 COPY_DEBUG_SYMBOLS := @COPY_DEBUG_SYMBOLS@
 455 ZIP_EXTERNAL_DEBUG_SYMBOLS := @ZIP_EXTERNAL_DEBUG_SYMBOLS@
 456 
 457 CFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@
 458 CXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@
 459 
 460 #
 461 # Compress (or not) jars
 462 COMPRESS_JARS=@COMPRESS_JARS@
 463 
 464 # Options to linker to specify the library name.
 465 # (Note absence of := assignment, because we do not want to evaluate the macro body here)
 466 SET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@
 467 
 468 SHARED_LIBRARY_FLAGS=@SHARED_LIBRARY_FLAGS@
 469 
 470 # Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
 471 # (Note absence of := assignment, because we do not want to evaluate the macro body here)
 472 SET_SHARED_LIBRARY_ORIGIN=@SET_SHARED_LIBRARY_ORIGIN@
 473 SET_EXECUTABLE_ORIGIN=@SET_EXECUTABLE_ORIGIN@
 474 
 475 # Different OS:es have different ways of naming shared libraries.
 476 # The SHARED_LIBRARY macro takes "verify" as and argument and returns:
 477 #    "libverify.so" or "libverify.dylib" or "verify.dll" depending on platform.
 478 # (Note absence of := assignment, because we do not want to evaluate the macro body here)
 479 SHARED_LIBRARY=@SHARED_LIBRARY@
 480 STATIC_LIBRARY=@STATIC_LIBRARY@
 481 LIBRARY_PREFIX:=@LIBRARY_PREFIX@
 482 SHARED_LIBRARY_SUFFIX:=@SHARED_LIBRARY_SUFFIX@
 483 STATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@
 484 EXE_SUFFIX:=@EXE_SUFFIX@
 485 OBJ_SUFFIX:=@OBJ_SUFFIX@
 486 STATIC_BUILD:=@STATIC_BUILD@
 487 
 488 STRIPFLAGS:=@STRIPFLAGS@
 489 
 490 JAVA_FLAGS:=@JAVA_FLAGS@
 491 JAVA_FLAGS_BIG:=@JAVA_FLAGS_BIG@
 492 JAVA_FLAGS_SMALL:=@JAVA_FLAGS_SMALL@
 493 JAVA_FLAGS_JAVAC:=@JAVA_FLAGS_JAVAC@
 494 JAVA_TOOL_FLAGS_SMALL:=@JAVA_TOOL_FLAGS_SMALL@
 495 SJAVAC_SERVER_JAVA_FLAGS:=@SJAVAC_SERVER_JAVA_FLAGS@
 496 
 497 # The *_CMD variables are defined separately to be easily overridden in bootcycle-spec.gmk
 498 # for bootcycle-images build. Make sure to keep them in sync. Do not use the *_CMD
 499 # versions of the variables directly.
 500 JAVA_CMD:=@JAVA@
 501 JAVAC_CMD:=@JAVAC@
 502 JAVAH_CMD:=@JAVAH@
 503 JAR_CMD:=@JAR@
 504 JARSIGNER_CMD:=@JARSIGNER@
 505 SJAVAC_SERVER_JAVA_CMD:=@SJAVAC_SERVER_JAVA@
 506 # These variables are meant to be used. They are defined with = instead of := to make
 507 # it possible to override only the *_CMD variables.
 508 JAVA=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
 509 JAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
 510 JAVA_JAVAC=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_JAVAC) $(JAVA_FLAGS)
 511 JAVAC=@FIXPATH@ $(JAVAC_CMD)
 512 JAVAH=@FIXPATH@ $(JAVAH_CMD)
 513 JAR=@FIXPATH@ $(JAR_CMD)
 514 JARSIGNER=@FIXPATH@ $(JARSIGNER_CMD)
 515 # A specific java binary with specific options can be used to run
 516 # the long running background sjavac servers and other long running tasks.
 517 SJAVAC_SERVER_JAVA=@FIXPATH@ @FIXPATH_DETACH_FLAG@ $(SJAVAC_SERVER_JAVA_CMD) \
 518     $(SJAVAC_SERVER_JAVA_FLAGS)
 519 
 520 # Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
 521 # overriding that value by using ?=.
 522 JAVAC_FLAGS?=@JAVAC_FLAGS@
 523 
 524 
 525 BUILD_JAVA_FLAGS:=-Xms64M -Xmx1100M
 526 BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
 527 
 528 # Use ?= as this can be overridden from bootcycle-spec.gmk
 529 BOOT_JDK_MODULAR ?= @BOOT_JDK_MODULAR@
 530 
 531 ifeq ($(BOOT_JDK_MODULAR), true)
 532   INTERIM_OVERRIDE_MODULES_ARGS = -Xpatch:$(BUILDTOOLS_OUTPUTDIR)/override_modules
 533   INTERIM_LANGTOOLS_ARGS = $(INTERIM_OVERRIDE_MODULES_ARGS)
 534   JAVAC_MAIN_CLASS = -m jdk.compiler/com.sun.tools.javac.Main
 535   JAVADOC_MAIN_CLASS = -m jdk.javadoc/jdk.javadoc.internal.tool.Main
 536 else
 537   INTERIM_OVERRIDE_MODULES := java.compiler jdk.compiler \
 538       jdk.jdeps jdk.javadoc jdk.rmic
 539   INTERIM_OVERRIDE_MODULES_ARGS = \
 540       -Xbootclasspath/p:$(call PathList, \
 541           $(addprefix $(BUILDTOOLS_OUTPUTDIR)/override_modules/, \
 542               $(INTERIM_OVERRIDE_MODULES)))
 543   INTERIM_LANGTOOLS_ARGS = $(INTERIM_OVERRIDE_MODULES_ARGS) \
 544       -cp $(BUILDTOOLS_OUTPUTDIR)/override_modules/jdk.compiler
 545   JAVAC_MAIN_CLASS = com.sun.tools.javac.Main
 546   JAVADOC_MAIN_CLASS = jdk.javadoc.internal.tool.Main
 547 endif
 548 # You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...
 549 # Use = assignment to be able to override in bootcycle-spec.gmk
 550 NEW_JAVAC   = $(INTERIM_LANGTOOLS_ARGS) $(JAVAC_MAIN_CLASS)
 551 NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS)
 552 
 553 # JLink/Jmod are run using the BUILD_JDK, which is normally the jdk output dir.
 554 JLINK_KEEP_PACKAGED_MODULES:=@JLINK_KEEP_PACKAGED_MODULES@
 555 
 556 JLINK = @FIXPATH@ $(BUILD_JDK)/bin/jlink $(JAVA_TOOL_FLAGS_SMALL)
 557 JMOD = @FIXPATH@ $(BUILD_JDK)/bin/jmod $(JAVA_TOOL_FLAGS_SMALL)
 558 
 559 # Base flags for RC
 560 # Guarding this against resetting value. Legacy make files include spec multiple
 561 # times.
 562 ifndef RC_FLAGS
 563   RC_FLAGS:=@RC_FLAGS@
 564 endif
 565 
 566 # Tools adhering to a minimal and common standard of posix compliance.
 567 AWK:=@AWK@
 568 BASENAME:=@BASENAME@
 569 CAT:=@CAT@
 570 CCACHE:=@CCACHE@
 571 # CD is going away, but remains to cater for legacy makefiles.
 572 CD:=cd
 573 CHMOD:=@CHMOD@
 574 CODESIGN:=@CODESIGN@
 575 COMM:=@COMM@
 576 CP:=@CP@
 577 CPIO:=@CPIO@
 578 CUT:=@CUT@
 579 DATE:=@DATE@
 580 DIFF:=@DIFF@
 581 DIRNAME:=@DIRNAME@
 582 DSYMUTIL:=@DSYMUTIL@
 583 FIND:=@FIND@
 584 FIND_DELETE:=@FIND_DELETE@
 585 ECHO:=@ECHO@
 586 EGREP:=@EGREP@
 587 FGREP:=@FGREP@
 588 GREP:=@GREP@
 589 HEAD:=@HEAD@
 590 LS:=@LS@
 591 LN:=@LN@
 592 MKDIR:=@MKDIR@
 593 MV:=@MV@
 594 NAWK:=@NAWK@
 595 NICE:=@NICE@
 596 PATCH:=@PATCH@
 597 PRINTF:=@PRINTF@
 598 PWD:=@THEPWDCMD@
 599 RM:=@RM@
 600 RMDIR:=@RMDIR@
 601 SED:=@SED@
 602 SH:=@SH@
 603 SORT:=@SORT@
 604 TAR:=@TAR@
 605 TAIL:=@TAIL@
 606 TEE:=@TEE@
 607 TIME:=@TIME@
 608 IS_GNU_TIME:=@IS_GNU_TIME@
 609 TR:=@TR@
 610 TOUCH:=@TOUCH@
 611 UNIQ:=@UNIQ@
 612 WC:=@WC@
 613 XARGS:=@XARGS@
 614 ZIPEXE:=@ZIP@
 615 ZIP:=@ZIP@
 616 UNZIP:=@UNZIP@
 617 MT:=@FIXPATH@ @MT@
 618 RC:=@FIXPATH@ @RC@
 619 DUMPBIN:=@FIXPATH@ @DUMPBIN@
 620 CYGPATH:=@CYGPATH@
 621 LDD:=@LDD@
 622 OTOOL:=@OTOOL@
 623 READELF:=@READELF@
 624 EXPR:=@EXPR@
 625 FILE:=@FILE@
 626 HG:=@HG@
 627 OBJCOPY:=@OBJCOPY@
 628 SETFILE:=@SETFILE@
 629 XATTR:=@XATTR@
 630 JT_HOME:=@JT_HOME@
 631 JTREGEXE:=@JTREGEXE@
 632 XCODEBUILD=@XCODEBUILD@
 633 FIXPATH:=@FIXPATH@
 634 
 635 # Build setup
 636 ENABLE_JFR=@ENABLE_JFR@
 637 ENABLE_INTREE_EC=@ENABLE_INTREE_EC@
 638 USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
 639 USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
 640 USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
 641 LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
 642 MSVCR_DLL:=@MSVCR_DLL@
 643 MSVCP_DLL:=@MSVCP_DLL@
 644 
 645 ####################################################
 646 #
 647 # INSTALLATION
 648 #
 649 
 650 # Common prefix for all installed files. Defaults to /usr/local,
 651 # but /opt/myjdk is another common version.
 652 INSTALL_PREFIX=@prefix@
 653 
 654 # Directories containing architecture-dependent files should be relative to exec_prefix
 655 INSTALL_EXECPREFIX=@exec_prefix@
 656 
 657 # java,javac,javah,javap etc are installed here.
 658 INSTALL_BINDIR=@bindir@
 659 
 660 # Read only architecture-independent data
 661 INSTALL_DATADIR=@datadir@
 662 
 663 # Root of above.
 664 INSTALL_DATAROOTDIR=@datarootdir@
 665 
 666 # Doc files, other than info and man.
 667 INSTALL_DOCDIR=@docdir@
 668 
 669 # Html documentation
 670 INSTALL_HTMLDIR=@htmldir@
 671 
 672 # Installing C header files, JNI headers for example.
 673 INSTALL_INCLUDEDIR=@includedir@
 674 
 675 # Installing library files....
 676 INSTALL_INCLUDEDIR=@libdir@
 677 
 678 # Executables that other programs run.
 679 INSTALL_LIBEXECDIR=@libexecdir@
 680 
 681 # Locale-dependent but architecture-independent data, such as message catalogs.
 682 INSTALL_LOCALEDIR=@localedir@
 683 
 684 # Modifiable single-machine data
 685 INSTALL_LOCALSTATEDIR=@localstatedir@
 686 
 687 # Man pages
 688 INSTALL_MANDIR=@mandir@
 689 
 690 # Modifiable architecture-independent data.
 691 INSTALL_SHAREDSTATEDIR=@sharedstatedir@
 692 
 693 # Read-only single-machine data
 694 INSTALL_SYSCONFDIR=@sysconfdir@
 695 
 696 ####################################################
 697 #
 698 # Libraries
 699 #
 700 
 701 USE_EXTERNAL_LCMS:=@USE_EXTERNAL_LCMS@
 702 LCMS_CFLAGS:=@LCMS_CFLAGS@
 703 LCMS_LIBS:=@LCMS_LIBS@
 704 
 705 USE_EXTERNAL_LIBPNG:=@USE_EXTERNAL_LIBPNG@
 706 PNG_LIBS:=@PNG_LIBS@
 707 PNG_CFLAGS:=@PNG_CFLAGS@
 708 
 709 
 710 ####################################################
 711 #
 712 # Misc
 713 #
 714 
 715 INCLUDE_SA=@INCLUDE_SA@
 716 
 717 OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
 718 OS_VERSION_MINOR:=@OS_VERSION_MINOR@
 719 OS_VERSION_MICRO:=@OS_VERSION_MICRO@
 720 
 721 # Images directory definitions
 722 JDK_IMAGE_SUBDIR:=jdk
 723 JRE_IMAGE_SUBDIR:=jre
 724 
 725 # Colon left out to be able to override output dir for bootcycle-images
 726 JDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
 727 JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
 728 
 729 # Test image, as above
 730 TEST_IMAGE_SUBDIR:=test
 731 TEST_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(TEST_IMAGE_SUBDIR)
 732 
 733 # Symbols image
 734 SYMBOLS_IMAGE_SUBDIR:=symbols
 735 SYMBOLS_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(SYMBOLS_IMAGE_SUBDIR)
 736 
 737 # Macosx bundles directory definitions
 738 JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle/jdk-$(VERSION_NUMBER).jdk/Contents
 739 JRE_MACOSX_BUNDLE_SUBDIR=jre-bundle/jre-$(VERSION_NUMBER).jre/Contents
 740 JDK_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR)
 741 JRE_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR)
 742 
 743 # This macro is called to allow inclusion of closed source counterparts.
 744 # Unless overridden in closed sources, it expands to nothing.
 745 # Usage: This function is called in an open makefile, with the following
 746 # arguments:
 747 # $1 the name of the repo, or empty if the top-level repo.
 748 # $2 the name of the makefile
 749 define IncludeCustomExtension
 750 endef
 751 
 752 # Include the custom-spec.gmk file if it exists
 753 -include $(dir @SPEC@)/custom-spec.gmk