spec.gmk.in revision 1915:c2696ab4abae
1130803Smarcel#
2130803Smarcel# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3130803Smarcel# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4130803Smarcel#
5130803Smarcel# This code is free software; you can redistribute it and/or modify it
6130803Smarcel# under the terms of the GNU General Public License version 2 only, as
7130803Smarcel# published by the Free Software Foundation.  Oracle designates this
8130803Smarcel# particular file as subject to the "Classpath" exception as provided
9130803Smarcel# by Oracle in the LICENSE file that accompanied this code.
10130803Smarcel#
11130803Smarcel# This code is distributed in the hope that it will be useful, but WITHOUT
12130803Smarcel# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13130803Smarcel# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14130803Smarcel# version 2 for more details (a copy is included in the LICENSE file that
15130803Smarcel# accompanied this code).
16130803Smarcel#
17130803Smarcel# You should have received a copy of the GNU General Public License version
18130803Smarcel# 2 along with this work; if not, write to the Free Software Foundation,
19130803Smarcel# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20130803Smarcel#
21130803Smarcel# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22130803Smarcel# or visit www.oracle.com if you need additional information or have any
23130803Smarcel# questions.
24130803Smarcel#
25130803Smarcel
26130803Smarcel# Configured @DATE_WHEN_CONFIGURED@ to build
27130803Smarcel# for target system @OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU@
28130803Smarcel#   (called @OPENJDK_TARGET_AUTOCONF_NAME@ by autoconf)
29130803Smarcel# on build system @OPENJDK_BUILD_OS@-@OPENJDK_BUILD_CPU@
30130803Smarcel#   (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf)
31130803Smarcel# using 'configure @CONFIGURE_COMMAND_LINE@'
32130803Smarcel
33130803Smarcel# The command line given to configure.
34130803SmarcelCONFIGURE_COMMAND_LINE:=@CONFIGURE_COMMAND_LINE@
35130803Smarcel
36130803Smarcel# A self-referential reference to this file.
37130803SmarcelSPEC:=@SPEC@
38130803Smarcel
39130803Smarcel# SPACE is defined in MakeBase.gmk, but it is also used in := rules here for some
40130803Smarcel# toolchains, and is needed if MakeBase.gmk is not included before this file.
41130803SmarcelX:=
42130803SmarcelSPACE:=$(X) $(X)
43130803Smarcel
44130803Smarcel# What make to use for main processing, after bootstrapping top-level Makefile.
45130803SmarcelMAKE := @MAKE@
46130803Smarcel
47130803Smarcel# The default make arguments
48130803SmarcelMAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \
49130803Smarcel    MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" LOG_LEVEL=$(LOG_LEVEL)
50130803Smarcel
51130803SmarcelOUTPUT_SYNC_SUPPORTED:=@OUTPUT_SYNC_SUPPORTED@
52130803SmarcelOUTPUT_SYNC:=@OUTPUT_SYNC@
53130803Smarcel
54130803Smarcel# Override the shell with bash
55130803SmarcelBASH:=@BASH@
56130803SmarcelBASH_ARGS:=@BASH_ARGS@
57130803SmarcelSHELL:=$(BASH) $(BASH_ARGS)
58130803Smarcel
59130803Smarcel# The "human readable" name of this configuration
60130803SmarcelCONF_NAME:=@CONF_NAME@
61130803Smarcel
62130803Smarcel# The built jdk will run in this target system.
63130803SmarcelOPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
64130803SmarcelOPENJDK_TARGET_OS_TYPE:=@OPENJDK_TARGET_OS_TYPE@
65130803SmarcelOPENJDK_TARGET_OS_ENV:=@OPENJDK_TARGET_OS_ENV@
66130803Smarcel
67130803SmarcelOPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@
68130803SmarcelOPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@
69130803SmarcelOPENJDK_TARGET_CPU_BITS:=@OPENJDK_TARGET_CPU_BITS@
70130803SmarcelOPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
71130803Smarcel
72130803SmarcelCOMPILE_TYPE:=@COMPILE_TYPE@
73130803Smarcel
74130803Smarcel# Legacy support
75130803SmarcelOPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@
76130803SmarcelOPENJDK_TARGET_CPU_LIBDIR:=@OPENJDK_TARGET_CPU_LIBDIR@
77130803SmarcelOPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@
78130803SmarcelOPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@
79130803SmarcelOPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
80130803SmarcelOPENJDK_TARGET_CPU_JLI_CFLAGS:=@OPENJDK_TARGET_CPU_JLI_CFLAGS@
81130803SmarcelOPENJDK_TARGET_OS_EXPORT_DIR:=@OPENJDK_TARGET_OS_EXPORT_DIR@
82130803Smarcel
83130803Smarcel# We are building on this build system.
84130803Smarcel# When not cross-compiling, it is the same as the target.
85130803SmarcelOPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
86130803SmarcelOPENJDK_BUILD_OS_TYPE:=@OPENJDK_BUILD_OS_TYPE@
87130803SmarcelOPENJDK_BUILD_OS_ENV:=@OPENJDK_BUILD_OS_ENV@
88130803Smarcel
89130803SmarcelOPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@
90130803SmarcelOPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
91130803SmarcelOPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
92130803SmarcelOPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
93130803Smarcel
94130803Smarcel# Legacy OS values for use in release file.
95130803SmarcelREQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
96130803SmarcelREQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
97130803Smarcel
98130803Smarcel@SET_OPENJDK@
99130803SmarcelLIBM:=@LIBM@
100130803SmarcelLIBDL:=@LIBDL@
101130803Smarcel
102130803Smarcel# colon or semicolon
103130803SmarcelPATH_SEP:=@PATH_SEP@
104130803Smarcel
105130803Smarcel# Save the original path before replacing it with the Visual Studio tools
106130803SmarcelORIGINAL_PATH:=@ORIGINAL_PATH@
107130803Smarcelifeq ($(OPENJDK_TARGET_OS), windows)
108130803Smarcel  # On Windows, the Visual Studio toolchain needs the PATH to be adjusted
109130803Smarcel  # to include Visual Studio tools (this needs to be in cygwin/msys style).
110130803Smarcel  export PATH:=@VS_PATH@
111130803Smarcelendif
112130803Smarcel
113130803SmarcelSYSROOT_CFLAGS := @SYSROOT_CFLAGS@
114130803SmarcelSYSROOT_LDFLAGS := @SYSROOT_LDFLAGS@
115130803Smarcel
116130803Smarcel# The top-level directory of the forest (SRC_ROOT is a traditional alias)
117130803SmarcelTOPDIR:=@TOPDIR@
118130803Smarcel# These two versions of TOPDIR are used in string comparisons
119130803SmarcelORIGINAL_TOPDIR:=@ORIGINAL_TOPDIR@
120130803SmarcelCANONICAL_TOPDIR:=@CANONICAL_TOPDIR@
121130803SmarcelSRC_ROOT:=@TOPDIR@
122130803Smarcel
123130803SmarcelOUTPUT_ROOT:=@OUTPUT_ROOT@
124130803SmarcelJDK_TOPDIR:=@JDK_TOPDIR@
125130803SmarcelLANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@
126130803SmarcelCORBA_TOPDIR:=@CORBA_TOPDIR@
127130803SmarcelJAXP_TOPDIR:=@JAXP_TOPDIR@
128130803SmarcelJAXWS_TOPDIR:=@JAXWS_TOPDIR@
129130803SmarcelHOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@
130130803SmarcelNASHORN_TOPDIR:=@NASHORN_TOPDIR@
131130803SmarcelCOPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
132130803Smarcel
133130803Smarcel# New (JEP-223) version information
134130803Smarcel
135130803Smarcel## Building blocks of the version string
136130803Smarcel# First three version numbers, with well-specified meanings (numerical)
137130803SmarcelVERSION_MAJOR := @VERSION_MAJOR@
138130803SmarcelVERSION_MINOR := @VERSION_MINOR@
139130803SmarcelVERSION_SECURITY := @VERSION_SECURITY@
140130803Smarcel# Optional fourth element for use by OpenJDK consumers (numerical)
141130803SmarcelVERSION_PATCH := @VERSION_PATCH@
142130803Smarcel# The pre-release identifier (string)
143130803SmarcelVERSION_PRE := @VERSION_PRE@
144130803Smarcel# The build number (numerical)
145130803SmarcelVERSION_BUILD := @VERSION_BUILD@
146130803Smarcel# Optional build information (string)
147130803SmarcelVERSION_OPT := @VERSION_OPT@
148130803Smarcel
149130803Smarcel## Composite variables
150130803Smarcel# The version number as a dot separated sequence of numbers, e.g. 9.0.1
151130803SmarcelVERSION_NUMBER := @VERSION_NUMBER@
152130803Smarcel# VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
153130803SmarcelVERSION_NUMBER_FOUR_POSITIONS := @VERSION_NUMBER_FOUR_POSITIONS@
154130803Smarcel# The complete version string, with additional build information
155130803SmarcelVERSION_STRING := @VERSION_STRING@
156130803Smarcel# The short version string, without trailing zeroes and just PRE, if present.
157130803SmarcelVERSION_SHORT := @VERSION_SHORT@
158130803Smarcel# The Java specification version. It should be equal to version number.
159130803SmarcelVERSION_SPECIFICATION := @VERSION_NUMBER@
160130803Smarcel# A GA version is defined by the PRE string being empty. Rather than testing for
161130803Smarcel# that, this variable defines it with true/false.
162130803SmarcelVERSION_IS_GA := @VERSION_IS_GA@
163130803Smarcel
164130803Smarcel# Convenience CFLAGS settings for passing version information into native programs.
165130803SmarcelVERSION_CFLAGS := \
166130803Smarcel    -DVERSION_MAJOR=$(VERSION_MAJOR) \
167130803Smarcel    -DVERSION_MINOR=$(VERSION_MINOR) \
168130803Smarcel    -DVERSION_SECURITY=$(VERSION_SECURITY) \
169130803Smarcel    -DVERSION_PATCH=$(VERSION_PATCH) \
170130803Smarcel    -DVERSION_PRE='"$(VERSION_PRE)"' \
171130803Smarcel    -DVERSION_BUILD=$(VERSION_BUILD) \
172130803Smarcel    -DVERSION_OPT='"$(VERSION_OPT)"' \
173130803Smarcel    -DVERSION_NUMBER='"$(VERSION_NUMBER)"' \
174130803Smarcel    -DVERSION_STRING='"$(VERSION_STRING)"' \
175130803Smarcel    -DVERSION_SHORT='"$(VERSION_SHORT)"' \
176130803Smarcel    -DVERSION_SPECIFICATION='"$(VERSION_SPECIFICATION)"' \
177130803Smarcel    #
178130803Smarcel
179130803Smarcel# Platform naming variables
180130803SmarcelLAUNCHER_NAME:=@LAUNCHER_NAME@
181130803SmarcelPRODUCT_NAME:=@PRODUCT_NAME@
182130803SmarcelPRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
183130803SmarcelJDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@
184130803SmarcelCOMPANY_NAME:=@COMPANY_NAME@
185130803SmarcelMACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
186130803SmarcelMACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
187130803SmarcelUSERNAME:=@USERNAME@
188130803Smarcel
189130803Smarcel# Different naming strings generated from the above information.
190130803SmarcelRUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX)
191130803Smarcel
192130803Smarcel# How to compile the code: release, fastdebug or slowdebug
193130803SmarcelDEBUG_LEVEL:=@DEBUG_LEVEL@
194130803Smarcel
195130803Smarcel# This is the JDK variant to build.
196130803Smarcel# The JDK variant is a name for a specific set of modules to be compiled for the JDK.
197130803SmarcelJDK_VARIANT:=@JDK_VARIANT@
198130803Smarcel
199130803Smarcel# Should we compile support for running with a graphical UI? (ie headful)
200130803Smarcel# Should we compile support for running without? (ie headless)
201130803SmarcelSUPPORT_HEADFUL:=@SUPPORT_HEADFUL@
202130803SmarcelSUPPORT_HEADLESS:=@SUPPORT_HEADLESS@
203130803Smarcel# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options.
204130803Smarcel@BUILD_HEADLESS@
205130803Smarcel
206130803Smarcel# These are the libjvms that we want to build.
207130803Smarcel# The java launcher uses the default.
208130803Smarcel# The others can be selected by specifying -client -server -minimal1 -zero or -zeroshark
209130803Smarcel# on the java launcher command line.
210130803SmarcelJVM_VARIANTS:=@JVM_VARIANTS@
211130803SmarcelJVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@
212130803SmarcelJVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@
213130803SmarcelJVM_VARIANT_MINIMAL1:=@JVM_VARIANT_MINIMAL1@
214130803SmarcelJVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@
215130803SmarcelJVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@
216130803SmarcelJVM_VARIANT_CORE:=@JVM_VARIANT_CORE@
217130803Smarcel
218130803Smarcel# Universal binaries on macosx
219130803SmarcelMACOSX_UNIVERSAL=@MACOSX_UNIVERSAL@
220130803Smarcel
221130803Smarcel# Legacy setting: -debug or -fastdebug
222130803Smarcel# Still used in version string...
223130803SmarcelBUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@
224130803Smarcel
225130803Smarcel# JDK_OUTPUTDIR specifies where a working jvm is built.
226130803Smarcel# You can run $(JDK_OUTPUTDIR)/bin/java
227130803Smarcel# Though the layout of the contents of $(JDK_OUTPUTDIR) is not
228130803Smarcel# yet the same as a default installation.
229130803Smarcel#
230130803Smarcel# When you run "make install" it will create the standardized
231130803Smarcel# layout for the jdk and the jre inside the IMAGES_OUTPUTDIR subdir.
232130803Smarcel# Then it will copy the contents of the jdk into the installation
233130803Smarcel# directory.
234130803Smarcel
235130803SmarcelBUILD_OUTPUT:=@BUILD_OUTPUT@
236130803Smarcel# Colon left out to be able to override IMAGES_OUTPUTDIR for bootcycle-images
237130803SmarcelSUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/support
238130803SmarcelBUILDTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/buildtools
239130803Smarcel
240130803SmarcelHOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
241130803SmarcelJDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
242130803SmarcelIMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
243130803SmarcelTESTMAKE_OUTPUTDIR=$(BUILD_OUTPUT)/test-make
244130803SmarcelMAKESUPPORT_OUTPUTDIR=$(BUILD_OUTPUT)/make-support
245130803Smarcel# This does not get overridden in a bootcycle build
246130803SmarcelCONFIGURESUPPORT_OUTPUTDIR:=@CONFIGURESUPPORT_OUTPUTDIR@
247130803Smarcel
248130803SmarcelHOTSPOT_DIST=@HOTSPOT_DIST@
249130803Smarcel
250130803SmarcelBUILD_HOTSPOT=@BUILD_HOTSPOT@
251130803Smarcel
252130803Smarcel# The boot jdk to use. This is overridden in bootcycle-spec.gmk. Make sure to keep
253130803Smarcel# it in sync.
254130803SmarcelBOOT_JDK:=@BOOT_JDK@
255130803Smarcel
256130803Smarcel# When compiling Java source to be run by the boot jdk
257130803Smarcel# use these extra flags, eg -source 6 -target 6
258130803SmarcelBOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
259130803Smarcel
260130803Smarcel# Information about the build system
261130803SmarcelNUM_CORES:=@NUM_CORES@
262130803SmarcelMEMORY_SIZE:=@MEMORY_SIZE@
263130803Smarcel# Enable sjavac support = use a javac server,
264130803Smarcel# multi core javac compilation and dependency tracking.
265130803SmarcelENABLE_SJAVAC:=@ENABLE_SJAVAC@
266130803SmarcelENABLE_JAVAC_SERVER:=@ENABLE_JAVAC_SERVER@
267130803Smarcel# Store sjavac server synchronization files here, and
268130803Smarcel# the sjavac server log files.
269130803SmarcelSJAVAC_SERVER_DIR=$(MAKESUPPORT_OUTPUTDIR)/javacservers
270130803Smarcel
271130803Smarcel# Number of parallel jobs to use for compilation
272130803SmarcelJOBS?=@JOBS@
273130803SmarcelTEST_JOBS?=@TEST_JOBS@
274130803Smarcel
275130803Smarcel# Default make target
276130803SmarcelDEFAULT_MAKE_TARGET:=@DEFAULT_MAKE_TARGET@
277130803Smarcel
278130803SmarcelFREETYPE_LIBS:=@FREETYPE_LIBS@
279130803SmarcelFREETYPE_CFLAGS:=@FREETYPE_CFLAGS@
280130803SmarcelFREETYPE_BUNDLE_LIB_PATH=@FREETYPE_BUNDLE_LIB_PATH@
281130803SmarcelCUPS_CFLAGS:=@CUPS_CFLAGS@
282130803SmarcelALSA_LIBS:=@ALSA_LIBS@
283130803SmarcelALSA_CFLAGS:=@ALSA_CFLAGS@
284130803SmarcelLIBFFI_LIBS:=@LIBFFI_LIBS@
285130803SmarcelLIBFFI_CFLAGS:=@LIBFFI_CFLAGS@
286130803Smarcel
287130803SmarcelPACKAGE_PATH=@PACKAGE_PATH@
288130803Smarcel
289130803Smarcel# Source file for cacerts
290CACERTS_FILE=@CACERTS_FILE@
291
292# Enable unlimited crypto policy
293UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
294
295GCOV_ENABLED=@GCOV_ENABLED@
296
297# Necessary additional compiler flags to compile X11
298X_CFLAGS:=@X_CFLAGS@
299X_LIBS:=@X_LIBS@
300
301# The lowest required version of macosx to enforce compatiblity for
302MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
303
304# Toolchain type: gcc, clang, solstudio, lxc, microsoft...
305TOOLCHAIN_TYPE:=@TOOLCHAIN_TYPE@
306TOOLCHAIN_VERSION := @TOOLCHAIN_VERSION@
307
308# Option used to tell the compiler whether to create 32- or 64-bit executables
309COMPILER_TARGET_BITS_FLAG:=@COMPILER_TARGET_BITS_FLAG@
310COMPILER_SUPPORTS_TARGET_BITS_FLAG=@COMPILER_SUPPORTS_TARGET_BITS_FLAG@
311
312# Option used to pass a command file to the compiler
313COMPILER_COMMAND_FILE_FLAG:=@COMPILER_COMMAND_FILE_FLAG@
314
315CC_OUT_OPTION:=@CC_OUT_OPTION@
316EXE_OUT_OPTION:=@EXE_OUT_OPTION@
317LD_OUT_OPTION:=@LD_OUT_OPTION@
318AR_OUT_OPTION:=@AR_OUT_OPTION@
319
320# Flags used for overriding the default opt setting for a C/C++ source file.
321C_O_FLAG_HIGHEST:=@C_O_FLAG_HIGHEST@
322C_O_FLAG_HI:=@C_O_FLAG_HI@
323C_O_FLAG_NORM:=@C_O_FLAG_NORM@
324C_O_FLAG_NONE:=@C_O_FLAG_NONE@
325CXX_O_FLAG_HIGHEST:=@CXX_O_FLAG_HIGHEST@
326CXX_O_FLAG_HI:=@CXX_O_FLAG_HI@
327CXX_O_FLAG_NORM:=@CXX_O_FLAG_NORM@
328CXX_O_FLAG_NONE:=@CXX_O_FLAG_NONE@
329
330C_FLAG_DEPS:=@C_FLAG_DEPS@
331CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
332
333DISABLE_WARNING_PREFIX := @DISABLE_WARNING_PREFIX@
334CFLAGS_WARNINGS_ARE_ERRORS:=@CFLAGS_WARNINGS_ARE_ERRORS@
335
336# A global flag (true or false) determining if native warnings are considered errors.
337WARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@
338
339CFLAGS_CCACHE:=@CFLAGS_CCACHE@
340
341# Tools that potentially need to be cross compilation aware.
342CC:=@FIXPATH@ @CCACHE@ @ICECC@ @CC@
343
344# CFLAGS used to compile the jdk native libraries (C-code)
345CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
346CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
347
348# CFLAGS used to compile the jdk native launchers (C-code)
349CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
350CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
351
352CXX:=@FIXPATH@ @CCACHE@ @ICECC@ @CXX@
353#CXXFLAGS:=@CXXFLAGS@
354
355CPP:=@FIXPATH@ @CPP@
356#CPPFLAGS:=@CPPFLAGS@
357
358# The linker can be gcc or ld on unix systems, or link.exe on windows systems.
359LD:=@FIXPATH@ @LD@
360
361# Xcode SDK path
362SDKROOT:=@SDKROOT@
363
364# The linker on older SuSE distros (e.g. on SLES 10) complains with:
365# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
366# if feeded with a version script which contains named tags.
367USING_BROKEN_SUSE_LD:=@USING_BROKEN_SUSE_LD@
368
369# LDFLAGS used to link the jdk native libraries (C-code)
370LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
371JDKLIB_LIBS:=@JDKLIB_LIBS@
372
373# LDFLAGS used to link the jdk native launchers (C-code)
374LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
375JDKEXE_LIBS:=@JDKEXE_LIBS@
376
377# LDFLAGS specific to C++ linking.
378LDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@
379
380# Sometimes a different linker is needed for c++ libs
381LDCXX:=@FIXPATH@ @LDCXX@
382# The flags for linking libstdc++ linker.
383LIBCXX:=@LIBCXX@
384
385# Compiler and linker flags used when building native tests
386CFLAGS_TESTLIB:=@CFLAGS_TESTLIB@
387CXXFLAGS_TESTLIB:=@CXXFLAGS_TESTLIB@
388CFLAGS_TESTEXE:=@CFLAGS_TESTEXE@
389CXXFLAGS_TESTEXE:=@CXXFLAGS_TESTEXE@
390LDFLAGS_TESTLIB:=@LDFLAGS_TESTLIB@
391LDFLAGS_TESTEXE:=@LDFLAGS_TESTEXE@
392
393# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
394# build platform.
395BUILD_CC:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CC@
396BUILD_CXX:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CXX@
397BUILD_LD:=@FIXPATH@ @BUILD_LD@
398BUILD_LDCXX:=@FIXPATH@ @BUILD_LDCXX@
399BUILD_AS:=@FIXPATH@ @BUILD_AS@
400BUILD_AR:=@FIXPATH@ @BUILD_AR@
401BUILD_NM:=@FIXPATH@ @BUILD_NM@
402BUILD_SYSROOT_CFLAGS:=@BUILD_SYSROOT_CFLAGS@
403BUILD_SYSROOT_LDFLAGS:=@BUILD_SYSROOT_LDFLAGS@
404
405AS:=@FIXPATH@ @AS@
406
407# AR is used to create a static library (is ar in unix, lib.exe in windows)
408AR:=@FIXPATH@ @AR@
409ARFLAGS:=@ARFLAGS@
410
411NM:=@NM@
412GNM:=@GNM@
413STRIP:=@STRIP@
414
415LIPO:=@LIPO@
416
417# Options to linker to specify a mapfile.
418# (Note absence of := assignment, because we do not want to evaluate the macro body here)
419SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@
420
421# Options for C/CXX compiler to be used if linking is performed
422#   using reorder file
423C_FLAG_REORDER:=@C_FLAG_REORDER@
424CXX_FLAG_REORDER:=@CXX_FLAG_REORDER@
425
426#
427# Options for generating debug symbols
428COMPILE_WITH_DEBUG_SYMBOLS := @COMPILE_WITH_DEBUG_SYMBOLS@
429COPY_DEBUG_SYMBOLS := @COPY_DEBUG_SYMBOLS@
430ZIP_EXTERNAL_DEBUG_SYMBOLS := @ZIP_EXTERNAL_DEBUG_SYMBOLS@
431
432CFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@
433CXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@
434
435#
436# Compress (or not) jars
437COMPRESS_JARS=@COMPRESS_JARS@
438
439# Options to linker to specify the library name.
440# (Note absence of := assignment, because we do not want to evaluate the macro body here)
441SET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@
442
443SHARED_LIBRARY_FLAGS=@SHARED_LIBRARY_FLAGS@
444
445# Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
446# (Note absence of := assignment, because we do not want to evaluate the macro body here)
447SET_SHARED_LIBRARY_ORIGIN=@SET_SHARED_LIBRARY_ORIGIN@
448SET_EXECUTABLE_ORIGIN=@SET_EXECUTABLE_ORIGIN@
449
450# Different OS:es have different ways of naming shared libraries.
451# The SHARED_LIBRARY macro takes "verify" as and argument and returns:
452#    "libverify.so" or "libverify.dylib" or "verify.dll" depending on platform.
453# (Note absence of := assignment, because we do not want to evaluate the macro body here)
454SHARED_LIBRARY=@SHARED_LIBRARY@
455STATIC_LIBRARY=@STATIC_LIBRARY@
456LIBRARY_PREFIX:=@LIBRARY_PREFIX@
457SHARED_LIBRARY_SUFFIX:=@SHARED_LIBRARY_SUFFIX@
458STATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@
459EXE_SUFFIX:=@EXE_SUFFIX@
460OBJ_SUFFIX:=@OBJ_SUFFIX@
461STATIC_BUILD:=@STATIC_BUILD@
462
463STRIPFLAGS:=@STRIPFLAGS@
464
465JAVA_FLAGS:=@JAVA_FLAGS@
466JAVA_FLAGS_BIG:=@JAVA_FLAGS_BIG@
467JAVA_FLAGS_SMALL:=@JAVA_FLAGS_SMALL@
468JAVA_FLAGS_JAVAC:=@JAVA_FLAGS_JAVAC@
469JAVA_TOOL_FLAGS_SMALL:=@JAVA_TOOL_FLAGS_SMALL@
470SJAVAC_SERVER_JAVA_FLAGS:=@SJAVAC_SERVER_JAVA_FLAGS@
471
472# The *_CMD variables are defined separately to be easily overridden in bootcycle-spec.gmk
473# for bootcycle-images build. Make sure to keep them in sync. Do not use the *_CMD
474# versions of the variables directly.
475JAVA_CMD:=@JAVA@
476JAVAC_CMD:=@JAVAC@
477JAVAH_CMD:=@JAVAH@
478JAR_CMD:=@JAR@
479JARSIGNER_CMD:=@JARSIGNER@
480SJAVAC_SERVER_JAVA_CMD:=@SJAVAC_SERVER_JAVA@
481# These variables are meant to be used. They are defined with = instead of := to make
482# it possible to override only the *_CMD variables.
483JAVA=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
484JAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
485JAVA_JAVAC=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_JAVAC) $(JAVA_FLAGS)
486JAVAC=@FIXPATH@ $(JAVAC_CMD)
487JAVAH=@FIXPATH@ $(JAVAH_CMD)
488JAR=@FIXPATH@ $(JAR_CMD)
489JARSIGNER=@FIXPATH@ $(JARSIGNER_CMD)
490# A specific java binary with specific options can be used to run
491# the long running background sjavac servers and other long running tasks.
492SJAVAC_SERVER_JAVA=@FIXPATH@ @FIXPATH_DETACH_FLAG@ $(SJAVAC_SERVER_JAVA_CMD) \
493    $(SJAVAC_SERVER_JAVA_FLAGS)
494
495# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
496# overriding that value by using ?=.
497JAVAC_FLAGS?=@JAVAC_FLAGS@
498
499# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...
500# Use = assignment to be able to override in bootcycle-spec.gmk
501INTERIM_LANGTOOLS_JAR = $(BUILDTOOLS_OUTPUTDIR)/interim_langtools.jar
502INTERIM_LANGTOOLS_ARGS = "-Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR)" -cp $(INTERIM_LANGTOOLS_JAR)
503NEW_JAVAC   = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javac.Main
504NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) jdk.javadoc.internal.tool.Main 
505
506# Base flags for RC
507# Guarding this against resetting value. Legacy make files include spec multiple
508# times.
509ifndef RC_FLAGS
510  RC_FLAGS:=@RC_FLAGS@
511endif
512
513# Tools adhering to a minimal and common standard of posix compliance.
514AWK:=@AWK@
515BASENAME:=@BASENAME@
516CAT:=@CAT@
517CCACHE:=@CCACHE@
518# CD is going away, but remains to cater for legacy makefiles.
519CD:=cd
520CHMOD:=@CHMOD@
521CODESIGN:=@CODESIGN@
522COMM:=@COMM@
523CP:=@CP@
524CPIO:=@CPIO@
525CUT:=@CUT@
526DATE:=@DATE@
527DIFF:=@DIFF@
528DIRNAME:=@DIRNAME@
529DSYMUTIL:=@DSYMUTIL@
530FIND:=@FIND@
531FIND_DELETE:=@FIND_DELETE@
532ECHO:=@ECHO@
533EGREP:=@EGREP@
534FGREP:=@FGREP@
535GREP:=@GREP@
536HEAD:=@HEAD@
537LS:=@LS@
538LN:=@LN@
539MKDIR:=@MKDIR@
540MV:=@MV@
541NAWK:=@NAWK@
542NICE:=@NICE@
543PATCH:=@PATCH@
544PRINTF:=@PRINTF@
545PWD:=@THEPWDCMD@
546RM:=@RM@
547RMDIR:=@RMDIR@
548SED:=@SED@
549SH:=@SH@
550SORT:=@SORT@
551TAR:=@TAR@
552TAIL:=@TAIL@
553TEE:=@TEE@
554TIME:=@TIME@
555IS_GNU_TIME:=@IS_GNU_TIME@
556TR:=@TR@
557TOUCH:=@TOUCH@
558UNIQ:=@UNIQ@
559WC:=@WC@
560XARGS:=@XARGS@
561ZIPEXE:=@ZIP@
562ZIP:=@ZIP@
563UNZIP:=@UNZIP@
564MT:=@FIXPATH@ @MT@
565RC:=@FIXPATH@ @RC@
566DUMPBIN:=@FIXPATH@ @DUMPBIN@
567CYGPATH:=@CYGPATH@
568LDD:=@LDD@
569OTOOL:=@OTOOL@
570READELF:=@READELF@
571EXPR:=@EXPR@
572FILE:=@FILE@
573HG:=@HG@
574OBJCOPY:=@OBJCOPY@
575SETFILE:=@SETFILE@
576XATTR:=@XATTR@
577JT_HOME:=@JT_HOME@
578JTREGEXE:=@JTREGEXE@
579XCODEBUILD=@XCODEBUILD@
580FIXPATH:=@FIXPATH@
581
582# Build setup
583ENABLE_JFR=@ENABLE_JFR@
584ENABLE_INTREE_EC=@ENABLE_INTREE_EC@
585USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
586USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
587USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
588LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
589MSVCR_DLL:=@MSVCR_DLL@
590MSVCP_DLL:=@MSVCP_DLL@
591
592####################################################
593#
594# INSTALLATION
595#
596
597# Common prefix for all installed files. Defaults to /usr/local,
598# but /opt/myjdk is another common version.
599INSTALL_PREFIX=@prefix@
600
601# Directories containing architecture-dependent files should be relative to exec_prefix
602INSTALL_EXECPREFIX=@exec_prefix@
603
604# java,javac,javah,javap etc are installed here.
605INSTALL_BINDIR=@bindir@
606
607# Read only architecture-independent data
608INSTALL_DATADIR=@datadir@
609
610# Root of above.
611INSTALL_DATAROOTDIR=@datarootdir@
612
613# Doc files, other than info and man.
614INSTALL_DOCDIR=@docdir@
615
616# Html documentation
617INSTALL_HTMLDIR=@htmldir@
618
619# Installing C header files, JNI headers for example.
620INSTALL_INCLUDEDIR=@includedir@
621
622# Installing library files....
623INSTALL_INCLUDEDIR=@libdir@
624
625# Executables that other programs run.
626INSTALL_LIBEXECDIR=@libexecdir@
627
628# Locale-dependent but architecture-independent data, such as message catalogs.
629INSTALL_LOCALEDIR=@localedir@
630
631# Modifiable single-machine data
632INSTALL_LOCALSTATEDIR=@localstatedir@
633
634# Man pages
635INSTALL_MANDIR=@mandir@
636
637# Modifiable architecture-independent data.
638INSTALL_SHAREDSTATEDIR=@sharedstatedir@
639
640# Read-only single-machine data
641INSTALL_SYSCONFDIR=@sysconfdir@
642
643####################################################
644#
645# Libraries
646#
647
648USE_EXTERNAL_LCMS:=@USE_EXTERNAL_LCMS@
649LCMS_CFLAGS:=@LCMS_CFLAGS@
650LCMS_LIBS:=@LCMS_LIBS@
651
652USE_EXTERNAL_LIBPNG:=@USE_EXTERNAL_LIBPNG@
653PNG_LIBS:=@PNG_LIBS@
654PNG_CFLAGS:=@PNG_CFLAGS@
655
656
657####################################################
658#
659# Misc
660#
661
662INCLUDE_SA=@INCLUDE_SA@
663
664OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
665OS_VERSION_MINOR:=@OS_VERSION_MINOR@
666OS_VERSION_MICRO:=@OS_VERSION_MICRO@
667
668# Images directory definitions
669JDK_IMAGE_SUBDIR:=jdk
670JRE_IMAGE_SUBDIR:=jre
671
672# Colon left out to be able to override output dir for bootcycle-images
673JDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
674JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
675
676# Test image, as above
677TEST_IMAGE_SUBDIR:=test
678TEST_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(TEST_IMAGE_SUBDIR)
679
680# Symbols image
681SYMBOLS_IMAGE_SUBDIR:=symbols
682SYMBOLS_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(SYMBOLS_IMAGE_SUBDIR)
683
684# Macosx bundles directory definitions
685JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle/jdk-$(VERSION_NUMBER).jdk/Contents
686JRE_MACOSX_BUNDLE_SUBDIR=jre-bundle/jre-$(VERSION_NUMBER).jre/Contents
687JDK_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR)
688JRE_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR)
689
690# This macro is called to allow inclusion of closed source counterparts.
691# Unless overridden in closed sources, it expands to nothing.
692# Usage: This function is called in an open makefile, with the following
693# arguments:
694# $1 the name of the repo, or empty if the top-level repo.
695# $2 the name of the makefile
696define IncludeCustomExtension
697endef
698
699# Include the custom-spec.gmk file if it exists
700-include $(dir @SPEC@)/custom-spec.gmk
701