spec.gmk.in 21.2 KB
Newer Older
1
#
I
ihse 已提交
2
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.  Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#

26 27 28 29 30
# Configured @DATE_WHEN_CONFIGURED@ to build
# for target system @OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU@
#   (called @OPENJDK_TARGET_AUTOCONF_NAME@ by autoconf)
# on build system @OPENJDK_BUILD_OS@-@OPENJDK_BUILD_CPU@
#   (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf)
31
# using 'configure @CONFIGURE_COMMAND_LINE@'
32

33 34
# When calling macros, the spaces between arguments are
# often semantically important! Sometimes we need to subst
35 36 37 38 39
# spaces and commas, therefore we need the following macros.
X:=
SPACE:=$(X) $(X)
COMMA:=,
HASH:=\#
40 41
LEFT_PAREN:=(
RIGHT_PAREN:=)
42 43 44 45
SQUOTE:='
#'
DQUOTE:="
#"
O
ohair 已提交
46 47 48
define NEWLINE


49 50
endef

51 52 53
# The command line given to configure.
CONFIGURE_COMMAND_LINE:=@CONFIGURE_COMMAND_LINE@

54 55 56 57 58 59
# A self-referential reference to this file.
SPEC:=@SPEC@

# Specify where the spec file is.
MAKE_ARGS="SPEC=$(SPEC)"

O
ohair 已提交
60
MAKE:=@MAKE@
61

E
erikj 已提交
62
# Pass along the verbosity and log level settings.
63
ifeq (,$(findstring VERBOSE=,$(MAKE)))
64
  MAKE:=$(MAKE) $(VERBOSE) VERBOSE="$(VERBOSE)" LOG_LEVEL="$(LOG_LEVEL)"
65 66 67 68
endif

# No implicit variables or rules!
ifeq (,$(findstring -R,$(MAKE)))
69
  MAKE:=$(MAKE) -R
70 71 72
endif

# Specify where the common include directory for makefiles is.
73 74
ifeq (,$(findstring -I @TOPDIR@/make/common,$(MAKE)))
  MAKE:=$(MAKE) -I @TOPDIR@/make/common
75 76
endif

77 78 79
# The "human readable" name of this configuration
CONF_NAME:=@CONF_NAME@

80 81 82
# The built jdk will run in this target system.
OPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
OPENJDK_TARGET_OS_API:=@OPENJDK_TARGET_OS_API@
O
ohair 已提交
83
OPENJDK_TARGET_OS_ENV:=@OPENJDK_TARGET_OS_ENV@
84 85 86 87 88

OPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@
OPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@
OPENJDK_TARGET_CPU_BITS:=@OPENJDK_TARGET_CPU_BITS@
OPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
89

90 91 92 93 94 95 96 97 98 99
COMPILE_TYPE:=@COMPILE_TYPE@

# Legacy support
OPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@
OPENJDK_TARGET_CPU_LIBDIR:=@OPENJDK_TARGET_CPU_LIBDIR@
OPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@
OPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@
OPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
OPENJDK_TARGET_CPU_JLI_CFLAGS:=@OPENJDK_TARGET_CPU_JLI_CFLAGS@
OPENJDK_TARGET_OS_API_DIR:=@OPENJDK_TARGET_OS_API_DIR@
100
OPENJDK_TARGET_OS_EXPORT_DIR:=@OPENJDK_TARGET_OS_EXPORT_DIR@
101

102
# We are building on this build system.
103 104 105
# When not cross-compiling, it is the same as the target.
OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
OPENJDK_BUILD_OS_API:=@OPENJDK_BUILD_OS_API@
106

107 108 109 110
OPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@
OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
OPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
111

112 113 114 115
# Legacy OS values for use in release file.
REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@

116 117
@SET_OPENJDK@
LIBM:=-lm
118
LIBDL:=@LIBDL@
119 120 121 122

# colon or semicolon
PATH_SEP:=@PATH_SEP@

O
ohair 已提交
123 124 125 126 127 128 129 130 131
ifeq ($(OPENJDK_TARGET_OS), windows)
  # On Windows, the Visual Studio toolchain needs the LIB and INCLUDE
  # environment variables (in Windows path style), and the PATH needs to
  # be adjusted to include Visual Studio tools (but this needs to be in
  # cygwin/msys style).
  export PATH:=@VS_PATH@
  export INCLUDE:=@VS_INCLUDE@
  export LIB:=@VS_LIB@
endif
132

133 134
SYSROOT_CFLAGS := @SYSROOT_CFLAGS@
SYSROOT_LDFLAGS := @SYSROOT_LDFLAGS@
135 136 137 138

# Paths to the source code
ADD_SRC_ROOT:=@ADD_SRC_ROOT@
OVERRIDE_SRC_ROOT:=@OVERRIDE_SRC_ROOT@
139 140 141 142 143

# The top-level directory of the forest (SRC_ROOT is a traditional alias)
TOPDIR:=@TOPDIR@
SRC_ROOT:=@TOPDIR@

144 145 146 147 148 149 150
OUTPUT_ROOT:=@OUTPUT_ROOT@
JDK_TOPDIR:=@JDK_TOPDIR@
LANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@
CORBA_TOPDIR:=@CORBA_TOPDIR@
JAXP_TOPDIR:=@JAXP_TOPDIR@
JAXWS_TOPDIR:=@JAXWS_TOPDIR@
HOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@
J
jjg 已提交
151
NASHORN_TOPDIR:=@NASHORN_TOPDIR@
152 153 154 155 156 157 158 159 160 161 162 163 164 165
COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@

# Information gathered from the version.numbers file.
JDK_MAJOR_VERSION:=@JDK_MAJOR_VERSION@
JDK_MINOR_VERSION:=@JDK_MINOR_VERSION@
JDK_MICRO_VERSION:=@JDK_MICRO_VERSION@
JDK_UPDATE_VERSION:=@JDK_UPDATE_VERSION@
JDK_BUILD_NUMBER:=@JDK_BUILD_NUMBER@
MILESTONE:=@MILESTONE@
LAUNCHER_NAME:=@LAUNCHER_NAME@
PRODUCT_NAME:=@PRODUCT_NAME@
PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
JDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@
COMPANY_NAME:=@COMPANY_NAME@
O
ohair 已提交
166 167
MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
168
USER_RELEASE_SUFFIX=@USER_RELEASE_SUFFIX@
169 170 171

# Different version strings generated from the above information.
JDK_VERSION:=@JDK_VERSION@
172
RUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX)
173
COOKED_BUILD_NUMBER:=@COOKED_BUILD_NUMBER@
174 175
# These variables need to be generated here so that MILESTONE and
# JDK_BUILD_NUMBER can be overridden on the make command line.
176
ifeq ($(MILESTONE), fcs)
177 178 179 180
  RELEASE=$(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
else
  RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
endif
181

182
ifneq ($(USER_RELEASE_SUFFIX), )
183 184 185 186
  FULL_VERSION=$(RELEASE)-$(USER_RELEASE_SUFFIX)-$(JDK_BUILD_NUMBER)
else
  FULL_VERSION=$(RELEASE)-$(JDK_BUILD_NUMBER)
endif
187
JRE_RELEASE_VERSION:=$(FULL_VERSION)
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204

# How to compile the code: release, fastdebug or slowdebug
DEBUG_LEVEL:=@DEBUG_LEVEL@

# This is the JDK variant to build.
# The JDK variant is a name for a specific set of modules to be compiled for the JDK.
JDK_VARIANT:=@JDK_VARIANT@

# Should we compile support for running with a graphical UI? (ie headful)
# Should we compile support for running without? (ie headless)
SUPPORT_HEADFUL:=@SUPPORT_HEADFUL@
SUPPORT_HEADLESS:=@SUPPORT_HEADLESS@
# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options.
@BUILD_HEADLESS@

# These are the libjvms that we want to build.
# The java launcher uses the default.
205
# The others can be selected by specifying -client -server -minimal1 -kernel -zero or -zeroshark
206 207 208 209
# on the java launcher command line.
JVM_VARIANTS:=@JVM_VARIANTS@
JVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@
JVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@
210
JVM_VARIANT_MINIMAL1:=@JVM_VARIANT_MINIMAL1@
211 212 213
JVM_VARIANT_KERNEL:=@JVM_VARIANT_KERNEL@
JVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@
JVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@
214
JVM_VARIANT_CORE:=@JVM_VARIANT_CORE@
215

216 217 218
# Universal binaries on macosx
MACOSX_UNIVERSAL=@MACOSX_UNIVERSAL@

219
# Legacy setting: -debug or -fastdebug
220
# Still used in version string...
221 222
BUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@

223
# JDK_OUTPUTDIR specifies where a working jvm is built.
224 225 226
# You can run $(JDK_OUTPUTDIR)/bin/java
# Though the layout of the contents of $(JDK_OUTPUTDIR) is not
# yet the same as a default installation.
227
#
228
# When you run "make install" it will create the standardized
229
# layout for the jdk and the jre inside the IMAGES_OUTPUTDIR subdir.
230 231
# Then it will copy the contents of the jdk into the installation
# directory.
232

233
BUILD_OUTPUT:=@BUILD_OUTPUT@
234
# Colon left out to be able to override IMAGES_OUTPUTDIR for bootcycle-images
235 236 237 238 239 240
LANGTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/langtools
CORBA_OUTPUTDIR=$(BUILD_OUTPUT)/corba
JAXP_OUTPUTDIR=$(BUILD_OUTPUT)/jaxp
JAXWS_OUTPUTDIR=$(BUILD_OUTPUT)/jaxws
HOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
JDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
J
jjg 已提交
241
NASHORN_OUTPUTDIR=$(BUILD_OUTPUT)/nashorn
242 243 244 245 246 247
IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images

LANGTOOLS_DIST=$(LANGTOOLS_OUTPUTDIR)/dist
CORBA_DIST=$(CORBA_OUTPUTDIR)/dist
JAXP_DIST=$(JAXP_OUTPUTDIR)/dist
JAXWS_DIST=$(JAXWS_OUTPUTDIR)/dist
248
HOTSPOT_DIST=@HOTSPOT_DIST@
J
jjg 已提交
249
NASHORN_DIST=$(NASHORN_OUTPUTDIR)/dist
250 251

BUILD_HOTSPOT=@BUILD_HOTSPOT@
252 253 254 255

# The boot jdk to use
BOOT_JDK:=@BOOT_JDK@
BOOT_RTJAR:=@BOOT_RTJAR@
256
BOOT_TOOLSJAR=$(BOOT_JDK)/lib/tools.jar
257 258 259 260 261 262 263

# When compiling Java source to be run by the boot jdk
# use these extra flags, eg -source 6 -target 6
BOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@

# Information about the build system
NUM_CORES:=@NUM_CORES@
264 265 266 267 268 269
# Enable sjavac support = use a javac server,
# multi core javac compilation and dependency tracking.
ENABLE_SJAVAC:=@ENABLE_SJAVAC@
# Store sjavac server synchronization files here, and
# the sjavac server log files.
SJAVAC_SERVER_DIR:=@SJAVAC_SERVER_DIR@
270

271 272 273
# Number of parallel jobs to use for compilation
JOBS?=@JOBS@

I
ihse 已提交
274 275 276
FREETYPE_LIBS:=@FREETYPE_LIBS@
FREETYPE_CFLAGS:=@FREETYPE_CFLAGS@
FREETYPE_BUNDLE_LIB_PATH=@FREETYPE_BUNDLE_LIB_PATH@
277
CUPS_CFLAGS:=@CUPS_CFLAGS@
278 279
ALSA_LIBS:=@ALSA_LIBS@
ALSA_CFLAGS:=@ALSA_CFLAGS@
280 281 282

PACKAGE_PATH=@PACKAGE_PATH@

283 284
# Source file for cacerts
CACERTS_FILE=@CACERTS_FILE@
285

286 287 288
# Enable unlimited crypto policy
UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@

289 290 291
# Enable RMIConnector IIOP transport
RMICONNECTOR_IIOP=@RMICONNECTOR_IIOP@

292
# Necessary additional compiler flags to compile X11
293 294 295
X_CFLAGS:=@X_CFLAGS@
X_LIBS:=@X_LIBS@

296
# The lowest required version of macosx to enforce compatiblity for
297
MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
298

299 300
# Toolchain type: gcc, clang, solstudio, lxc, microsoft...
TOOLCHAIN_TYPE:=@TOOLCHAIN_TYPE@
301

S
simonis 已提交
302 303
# Option used to tell the compiler whether to create 32- or 64-bit executables
COMPILER_TARGET_BITS_FLAG:=@COMPILER_TARGET_BITS_FLAG@
O
omajid 已提交
304 305
COMPILER_SUPPORTS_TARGET_BITS_FLAG=@COMPILER_SUPPORTS_TARGET_BITS_FLAG@

306 307 308 309 310 311
CC_OUT_OPTION:=@CC_OUT_OPTION@
EXE_OUT_OPTION:=@EXE_OUT_OPTION@
LD_OUT_OPTION:=@LD_OUT_OPTION@
AR_OUT_OPTION:=@AR_OUT_OPTION@

# Flags used for overriding the default opt setting for a C/C++ source file.
312
C_O_FLAG_HIGHEST:=@C_O_FLAG_HIGHEST@
313 314 315
C_O_FLAG_HI:=@C_O_FLAG_HI@
C_O_FLAG_NORM:=@C_O_FLAG_NORM@
C_O_FLAG_NONE:=@C_O_FLAG_NONE@
316
CXX_O_FLAG_HIGHEST:=@CXX_O_FLAG_HIGHEST@
317 318 319 320
CXX_O_FLAG_HI:=@CXX_O_FLAG_HI@
CXX_O_FLAG_NORM:=@CXX_O_FLAG_NORM@
CXX_O_FLAG_NONE:=@CXX_O_FLAG_NONE@

321 322 323
C_FLAG_DEPS:=@C_FLAG_DEPS@
CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@

324 325
CFLAGS_WARNINGS_ARE_ERRORS:=@CFLAGS_WARNINGS_ARE_ERRORS@

326
# Tools that potentially need to be cross compilation aware.
O
ohair 已提交
327
CC:=@FIXPATH@ @CCACHE@ @CC@
328 329 330 331 332 333 334 335 336

# CFLAGS used to compile the jdk native libraries (C-code)
CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@

# CFLAGS used to compile the jdk native launchers (C-code)
CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@

O
ohair 已提交
337
CXX:=@FIXPATH@ @CCACHE@ @CXX@
338 339 340 341 342
#CXXFLAGS:=@CXXFLAGS@

OBJC:=@CCACHE@ @OBJC@
#OBJCFLAGS:=@OBJCFLAGS@

O
ohair 已提交
343
CPP:=@FIXPATH@ @CPP@
344 345
#CPPFLAGS:=@CPPFLAGS@

346
# The linker can be gcc or ld on posix systems, or link.exe on windows systems.
O
ohair 已提交
347
LD:=@FIXPATH@ @LD@
348

349 350 351 352 353
# The linker on older SuSE distros (e.g. on SLES 10) complains with:
# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
# if feeded with a version script which contains named tags.
USING_BROKEN_SUSE_LD:=@USING_BROKEN_SUSE_LD@

354 355 356 357 358 359
# LDFLAGS used to link the jdk native libraries (C-code)
LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
LDFLAGS_JDKLIB_SUFFIX:=@LDFLAGS_JDKLIB_SUFFIX@

# On some platforms the linker cannot be used to create executables, thus
# the need for a separate LDEXE command.
O
ohair 已提交
360
LDEXE:=@FIXPATH@ @LDEXE@
361 362 363 364 365

# LDFLAGS used to link the jdk native launchers (C-code)
LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
LDFLAGS_JDKEXE_SUFFIX:=@LDFLAGS_JDKEXE_SUFFIX@

366 367 368
# LDFLAGS specific to C++ linking.
LDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@

369
# Sometimes a different linker is needed for c++ libs
O
ohair 已提交
370
LDCXX:=@FIXPATH@ @LDCXX@
371 372 373 374
# The flags for linking libstdc++ linker.
LIBCXX:=@LIBCXX@

# Sometimes a different linker is needed for c++ executables
O
ohair 已提交
375
LDEXECXX:=@FIXPATH@ @LDEXECXX@
376

377 378
# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
# build platform.
O
ohair 已提交
379 380
BUILD_CC:=@FIXPATH@ @BUILD_CC@
BUILD_LD:=@FIXPATH@ @BUILD_LD@
381

O
ohair 已提交
382
AS:=@FIXPATH@ @AS@
383

384
# AR is used to create a static library (is ar in posix, lib.exe in windows)
O
ohair 已提交
385
AR:=@FIXPATH@ @AR@
386 387
ARFLAGS:=@ARFLAGS@

388
NM:=@NM@
389
GNM:=@GNM@
390 391 392 393
STRIP:=@STRIP@
MCS:=@MCS@

LIPO:=@LIPO@
394 395 396 397

# Command to create a shared library
SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@

398
# Options to linker to specify a mapfile.
399 400 401
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@

402 403 404 405 406
# Options for C/CXX compiler to be used if linking is performed
#   using reorder file
C_FLAG_REORDER:=@C_FLAG_REORDER@
CXX_FLAG_REORDER:=@CXX_FLAG_REORDER@

407 408 409 410 411 412 413 414 415 416 417
#
# Options for generating debug symbols
ENABLE_DEBUG_SYMBOLS:=@ENABLE_DEBUG_SYMBOLS@
CFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@
CXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@
ZIP_DEBUGINFO_FILES:=@ZIP_DEBUGINFO_FILES@

#
# Compress (or not) jars
COMPRESS_JARS=@COMPRESS_JARS@

418 419 420 421 422 423 424
# Options to linker to specify the library name.
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
SET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@

# Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
SET_SHARED_LIBRARY_ORIGIN=@SET_SHARED_LIBRARY_ORIGIN@
425
SET_EXECUTABLE_ORIGIN=@SET_EXECUTABLE_ORIGIN@
426 427 428 429 430 431 432 433 434 435 436 437 438

# Different OS:es have different ways of naming shared libraries.
# The SHARED_LIBRARY macro takes "verify" as and argument and returns:
#    "libverify.so" or "libverify.dylib" or "verify.dll" depending on platform.
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
SHARED_LIBRARY=@SHARED_LIBRARY@
STATIC_LIBRARY=@STATIC_LIBRARY@
LIBRARY_PREFIX:=@LIBRARY_PREFIX@
SHARED_LIBRARY_SUFFIX:=@SHARED_LIBRARY_SUFFIX@
STATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@
EXE_SUFFIX:=@EXE_SUFFIX@
OBJ_SUFFIX:=@OBJ_SUFFIX@

439 440 441
POST_STRIP_CMD:=@POST_STRIP_CMD@
POST_MCS_CMD:=@POST_MCS_CMD@

442
JAVA_FLAGS:=@JAVA_FLAGS@
443 444
JAVA_FLAGS_BIG:=@JAVA_FLAGS_BIG@
JAVA_FLAGS_SMALL:=@JAVA_FLAGS_SMALL@
445

446 447
JAVA=@FIXPATH@ @JAVA@ $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
JAVA_SMALL=@FIXPATH@ @JAVA@ $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
448

I
ihse 已提交
449
JAVAC:=@FIXPATH@ @JAVAC@
450 451 452
# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
# overriding that value by using ?=.
JAVAC_FLAGS?=@JAVAC_FLAGS@
453

I
ihse 已提交
454
JAVAH:=@FIXPATH@ @JAVAH@
455

I
ihse 已提交
456
JAR:=@FIXPATH@ @JAR@
457

458
NATIVE2ASCII:=@FIXPATH@ @NATIVE2ASCII@ $(addprefix -J, $(JAVA_FLAGS_SMALL))
459

I
ihse 已提交
460
JARSIGNER:=@FIXPATH@ @JARSIGNER@
461

462
# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...
463 464 465 466 467 468 469
INTERIM_LANGTOOLS_JAR := $(LANGTOOLS_OUTPUTDIR)/dist/interim_langtools.jar
INTERIM_LANGTOOLS_ARGS := "-Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR)" -cp $(INTERIM_LANGTOOLS_JAR)
NEW_JAVAC   = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javac.Main
NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javadoc.Main

# The interim corba jar is needed for running rmic
INTERIM_CORBA_JAR := $(CORBA_OUTPUTDIR)/dist/interim_corba.jar
470

471 472 473 474
# Base flags for RC
# Guarding this against resetting value. Legacy make files include spec multiple
# times.
ifndef RC_FLAGS
475
  RC_FLAGS:=@RC_FLAGS@
476 477 478
endif

# A specific java binary with specific options can be used to run
479
# the long running background sjavac servers and other long running tasks.
O
ohair 已提交
480
SJAVAC_SERVER_JAVA:=@FIXPATH@ @SJAVAC_SERVER_JAVA@
481 482 483

# Tools adhering to a minimal and common standard of posix compliance.
AWK:=@AWK@
484
BASENAME:=@BASENAME@
O
ohair 已提交
485
BASH:=@BASH@
486 487 488 489 490
CAT:=@CAT@
CCACHE:=@CCACHE@
# CD is going away, but remains to cater for legacy makefiles.
CD:=cd
CHMOD:=@CHMOD@
491
CODESIGN:=@CODESIGN@
492
COMM:=@COMM@
493
CP:=@CP@
494
CPIO:=@CPIO@
495 496 497
CUT:=@CUT@
DATE:=@DATE@
DIFF:=@DIFF@
498
DIRNAME:=@DIRNAME@
499
DSYMUTIL:=@DSYMUTIL@
500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520
FIND:=@FIND@
FIND_DELETE:=@FIND_DELETE@
ECHO:=@ECHO@
EGREP:=@EGREP@
FGREP:=@FGREP@
GREP:=@GREP@
HEAD:=@HEAD@
LS:=@LS@
LN:=@LN@
MKDIR:=@MKDIR@
MV:=@MV@
NAWK:=@NAWK@
PRINTF:=@PRINTF@
PWD:=@THEPWDCMD@
RM:=@RM@
SED:=@SED@
SH:=@SH@
SORT:=@SORT@
TAR:=@TAR@
TAIL:=@TAIL@
TEE:=@TEE@
O
ohair 已提交
521
TIME:=@TIME@
522
IS_GNU_TIME:=@IS_GNU_TIME@
523 524
TR:=@TR@
TOUCH:=@TOUCH@
525
UNIQ:=@UNIQ@
526 527 528 529 530
WC:=@WC@
XARGS:=@XARGS@
ZIPEXE:=@ZIP@
ZIP:=@ZIP@
UNZIP:=@UNZIP@
O
ohair 已提交
531 532 533
MT:=@FIXPATH@ @MT@
RC:=@FIXPATH@ @RC@
DUMPBIN:=@FIXPATH@ @DUMPBIN@
534 535 536 537 538 539
CYGPATH:=@CYGPATH@
LDD:=@LDD@
OTOOL:=@OTOOL@
READELF:=@READELF@
EXPR:=@EXPR@
FILE:=@FILE@
540
HG:=@HG@
541
OBJCOPY:=@OBJCOPY@
O
ohair 已提交
542
SETFILE:=@SETFILE@
543
XATTR:=@XATTR@
544 545
JT_HOME:=@JT_HOME@
JTREGEXE:=@JTREGEXE@
546

O
ohair 已提交
547
FIXPATH:=@FIXPATH@
548 549 550

# Where the build output is stored for your convenience.
BUILD_LOG:=@BUILD_LOG@
551
BUILD_LOG_PREVIOUS:=@BUILD_LOG_PREVIOUS@
552 553 554 555
# Disable the build log wrapper on sjavac+winapi until
# we have solved how to prevent the log wrapper to wait
# for the background sjavac server process.
ifeq (@ENABLE_SJAVAC@X@OPENJDK_BUILD_OS_API@,yesXwinapi)
556
  BUILD_LOG_WRAPPER:=
557
else
558
  BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
559
endif
560 561

# Build setup
562
ENABLE_JFR=@ENABLE_JFR@
563
ENABLE_INTREE_EC=@ENABLE_INTREE_EC@
564 565 566
USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
567
LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
O
ohair 已提交
568
MSVCR_DLL:=@MSVCR_DLL@
569

570

571 572 573 574 575 576 577
# ADD_SRCS takes a single argument with source roots
# and appends any corresponding source roots found
# below --with-add-source-root and below
# --with-override-source-root. It is the responsibility
# of the next macro to get rid of superfluous files.
ADD_SRCS=$1
ifneq (,$(ADD_SRC_ROOT))
578 579
  # Append wildcard rule to pickup any matching source roots found below ADD_SRC_ROOT
  ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(ADD_SRC_ROOT),$1))
580 581
endif
ifneq (,$(OVERRIDE_SRC_ROOT))
582 583
  # Append wildcard rule to pickup any matching source roots found below OVERRIDE_SRC_ROOT
  ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(OVERRIDE_SRC_ROOT),$1))
584 585 586 587 588 589 590 591 592
endif

# OVR_SRCS creates a filter expression to filter out sources in
# the original source directory that lie inside directories below
# --with-override-source-root.
# Use := here since we want to scan for these files here. To avoid recomputation later.
# We cannot do the scan in configure, since that would force us to rerun configure when
# we add overridden sources.
ifneq (,$(OVERRIDE_SRC_ROOT))
593
  OVR_SRCS:=$(addsuffix %,$(subst $(OVERRIDE_SRC_ROOT),$(SRC_ROOT),$(sort $(dir $(shell $(FIND) $(OVERRIDE_SRC_ROOT) -type f)))))
594
else
595
  OVR_SRCS:=
596 597 598 599 600 601 602 603
endif

####################################################
#
# INSTALLATION
#

# Common prefix for all installed files. Defaults to /usr/local,
604
# but /opt/myjdk is another common version.
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633
INSTALL_PREFIX=@prefix@

# Directories containing architecture-dependent files should be relative to exec_prefix
INSTALL_EXECPREFIX=@exec_prefix@

# java,javac,javah,javap etc are installed here.
INSTALL_BINDIR=@bindir@

# Read only architecture-independent data
INSTALL_DATADIR=@datadir@

# Root of above.
INSTALL_DATAROOTDIR=@datarootdir@

# Doc files, other than info and man.
INSTALL_DOCDIR=@docdir@

# Html documentation
INSTALL_HTMLDIR=@htmldir@

# Installing C header files, JNI headers for example.
INSTALL_INCLUDEDIR=@includedir@

# Installing library files....
INSTALL_INCLUDEDIR=@libdir@

# Executables that other programs run.
INSTALL_LIBEXECDIR=@libexecdir@

634
# Locale-dependent but architecture-independent data, such as message catalogs.
635 636 637 638 639 640 641 642 643 644 645 646 647 648
INSTALL_LOCALEDIR=@localedir@

# Modifiable single-machine data
INSTALL_LOCALSTATEDIR=@localstatedir@

# Man pages
INSTALL_MANDIR=@mandir@

# Modifiable architecture-independent data.
INSTALL_SHAREDSTATEDIR=@sharedstatedir@

# Read-only single-machine data
INSTALL_SYSCONFDIR=@sysconfdir@

649 650 651 652 653
####################################################
#
# Libraries
#

654 655 656 657
USE_EXTERNAL_LCMS:=@USE_EXTERNAL_LCMS@
LCMS_CFLAGS:=@LCMS_CFLAGS@
LCMS_LIBS:=@LCMS_LIBS@

658 659 660 661
USE_EXTERNAL_LIBPNG:=@USE_EXTERNAL_LIBPNG@
PNG_LIBS:=@PNG_LIBS@
PNG_CFLAGS:=@PNG_CFLAGS@

662 663 664 665 666 667

####################################################
#
# Misc
#

668 669 670
# Name of Service Agent library
SALIB_NAME=@SALIB_NAME@

671 672
INCLUDE_SA=@INCLUDE_SA@

673 674 675 676
OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
OS_VERSION_MINOR:=@OS_VERSION_MINOR@
OS_VERSION_MICRO:=@OS_VERSION_MICRO@

677 678 679 680 681
# Images directory definitions
JDK_IMAGE_SUBDIR:=j2sdk-image
JRE_IMAGE_SUBDIR:=j2re-image
JDK_OVERLAY_IMAGE_SUBDIR:=j2sdk-overlay-image
JRE_OVERLAY_IMAGE_SUBDIR:=j2re-overlay-image
682 683 684 685 686
# Colon left out to be able to override output dir for bootcycle-images
JDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
JDK_OVERLAY_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_OVERLAY_IMAGE_SUBDIR)
JRE_OVERLAY_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_OVERLAY_IMAGE_SUBDIR)
687 688

# Macosx bundles directory definitions
689 690 691 692
JDK_BUNDLE_SUBDIR=j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents
JRE_BUNDLE_SUBDIR=j2re-bundle/jre$(JDK_VERSION).jre/Contents
JDK_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_BUNDLE_SUBDIR)
JRE_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR)
693

694 695 696 697 698 699 700 701 702
# This macro is called to allow inclusion of closed source counterparts.
# Unless overridden in closed sources, it expands to nothing.
# Usage: This function is called in an open makefile, with the following 
# arguments:
# $1 the name of the repo, or empty if the top-level repo.
# $2 the name of the makefile
define IncludeCustomExtension
endef

703 704
# Include the custom-spec.gmk file if it exists
-include $(dir @SPEC@)/custom-spec.gmk