annotate common/autoconf/spec.gmk.in @ 14111:2a82ecb35fc7

8000992: Update new build-infra makefiles Summary: Build-infra project integration. Multiple authors on this work: erikj and ihse primarily, also changes from ohair, tbell, and dholmes. Special credit to ohstrom for his smartjavac work. Reviewed-by: erikj, ihse, dholmes, tbell
author ohair
date Fri, 26 Oct 2012 14:29:57 -0700
parents 5262b00bc10c
children 1b447f5cb0d1
rev   line source
ohair@12258 1 #
ohair@12258 2 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
ohair@12258 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ohair@12258 4 #
ohair@12258 5 # This code is free software; you can redistribute it and/or modify it
ohair@12258 6 # under the terms of the GNU General Public License version 2 only, as
ohair@12258 7 # published by the Free Software Foundation. Oracle designates this
ohair@12258 8 # particular file as subject to the "Classpath" exception as provided
ohair@12258 9 # by Oracle in the LICENSE file that accompanied this code.
ohair@12258 10 #
ohair@12258 11 # This code is distributed in the hope that it will be useful, but WITHOUT
ohair@12258 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ohair@12258 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ohair@12258 14 # version 2 for more details (a copy is included in the LICENSE file that
ohair@12258 15 # accompanied this code).
ohair@12258 16 #
ohair@12258 17 # You should have received a copy of the GNU General Public License version
ohair@12258 18 # 2 along with this work; if not, write to the Free Software Foundation,
ohair@12258 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ohair@12258 20 #
ohair@12258 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@12258 22 # or visit www.oracle.com if you need additional information or have any
ohair@12258 23 # questions.
ohair@12258 24 #
ohair@12258 25
ohair@13697 26 # Configured @DATE_WHEN_CONFIGURED@ to build
ohair@13697 27 # for target system @OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU@
ohair@13697 28 # (called @OPENJDK_TARGET_AUTOCONF_NAME@ by autoconf)
ohair@13697 29 # on build system @OPENJDK_BUILD_OS@-@OPENJDK_BUILD_CPU@
ohair@13697 30 # (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf)
erikj@13132 31 # using 'configure @CONFIGURE_COMMAND_LINE@'
ohair@12258 32
ohair@12258 33 # When calling macros, the spaces between arguments are
ohair@12258 34 # often semantically important! Sometimes we need to subst
ohair@12258 35 # spaces and commas, therefore we need the following macros.
ohair@12258 36 X:=
ohair@12258 37 SPACE:=$(X) $(X)
ohair@12258 38 COMMA:=,
ohair@12258 39 HASH:=\#
ohair@12258 40 SQUOTE:='
ohair@12258 41 #'
ohair@12258 42 DQUOTE:="
ohair@12258 43 #"
ohair@14111 44 define NEWLINE
ohair@14111 45
ohair@14111 46
ohair@12258 47 endef
ohair@12258 48
ohair@13697 49 # A self-referential reference to this file.
ohair@13697 50 SPEC:=@SPEC@
ohair@13697 51
ohair@13697 52 # Specify where the spec file is.
ohair@13697 53 MAKE_ARGS="SPEC=$(SPEC)"
ohair@13697 54
ohair@14111 55 MAKE:=@MAKE@
ohair@12258 56
ohair@12258 57 # Pass along the verbosity setting.
ohair@12258 58 ifeq (,$(findstring VERBOSE=,$(MAKE)))
ohair@12258 59 MAKE:=$(MAKE) $(VERBOSE) VERBOSE="$(VERBOSE)"
ohair@12258 60 endif
ohair@12258 61
ohair@12258 62 # No implicit variables or rules!
ohair@12258 63 ifeq (,$(findstring -R,$(MAKE)))
ohair@12258 64 MAKE:=$(MAKE) -R
ohair@12258 65 endif
ohair@12258 66
ohair@12258 67 # Specify where the common include directory for makefiles is.
ohair@12258 68 ifeq (,$(findstring -I @SRC_ROOT@/common/makefiles,$(MAKE)))
ohair@12258 69 MAKE:=$(MAKE) -I @SRC_ROOT@/common/makefiles
ohair@12258 70 endif
ohair@12258 71
erikj@12801 72 # The "human readable" name of this configuration
erikj@12801 73 CONF_NAME:=@CONF_NAME@
erikj@12801 74
erikj@13132 75 # The built jdk will run in this target system.
erikj@13132 76 OPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
erikj@13132 77 OPENJDK_TARGET_OS_API:=@OPENJDK_TARGET_OS_API@
ohair@14111 78 OPENJDK_TARGET_OS_ENV:=@OPENJDK_TARGET_OS_ENV@
erikj@13132 79
erikj@13132 80 OPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@
erikj@13132 81 OPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@
erikj@13132 82 OPENJDK_TARGET_CPU_BITS:=@OPENJDK_TARGET_CPU_BITS@
erikj@13132 83 OPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
ohair@12258 84
ohair@13697 85 COMPILE_TYPE:=@COMPILE_TYPE@
ohair@13697 86
ohair@13697 87 # Legacy support
ohair@13697 88 OPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@
ohair@13697 89 OPENJDK_TARGET_CPU_LIBDIR:=@OPENJDK_TARGET_CPU_LIBDIR@
ohair@13697 90 OPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@
ohair@13697 91 OPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@
ohair@13697 92 OPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
ohair@13697 93 OPENJDK_TARGET_CPU_JLI_CFLAGS:=@OPENJDK_TARGET_CPU_JLI_CFLAGS@
ohair@13697 94 OPENJDK_TARGET_OS_API_DIR:=@OPENJDK_TARGET_OS_API_DIR@
ohair@13697 95
ohair@12258 96 # We are building on this build system.
erikj@13132 97 # When not cross-compiling, it is the same as the target.
erikj@13132 98 OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
erikj@13132 99 OPENJDK_BUILD_OS_API:=@OPENJDK_BUILD_OS_API@
erikj@13132 100
erikj@13132 101 OPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@
erikj@13132 102 OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
erikj@13132 103 OPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
erikj@13132 104 OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
ohair@12258 105
erikj@12801 106 # Legacy OS values for use in release file.
erikj@12801 107 REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
erikj@12801 108 REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
erikj@12801 109
ohair@12258 110 @SET_OPENJDK@
ohair@12258 111 LIBM:=-lm
erikj@12801 112 LIBDL:=@LIBDL@
ohair@12258 113
ohair@12258 114 # colon or semicolon
ohair@12258 115 PATH_SEP:=@PATH_SEP@
ohair@12258 116
ohair@14111 117 ifeq ($(OPENJDK_TARGET_OS), windows)
ohair@14111 118 # On Windows, the Visual Studio toolchain needs the LIB and INCLUDE
ohair@14111 119 # environment variables (in Windows path style), and the PATH needs to
ohair@14111 120 # be adjusted to include Visual Studio tools (but this needs to be in
ohair@14111 121 # cygwin/msys style).
ohair@14111 122 export PATH:=@VS_PATH@
ohair@14111 123 export INCLUDE:=@VS_INCLUDE@
ohair@14111 124 export LIB:=@VS_LIB@
ohair@14111 125 endif
ohair@12258 126
ohair@12258 127 # The sys root where standard headers and libraries are found.
ohair@12258 128 # Usually not needed since the configure script should have
ohair@12258 129 # taken it into account already when setting CFLAGS et al.
ohair@12258 130 SYS_ROOT:=@SYS_ROOT@
ohair@12258 131
ohair@12258 132 # Paths to the source code
ohair@12258 133 SRC_ROOT:=@SRC_ROOT@
ohair@12258 134 ADD_SRC_ROOT:=@ADD_SRC_ROOT@
ohair@12258 135 OVERRIDE_SRC_ROOT:=@OVERRIDE_SRC_ROOT@
ohair@12258 136 TOPDIR:=@SRC_ROOT@
ohair@12258 137 OUTPUT_ROOT:=@OUTPUT_ROOT@
ohair@12258 138 JDK_TOPDIR:=@JDK_TOPDIR@
ohair@12258 139 LANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@
ohair@12258 140 CORBA_TOPDIR:=@CORBA_TOPDIR@
ohair@12258 141 JAXP_TOPDIR:=@JAXP_TOPDIR@
ohair@12258 142 JAXWS_TOPDIR:=@JAXWS_TOPDIR@
ohair@12258 143 HOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@
ohair@12258 144 COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
ohair@12258 145
ohair@13697 146 # Location where build customization files may be found
ohair@13697 147 CUSTOM_MAKE_DIR:=@CUSTOM_MAKE_DIR@
ohair@13697 148
ohair@12258 149 # Information gathered from the version.numbers file.
ohair@12258 150 JDK_MAJOR_VERSION:=@JDK_MAJOR_VERSION@
ohair@12258 151 JDK_MINOR_VERSION:=@JDK_MINOR_VERSION@
ohair@12258 152 JDK_MICRO_VERSION:=@JDK_MICRO_VERSION@
ohair@12258 153 JDK_UPDATE_VERSION:=@JDK_UPDATE_VERSION@
ohair@12258 154 JDK_BUILD_NUMBER:=@JDK_BUILD_NUMBER@
ohair@12258 155 MILESTONE:=@MILESTONE@
ohair@12258 156 LAUNCHER_NAME:=@LAUNCHER_NAME@
ohair@12258 157 PRODUCT_NAME:=@PRODUCT_NAME@
ohair@12258 158 PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
ohair@12258 159 JDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@
ohair@12258 160 COMPANY_NAME:=@COMPANY_NAME@
ohair@14111 161 MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
ohair@14111 162 MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
ohair@12258 163
ohair@12258 164 # Different version strings generated from the above information.
ohair@12258 165 JDK_VERSION:=@JDK_VERSION@
ohair@12258 166 RUNTIME_NAME:=@RUNTIME_NAME@
ohair@12258 167 FULL_VERSION:=@FULL_VERSION@
ohair@12258 168 JRE_RELEASE_VERSION:=@FULL_VERSION@
ohair@12258 169 RELEASE:=@RELEASE@
ohair@12258 170 COOKED_BUILD_NUMBER:=@COOKED_BUILD_NUMBER@
ohair@12258 171
ohair@12258 172 # How to compile the code: release, fastdebug or slowdebug
ohair@12258 173 DEBUG_LEVEL:=@DEBUG_LEVEL@
ohair@12258 174
ohair@12258 175 # This is the JDK variant to build.
ohair@12258 176 # The JDK variant is a name for a specific set of modules to be compiled for the JDK.
ohair@12258 177 JDK_VARIANT:=@JDK_VARIANT@
ohair@12258 178
ohair@12258 179 # Should we compile support for running with a graphical UI? (ie headful)
ohair@12258 180 # Should we compile support for running without? (ie headless)
ohair@12258 181 SUPPORT_HEADFUL:=@SUPPORT_HEADFUL@
ohair@12258 182 SUPPORT_HEADLESS:=@SUPPORT_HEADLESS@
ohair@12258 183 # Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options.
ohair@12258 184 @BUILD_HEADLESS@
ohair@12258 185
ohair@12258 186 # These are the libjvms that we want to build.
ohair@12258 187 # The java launcher uses the default.
ohair@12258 188 # The other can be selected by specifying -client -server -kernel -zero or -zeroshark
ohair@12258 189 # on the java launcher command line.
ohair@12258 190 JVM_VARIANTS:=@JVM_VARIANTS@
ohair@12258 191 JVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@
ohair@12258 192 JVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@
ohair@12258 193 JVM_VARIANT_KERNEL:=@JVM_VARIANT_KERNEL@
ohair@12258 194 JVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@
ohair@12258 195 JVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@
ohair@12258 196
ohair@13697 197 # Universal binaries on macosx
ohair@13697 198 MACOSX_UNIVERSAL=@MACOSX_UNIVERSAL@
ohair@13697 199
ohair@12258 200 # Legacy setting: -debug or -fastdebug
ohair@13697 201 # Still used in version string...
ohair@12258 202 BUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@
ohair@12258 203
ohair@13697 204 # JDK_OUTPUTDIR specifies where a working jvm is built.
ohair@12258 205 # You can run $(JDK_OUTPUTDIR)/bin/java
ohair@12258 206 # Though the layout of the contents of $(JDK_OUTPUTDIR) is not
ohair@12258 207 # yet the same as a default installation.
ohair@13697 208 #
ohair@12258 209 # When you run "make install" it will create the standardized
ohair@13697 210 # layout for the jdk and the jre inside the IMAGES_OUTPUTDIR subdir.
ohair@12258 211 # Then it will copy the contents of the jdk into the installation
ohair@12258 212 # directory.
erikj@13132 213
ohair@13697 214 BUILD_OUTPUT:=@BUILD_OUTPUT@
ohair@13697 215 LANGTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/langtools
ohair@13697 216 CORBA_OUTPUTDIR=$(BUILD_OUTPUT)/corba
ohair@13697 217 JAXP_OUTPUTDIR=$(BUILD_OUTPUT)/jaxp
ohair@13697 218 JAXWS_OUTPUTDIR=$(BUILD_OUTPUT)/jaxws
ohair@13697 219 HOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
ohair@13697 220 JDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
ohair@13697 221 IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
erikj@13132 222
ohair@13697 223 LANGTOOLS_DIST=$(LANGTOOLS_OUTPUTDIR)/dist
ohair@13697 224 CORBA_DIST=$(CORBA_OUTPUTDIR)/dist
ohair@13697 225 JAXP_DIST=$(JAXP_OUTPUTDIR)/dist
ohair@13697 226 JAXWS_DIST=$(JAXWS_OUTPUTDIR)/dist
ohair@13697 227 HOTSPOT_DIST=$(HOTSPOT_OUTPUTDIR)/dist
ohair@12258 228
ohair@12258 229 # The boot jdk to use
ohair@12258 230 BOOT_JDK:=@BOOT_JDK@
ohair@12258 231 BOOT_JDK_JVMARGS:=@BOOT_JDK_JVMARGS@
ohair@12258 232 BOOT_RTJAR:=@BOOT_RTJAR@
ohair@13697 233 BOOT_TOOLSJAR=$(BOOT_JDK)/lib/tools.jar
ohair@12258 234
ohair@12258 235 # When compiling Java source to be run by the boot jdk
ohair@12258 236 # use these extra flags, eg -source 6 -target 6
ohair@12258 237 BOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
ohair@12258 238
ohair@12258 239 # Information about the build system
ohair@12258 240 NUM_CORES:=@NUM_CORES@
ohair@13697 241 # Enable sjavac support = use a javac server,
ohair@13697 242 # multi core javac compilation and dependency tracking.
ohair@13697 243 ENABLE_SJAVAC:=@ENABLE_SJAVAC@
ohair@13697 244 # Store sjavac server synchronization files here, and
ohair@13697 245 # the sjavac server log files.
ohair@13697 246 SJAVAC_SERVER_DIR:=@SJAVAC_SERVER_DIR@
ohair@12258 247 # We can block the Javac server to never use more cores than this.
ohair@12258 248 # This is not for performance reasons, but for memory usage, since each
ohair@12258 249 # core requires its own JavaCompiler. We might have 64 cores and 4GB
ohair@12258 250 # of memory, 64 JavaCompilers will currently not fit in a 3GB heap.
ohair@12258 251 # Since there is no sharing of data between the JavaCompilers.
ohair@13697 252 SJAVAC_SERVER_CORES:=@SJAVAC_SERVER_CORES@
ohair@12258 253
ohair@12258 254 # The OpenJDK makefiles should be changed to using the standard
ohair@12258 255 # configure output ..._CFLAGS and ..._LIBS. In the meantime we
ohair@12258 256 # extract the information here.
ohair@12258 257 FREETYPE2_LIB_PATH:=@FREETYPE2_LIB_PATH@
ohair@12258 258 FREETYPE2_LIBS:=@FREETYPE2_LIBS@
ohair@12258 259 FREETYPE2_CFLAGS:=@FREETYPE2_CFLAGS@
ohair@12258 260 USING_SYSTEM_FT_LIB=@USING_SYSTEM_FT_LIB@
ohair@12258 261 CUPS_CFLAGS:=@CUPS_CFLAGS@
ohair@12258 262
ohair@12258 263 PACKAGE_PATH=@PACKAGE_PATH@
ohair@12258 264
erikj@12801 265 # Source file for cacerts
erikj@12801 266 CACERTS_FILE=@CACERTS_FILE@
ohair@12258 267
ohair@12258 268 # Necessary additional compiler flags to compile X11
ohair@12258 269 X_CFLAGS:=@X_CFLAGS@
ohair@12258 270 X_LIBS:=@X_LIBS@
ohair@12258 271 OPENWIN_HOME:=@OPENWIN_HOME@
ohair@12258 272
ohair@12258 273 # There are two types: CC or CL
ohair@12258 274 # CC is gcc and others behaving reasonably similar.
ohair@12258 275 # CL is cl.exe only.
ohair@12258 276 COMPILER_TYPE:=@COMPILER_TYPE@
ohair@12258 277
ohair@12258 278 CC_OUT_OPTION:=@CC_OUT_OPTION@
ohair@12258 279 EXE_OUT_OPTION:=@EXE_OUT_OPTION@
ohair@12258 280 LD_OUT_OPTION:=@LD_OUT_OPTION@
ohair@12258 281 AR_OUT_OPTION:=@AR_OUT_OPTION@
ohair@12258 282
ohair@12258 283 # Flags used for overriding the default opt setting for a C/C++ source file.
erikj@12801 284 C_O_FLAG_HIGHEST:=@C_O_FLAG_HIGHEST@
ohair@12258 285 C_O_FLAG_HI:=@C_O_FLAG_HI@
ohair@12258 286 C_O_FLAG_NORM:=@C_O_FLAG_NORM@
ohair@12258 287 C_O_FLAG_NONE:=@C_O_FLAG_NONE@
erikj@12801 288 CXX_O_FLAG_HIGHEST:=@CXX_O_FLAG_HIGHEST@
ohair@12258 289 CXX_O_FLAG_HI:=@CXX_O_FLAG_HI@
ohair@12258 290 CXX_O_FLAG_NORM:=@CXX_O_FLAG_NORM@
ohair@12258 291 CXX_O_FLAG_NONE:=@CXX_O_FLAG_NONE@
ohair@12258 292
erikj@12801 293 C_FLAG_DEPS:=@C_FLAG_DEPS@
erikj@12801 294 CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
erikj@12801 295
ohair@12258 296 # Tools that potentially need to be cross compilation aware.
ohair@14111 297 CC:=@FIXPATH@ @CCACHE@ @CC@
ohair@12258 298
ohair@12258 299 # CFLAGS used to compile the jdk native libraries (C-code)
ohair@12258 300 CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
ohair@12258 301 CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
ohair@12258 302
ohair@12258 303 # CFLAGS used to compile the jdk native launchers (C-code)
ohair@12258 304 CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
ohair@12258 305 CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
ohair@12258 306
ohair@14111 307 CXX:=@FIXPATH@ @CCACHE@ @CXX@
ohair@12258 308 #CXXFLAGS:=@CXXFLAGS@
ohair@12258 309
ohair@12258 310 OBJC:=@CCACHE@ @OBJC@
ohair@12258 311 #OBJCFLAGS:=@OBJCFLAGS@
ohair@12258 312
ohair@14111 313 CPP:=@FIXPATH@ @CPP@
ohair@12258 314 #CPPFLAGS:=@CPPFLAGS@
ohair@12258 315
ohair@13697 316 # The linker can be gcc or ld on posix systems, or link.exe on windows systems.
ohair@14111 317 LD:=@FIXPATH@ @LD@
ohair@12258 318
ohair@12258 319 # LDFLAGS used to link the jdk native libraries (C-code)
ohair@12258 320 LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
ohair@12258 321 LDFLAGS_JDKLIB_SUFFIX:=@LDFLAGS_JDKLIB_SUFFIX@
ohair@12258 322
ohair@12258 323 # On some platforms the linker cannot be used to create executables, thus
ohair@12258 324 # the need for a separate LDEXE command.
ohair@14111 325 LDEXE:=@FIXPATH@ @LDEXE@
ohair@12258 326
ohair@12258 327 # LDFLAGS used to link the jdk native launchers (C-code)
ohair@12258 328 LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
ohair@12258 329 LDFLAGS_JDKEXE_SUFFIX:=@LDFLAGS_JDKEXE_SUFFIX@
ohair@12258 330
ohair@13697 331 # LDFLAGS specific to C++ linking.
ohair@13697 332 LDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@
ohair@13697 333
ohair@12258 334 # Sometimes a different linker is needed for c++ libs
ohair@14111 335 LDCXX:=@FIXPATH@ @LDCXX@
ohair@12258 336 # The flags for linking libstdc++ linker.
ohair@12258 337 LIBCXX:=@LIBCXX@
ohair@12258 338
ohair@12258 339 # Sometimes a different linker is needed for c++ executables
ohair@14111 340 LDEXECXX:=@FIXPATH@ @LDEXECXX@
ohair@12258 341
ohair@13697 342 # BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
ohair@13697 343 # build platform.
ohair@14111 344 BUILD_CC:=@FIXPATH@ @BUILD_CC@
ohair@14111 345 BUILD_LD:=@FIXPATH@ @BUILD_LD@
erikj@13132 346
ohair@14111 347 AS:=@FIXPATH@ @AS@
ohair@12258 348
ohair@13697 349 # AR is used to create a static library (is ar in posix, lib.exe in windows)
ohair@14111 350 AR:=@FIXPATH@ @AR@
ohair@12258 351 ARFLAGS:=@ARFLAGS@
ohair@12258 352
ohair@13697 353 NM:=@NM@
ohair@13697 354 STRIP:=@STRIP@
ohair@13697 355 MCS:=@MCS@
ohair@13697 356
ohair@13697 357 LIPO:=@LIPO@
ohair@12258 358
ohair@12258 359 # Command to create a shared library
ohair@12258 360 SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@
ohair@12258 361
ohair@12258 362 # Options to linker to specify a mapfile.
ohair@12258 363 # (Note absence of := assignment, because we do not want to evaluate the macro body here)
ohair@12258 364 SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@
ohair@12258 365
erikj@12801 366 # Options for C/CXX compiler to be used if linking is performed
erikj@12801 367 # using reorder file
erikj@12801 368 C_FLAG_REORDER:=@C_FLAG_REORDER@
erikj@12801 369 CXX_FLAG_REORDER:=@CXX_FLAG_REORDER@
erikj@12801 370
erikj@13132 371 #
erikj@13132 372 # Options for generating debug symbols
erikj@13132 373 ENABLE_DEBUG_SYMBOLS:=@ENABLE_DEBUG_SYMBOLS@
erikj@13132 374 CFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@
erikj@13132 375 CXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@
erikj@13132 376 ZIP_DEBUGINFO_FILES:=@ZIP_DEBUGINFO_FILES@
erikj@13132 377
erikj@13132 378 #
erikj@13132 379 # Compress (or not) jars
erikj@13132 380 COMPRESS_JARS=@COMPRESS_JARS@
erikj@13132 381
ohair@12258 382 # Options to linker to specify the library name.
ohair@12258 383 # (Note absence of := assignment, because we do not want to evaluate the macro body here)
ohair@12258 384 SET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@
ohair@12258 385
ohair@12258 386 # Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
ohair@12258 387 # (Note absence of := assignment, because we do not want to evaluate the macro body here)
ohair@12258 388 SET_SHARED_LIBRARY_ORIGIN=@SET_SHARED_LIBRARY_ORIGIN@
ohair@13697 389 SET_EXECUTABLE_ORIGIN=@SET_EXECUTABLE_ORIGIN@
ohair@12258 390
ohair@12258 391 # Different OS:es have different ways of naming shared libraries.
ohair@12258 392 # The SHARED_LIBRARY macro takes "verify" as and argument and returns:
ohair@12258 393 # "libverify.so" or "libverify.dylib" or "verify.dll" depending on platform.
ohair@12258 394 # (Note absence of := assignment, because we do not want to evaluate the macro body here)
ohair@12258 395 SHARED_LIBRARY=@SHARED_LIBRARY@
ohair@12258 396 STATIC_LIBRARY=@STATIC_LIBRARY@
ohair@12258 397 LIBRARY_PREFIX:=@LIBRARY_PREFIX@
ohair@12258 398 SHARED_LIBRARY_SUFFIX:=@SHARED_LIBRARY_SUFFIX@
ohair@12258 399 STATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@
ohair@12258 400 EXE_SUFFIX:=@EXE_SUFFIX@
ohair@12258 401 OBJ_SUFFIX:=@OBJ_SUFFIX@
ohair@12258 402
erikj@12801 403 POST_STRIP_CMD:=@POST_STRIP_CMD@
erikj@12801 404 POST_MCS_CMD:=@POST_MCS_CMD@
erikj@12801 405
ohair@12258 406 JAVA_FLAGS:=@BOOT_JDK_JVMARGS@
ohair@12258 407
ohair@14111 408 JAVA=@FIXPATH@ $(BOOT_JDK)/bin/java $(JAVA_FLAGS)
ohair@12258 409
ohair@14111 410 JAVAC=@FIXPATH@ $(BOOT_JDK)/bin/javac
ohair@13697 411 # Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
ohair@13697 412 # overriding that value by using ?=.
ohair@13697 413 JAVAC_FLAGS?=@JAVAC_FLAGS@
ohair@12258 414
ohair@14111 415 JAVAH=@FIXPATH@ $(BOOT_JDK)/bin/javah
ohair@12258 416
ohair@14111 417 JAR=@FIXPATH@ $(BOOT_JDK)/bin/jar
ohair@12258 418
ohair@14111 419 RMIC=@FIXPATH@ $(BOOT_JDK)/bin/rmic
ohair@12258 420
ohair@14111 421 NATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii
ohair@12258 422
ohair@12258 423 # Base flags for RC
ohair@12258 424 # Guarding this against resetting value. Legacy make files include spec multiple
ohair@12258 425 # times.
ohair@12258 426 ifndef RC_FLAGS
ohair@12258 427 RC_FLAGS:=@RC_FLAGS@
ohair@12258 428 endif
ohair@12258 429
ohair@12258 430 # A specific java binary with specific options can be used to run
ohair@13697 431 # the long running background sjavac servers and other long running tasks.
ohair@14111 432 SJAVAC_SERVER_JAVA:=@FIXPATH@ @SJAVAC_SERVER_JAVA@
ohair@12258 433
ohair@12258 434 # Tools adhering to a minimal and common standard of posix compliance.
ohair@12258 435 AWK:=@AWK@
ohair@13697 436 BASENAME:=@BASENAME@
ohair@14111 437 BASH:=@BASH@
ohair@12258 438 CAT:=@CAT@
ohair@12258 439 CCACHE:=@CCACHE@
ohair@12258 440 # CD is going away, but remains to cater for legacy makefiles.
ohair@12258 441 CD:=cd
ohair@12258 442 CHMOD:=@CHMOD@
ohair@12258 443 CP:=@CP@
ohair@12258 444 CUT:=@CUT@
ohair@12258 445 DATE:=@DATE@
ohair@12258 446 DIFF:=@DIFF@
ohair@12258 447 FIND:=@FIND@
ohair@12258 448 FIND_DELETE:=@FIND_DELETE@
ohair@12258 449 ECHO:=@ECHO@
ohair@12258 450 EGREP:=@EGREP@
ohair@12258 451 FGREP:=@FGREP@
ohair@12258 452 GREP:=@GREP@
ohair@12258 453 HEAD:=@HEAD@
ohair@12258 454 LS:=@LS@
ohair@12258 455 LN:=@LN@
ohair@12258 456 MKDIR:=@MKDIR@
ohair@12258 457 MV:=@MV@
ohair@12258 458 NAWK:=@NAWK@
ohair@12258 459 PRINTF:=@PRINTF@
ohair@12258 460 PWD:=@THEPWDCMD@
ohair@12258 461 RM:=@RM@
ohair@12258 462 SED:=@SED@
ohair@12258 463 SH:=@SH@
ohair@12258 464 SORT:=@SORT@
ohair@12258 465 TAR:=@TAR@
ohair@12258 466 TAIL:=@TAIL@
ohair@12258 467 TEE:=@TEE@
ohair@14111 468 TIME:=@TIME@
ohair@12258 469 TR:=@TR@
ohair@12258 470 TOUCH:=@TOUCH@
ohair@12258 471 WC:=@WC@
ohair@12258 472 XARGS:=@XARGS@
ohair@12258 473 ZIPEXE:=@ZIP@
ohair@12258 474 ZIP:=@ZIP@
ohair@12258 475 UNZIP:=@UNZIP@
ohair@14111 476 MT:=@FIXPATH@ @MT@
ohair@14111 477 RC:=@FIXPATH@ @RC@
ohair@14111 478 DUMPBIN:=@FIXPATH@ @DUMPBIN@
ohair@12258 479 CYGPATH:=@CYGPATH@
ohair@12258 480 LDD:=@LDD@
ohair@12258 481 OTOOL:=@OTOOL@
ohair@12258 482 READELF:=@READELF@
ohair@12258 483 EXPR:=@EXPR@
ohair@12258 484 FILE:=@FILE@
erikj@12801 485 HG:=@HG@
erikj@13132 486 OBJCOPY:=@OBJCOPY@
ohair@14111 487 SETFILE:=@SETFILE@
ohair@12258 488
ohair@14111 489 FIXPATH:=@FIXPATH@
ohair@12258 490
ohair@12258 491 # Where the build output is stored for your convenience.
ohair@12258 492 BUILD_LOG:=@BUILD_LOG@
erikj@13132 493 BUILD_LOG_PREVIOUS:=@BUILD_LOG_PREVIOUS@
ohair@12258 494 BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
ohair@12258 495
ohair@12258 496 # Build setup
erikj@13132 497 ENABLE_JFR=@ENABLE_JFR@
ohair@12258 498 USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
ohair@12258 499 USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
ohair@12258 500 USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
erikj@13132 501 LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
ohair@14111 502 MSVCR_DLL:=@MSVCR_DLL@
ohair@12258 503
erikj@13132 504
ohair@12258 505 # ADD_SRCS takes a single argument with source roots
ohair@12258 506 # and appends any corresponding source roots found
ohair@12258 507 # below --with-add-source-root and below
ohair@12258 508 # --with-override-source-root. It is the responsibility
ohair@12258 509 # of the next macro to get rid of superfluous files.
ohair@12258 510 ADD_SRCS=$1
ohair@12258 511 ifneq (,$(ADD_SRC_ROOT))
ohair@12258 512 # Append wildcard rule to pickup any matching source roots found below ADD_SRC_ROOT
ohair@12258 513 ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(ADD_SRC_ROOT),$1))
ohair@12258 514 endif
ohair@12258 515 ifneq (,$(OVERRIDE_SRC_ROOT))
ohair@12258 516 # Append wildcard rule to pickup any matching source roots found below OVERRIDE_SRC_ROOT
ohair@12258 517 ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(OVERRIDE_SRC_ROOT),$1))
ohair@12258 518 endif
ohair@12258 519
ohair@12258 520 # OVR_SRCS creates a filter expression to filter out sources in
ohair@12258 521 # the original source directory that lie inside directories below
ohair@12258 522 # --with-override-source-root.
ohair@12258 523 # Use := here since we want to scan for these files here. To avoid recomputation later.
ohair@12258 524 # We cannot do the scan in configure, since that would force us to rerun configure when
ohair@12258 525 # we add overridden sources.
ohair@12258 526 ifneq (,$(OVERRIDE_SRC_ROOT))
ohair@12258 527 OVR_SRCS:=$(addsuffix %,$(subst $(OVERRIDE_SRC_ROOT),$(SRC_ROOT),$(sort $(dir $(shell $(FIND) $(OVERRIDE_SRC_ROOT) -type f)))))
ohair@12258 528 else
ohair@12258 529 OVR_SRCS:=
ohair@12258 530 endif
ohair@12258 531
ohair@12258 532 ####################################################
ohair@12258 533 #
ohair@12258 534 # INSTALLATION
ohair@12258 535 #
ohair@12258 536
ohair@12258 537 # Common prefix for all installed files. Defaults to /usr/local,
ohair@12258 538 # but /opt/myjdk is another common version.
ohair@12258 539 INSTALL_PREFIX=@prefix@
ohair@12258 540
ohair@12258 541 # Directories containing architecture-dependent files should be relative to exec_prefix
ohair@12258 542 INSTALL_EXECPREFIX=@exec_prefix@
ohair@12258 543
ohair@12258 544 # java,javac,javah,javap etc are installed here.
ohair@12258 545 INSTALL_BINDIR=@bindir@
ohair@12258 546
ohair@12258 547 # Read only architecture-independent data
ohair@12258 548 INSTALL_DATADIR=@datadir@
ohair@12258 549
ohair@12258 550 # Root of above.
ohair@12258 551 INSTALL_DATAROOTDIR=@datarootdir@
ohair@12258 552
ohair@12258 553 # Doc files, other than info and man.
ohair@12258 554 INSTALL_DOCDIR=@docdir@
ohair@12258 555
ohair@12258 556 # Html documentation
ohair@12258 557 INSTALL_HTMLDIR=@htmldir@
ohair@12258 558
ohair@12258 559 # Installing C header files, JNI headers for example.
ohair@12258 560 INSTALL_INCLUDEDIR=@includedir@
ohair@12258 561
ohair@12258 562 # Installing library files....
ohair@12258 563 INSTALL_INCLUDEDIR=@libdir@
ohair@12258 564
ohair@12258 565 # Executables that other programs run.
ohair@12258 566 INSTALL_LIBEXECDIR=@libexecdir@
ohair@12258 567
ohair@12258 568 # Locale-dependent but architecture-independent data, such as message catalogs.
ohair@12258 569 INSTALL_LOCALEDIR=@localedir@
ohair@12258 570
ohair@12258 571 # Modifiable single-machine data
ohair@12258 572 INSTALL_LOCALSTATEDIR=@localstatedir@
ohair@12258 573
ohair@12258 574 # Man pages
ohair@12258 575 INSTALL_MANDIR=@mandir@
ohair@12258 576
ohair@12258 577 # Modifiable architecture-independent data.
ohair@12258 578 INSTALL_SHAREDSTATEDIR=@sharedstatedir@
ohair@12258 579
ohair@12258 580 # Read-only single-machine data
ohair@12258 581 INSTALL_SYSCONFDIR=@sysconfdir@
ohair@12258 582
ohair@12258 583
ohair@12258 584 ####################################################
ohair@12258 585 #
ohair@12258 586 # Misc
ohair@12258 587 #
ohair@12258 588
erikj@12801 589 # Name of Service Agent library
erikj@12801 590 SALIB_NAME=@SALIB_NAME@
erikj@12801 591
erikj@12801 592 OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
erikj@12801 593 OS_VERSION_MINOR:=@OS_VERSION_MINOR@
erikj@12801 594 OS_VERSION_MICRO:=@OS_VERSION_MICRO@
erikj@12801 595
ohair@13697 596 # Include the custom-spec.gmk file if it exists
ohair@13697 597 -include $(dir @SPEC@)/custom-spec.gmk