blob: 92b0c83017e10aee47a26b1413acce38263ad8d8 [file] [log] [blame]
Fredrik Ohstromc4133952012-04-10 08:18:28 -07001#
Erik Joelssonf80cc972013-01-02 11:29:29 +01002# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
Fredrik Ohstromc4133952012-04-10 08:18:28 -07003# 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
Kelly O'Hair228c2162012-09-18 11:29:16 -070026# 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)
Erik Joelssonf7b99ca2012-07-03 16:11:12 -070031# using 'configure @CONFIGURE_COMMAND_LINE@'
Fredrik Ohstromc4133952012-04-10 08:18:28 -070032
33# When calling macros, the spaces between arguments are
34# often semantically important! Sometimes we need to subst
35# spaces and commas, therefore we need the following macros.
36X:=
37SPACE:=$(X) $(X)
38COMMA:=,
39HASH:=\#
40SQUOTE:='
41#'
42DQUOTE:="
43#"
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -070044define NEWLINE
45
46
Fredrik Ohstromc4133952012-04-10 08:18:28 -070047endef
48
Kelly O'Hair228c2162012-09-18 11:29:16 -070049# A self-referential reference to this file.
50SPEC:=@SPEC@
51
52# Specify where the spec file is.
53MAKE_ARGS="SPEC=$(SPEC)"
54
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -070055MAKE:=@MAKE@
Fredrik Ohstromc4133952012-04-10 08:18:28 -070056
57# Pass along the verbosity setting.
58ifeq (,$(findstring VERBOSE=,$(MAKE)))
59 MAKE:=$(MAKE) $(VERBOSE) VERBOSE="$(VERBOSE)"
60endif
61
62# No implicit variables or rules!
63ifeq (,$(findstring -R,$(MAKE)))
64 MAKE:=$(MAKE) -R
65endif
66
Fredrik Ohstromc4133952012-04-10 08:18:28 -070067# Specify where the common include directory for makefiles is.
68ifeq (,$(findstring -I @SRC_ROOT@/common/makefiles,$(MAKE)))
69 MAKE:=$(MAKE) -I @SRC_ROOT@/common/makefiles
70endif
71
Erik Joelsson36674b92012-06-07 20:25:06 -070072# The "human readable" name of this configuration
73CONF_NAME:=@CONF_NAME@
74
Erik Joelssonf7b99ca2012-07-03 16:11:12 -070075# The built jdk will run in this target system.
Erik Joelssonf7b99ca2012-07-03 16:11:12 -070076OPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
Erik Joelssonf7b99ca2012-07-03 16:11:12 -070077OPENJDK_TARGET_OS_API:=@OPENJDK_TARGET_OS_API@
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -070078OPENJDK_TARGET_OS_ENV:=@OPENJDK_TARGET_OS_ENV@
Erik Joelssonf7b99ca2012-07-03 16:11:12 -070079
80OPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@
81OPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@
82OPENJDK_TARGET_CPU_BITS:=@OPENJDK_TARGET_CPU_BITS@
83OPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
Fredrik Ohstromc4133952012-04-10 08:18:28 -070084
Kelly O'Hair228c2162012-09-18 11:29:16 -070085COMPILE_TYPE:=@COMPILE_TYPE@
86
87# Legacy support
88OPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@
89OPENJDK_TARGET_CPU_LIBDIR:=@OPENJDK_TARGET_CPU_LIBDIR@
90OPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@
91OPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@
92OPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
93OPENJDK_TARGET_CPU_JLI_CFLAGS:=@OPENJDK_TARGET_CPU_JLI_CFLAGS@
94OPENJDK_TARGET_OS_API_DIR:=@OPENJDK_TARGET_OS_API_DIR@
95
Fredrik Ohstromc4133952012-04-10 08:18:28 -070096# We are building on this build system.
Erik Joelssonf7b99ca2012-07-03 16:11:12 -070097# When not cross-compiling, it is the same as the target.
Erik Joelssonf7b99ca2012-07-03 16:11:12 -070098OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
Erik Joelssonf7b99ca2012-07-03 16:11:12 -070099OPENJDK_BUILD_OS_API:=@OPENJDK_BUILD_OS_API@
100
101OPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@
102OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
103OPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
104OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700105
Erik Joelsson36674b92012-06-07 20:25:06 -0700106# Legacy OS values for use in release file.
107REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
108REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
109
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700110@SET_OPENJDK@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700111LIBM:=-lm
Erik Joelsson36674b92012-06-07 20:25:06 -0700112LIBDL:=@LIBDL@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700113
114# colon or semicolon
115PATH_SEP:=@PATH_SEP@
116
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700117ifeq ($(OPENJDK_TARGET_OS), windows)
118 # On Windows, the Visual Studio toolchain needs the LIB and INCLUDE
119 # environment variables (in Windows path style), and the PATH needs to
120 # be adjusted to include Visual Studio tools (but this needs to be in
121 # cygwin/msys style).
122 export PATH:=@VS_PATH@
123 export INCLUDE:=@VS_INCLUDE@
124 export LIB:=@VS_LIB@
125endif
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700126
127# The sys root where standard headers and libraries are found.
128# Usually not needed since the configure script should have
129# taken it into account already when setting CFLAGS et al.
130SYS_ROOT:=@SYS_ROOT@
131
132# Paths to the source code
133SRC_ROOT:=@SRC_ROOT@
134ADD_SRC_ROOT:=@ADD_SRC_ROOT@
135OVERRIDE_SRC_ROOT:=@OVERRIDE_SRC_ROOT@
136TOPDIR:=@SRC_ROOT@
137OUTPUT_ROOT:=@OUTPUT_ROOT@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700138JDK_TOPDIR:=@JDK_TOPDIR@
139LANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@
140CORBA_TOPDIR:=@CORBA_TOPDIR@
141JAXP_TOPDIR:=@JAXP_TOPDIR@
142JAXWS_TOPDIR:=@JAXWS_TOPDIR@
143HOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@
Erik Joelsson5c31bde2013-02-25 15:08:11 -0800144NASHORN_TOPDIR:=@NASHORN_TOPDIR@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700145COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
146
Kelly O'Hair228c2162012-09-18 11:29:16 -0700147# Location where build customization files may be found
148CUSTOM_MAKE_DIR:=@CUSTOM_MAKE_DIR@
149
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700150# Information gathered from the version.numbers file.
151JDK_MAJOR_VERSION:=@JDK_MAJOR_VERSION@
152JDK_MINOR_VERSION:=@JDK_MINOR_VERSION@
153JDK_MICRO_VERSION:=@JDK_MICRO_VERSION@
154JDK_UPDATE_VERSION:=@JDK_UPDATE_VERSION@
155JDK_BUILD_NUMBER:=@JDK_BUILD_NUMBER@
156MILESTONE:=@MILESTONE@
157LAUNCHER_NAME:=@LAUNCHER_NAME@
158PRODUCT_NAME:=@PRODUCT_NAME@
159PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
160JDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@
161COMPANY_NAME:=@COMPANY_NAME@
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700162MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
163MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700164
165# Different version strings generated from the above information.
166JDK_VERSION:=@JDK_VERSION@
Erik Joelssonf80cc972013-01-02 11:29:29 +0100167RUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX)
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700168COOKED_BUILD_NUMBER:=@COOKED_BUILD_NUMBER@
Erik Joelsson36c06a22013-01-01 14:13:18 +0100169# These variables need to be generated here so that MILESTONE and
170# JDK_BUILD_NUMBER can be overridden on the make command line.
171ifeq ($(MILESTONE),)
172 RELEASE=$(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
173else
174 RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
175endif
176ifeq ($(JDK_BUILD_NUMBER),b00)
177 USER_RELEASE_SUFFIX=@USER_RELEASE_SUFFIX@
178 FULL_VERSION=$(RELEASE)-$(USER_RELEASE_SUFFIX)-$(JDK_BUILD_NUMBER)
179else
180 FULL_VERSION=$(RELEASE)-$(JDK_BUILD_NUMBER)
181endif
Erik Joelssonf80cc972013-01-02 11:29:29 +0100182JRE_RELEASE_VERSION:=$(FULL_VERSION)
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700183
184# How to compile the code: release, fastdebug or slowdebug
185DEBUG_LEVEL:=@DEBUG_LEVEL@
186
187# This is the JDK variant to build.
188# The JDK variant is a name for a specific set of modules to be compiled for the JDK.
189JDK_VARIANT:=@JDK_VARIANT@
190
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700191# Should we compile support for running with a graphical UI? (ie headful)
192# Should we compile support for running without? (ie headless)
193SUPPORT_HEADFUL:=@SUPPORT_HEADFUL@
194SUPPORT_HEADLESS:=@SUPPORT_HEADLESS@
195# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options.
196@BUILD_HEADLESS@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700197
198# These are the libjvms that we want to build.
199# The java launcher uses the default.
David Holmes2a455362012-12-20 01:44:02 -0500200# The others can be selected by specifying -client -server -minimal1 -kernel -zero or -zeroshark
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700201# on the java launcher command line.
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700202JVM_VARIANTS:=@JVM_VARIANTS@
203JVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@
204JVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@
David Holmes2a455362012-12-20 01:44:02 -0500205JVM_VARIANT_MINIMAL1:=@JVM_VARIANT_MINIMAL1@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700206JVM_VARIANT_KERNEL:=@JVM_VARIANT_KERNEL@
207JVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@
208JVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@
209
Kelly O'Hair228c2162012-09-18 11:29:16 -0700210# Universal binaries on macosx
211MACOSX_UNIVERSAL=@MACOSX_UNIVERSAL@
212
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700213# Legacy setting: -debug or -fastdebug
Kelly O'Hair228c2162012-09-18 11:29:16 -0700214# Still used in version string...
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700215BUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@
216
Kelly O'Hair228c2162012-09-18 11:29:16 -0700217# JDK_OUTPUTDIR specifies where a working jvm is built.
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700218# You can run $(JDK_OUTPUTDIR)/bin/java
219# Though the layout of the contents of $(JDK_OUTPUTDIR) is not
220# yet the same as a default installation.
Kelly O'Hair228c2162012-09-18 11:29:16 -0700221#
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700222# When you run "make install" it will create the standardized
Kelly O'Hair228c2162012-09-18 11:29:16 -0700223# layout for the jdk and the jre inside the IMAGES_OUTPUTDIR subdir.
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700224# Then it will copy the contents of the jdk into the installation
225# directory.
Erik Joelssonf7b99ca2012-07-03 16:11:12 -0700226
Kelly O'Hair228c2162012-09-18 11:29:16 -0700227BUILD_OUTPUT:=@BUILD_OUTPUT@
Erik Joelssona88f9ec2013-04-04 09:24:21 +0200228# Colon left out to be able to override IMAGES_OUTPUTDIR for bootcycle-images
Kelly O'Hair228c2162012-09-18 11:29:16 -0700229LANGTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/langtools
230CORBA_OUTPUTDIR=$(BUILD_OUTPUT)/corba
231JAXP_OUTPUTDIR=$(BUILD_OUTPUT)/jaxp
232JAXWS_OUTPUTDIR=$(BUILD_OUTPUT)/jaxws
233HOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
234JDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
Erik Joelsson5c31bde2013-02-25 15:08:11 -0800235NASHORN_OUTPUTDIR=$(BUILD_OUTPUT)/nashorn
Kelly O'Hair228c2162012-09-18 11:29:16 -0700236IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
Erik Joelsson1d856872013-01-02 15:36:00 +0100237JCE_OUTPUTDIR=$(BUILD_OUTPUT)/jce-release
Erik Joelssonf7b99ca2012-07-03 16:11:12 -0700238
Kelly O'Hair228c2162012-09-18 11:29:16 -0700239LANGTOOLS_DIST=$(LANGTOOLS_OUTPUTDIR)/dist
240CORBA_DIST=$(CORBA_OUTPUTDIR)/dist
241JAXP_DIST=$(JAXP_OUTPUTDIR)/dist
242JAXWS_DIST=$(JAXWS_OUTPUTDIR)/dist
Erik Joelssoncc66da72012-11-12 12:34:11 -0800243HOTSPOT_DIST=@HOTSPOT_DIST@
Erik Joelsson5c31bde2013-02-25 15:08:11 -0800244NASHORN_DIST=$(NASHORN_OUTPUTDIR)/dist
Erik Joelssoncc66da72012-11-12 12:34:11 -0800245
246BUILD_HOTSPOT=@BUILD_HOTSPOT@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700247
248# The boot jdk to use
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700249BOOT_JDK:=@BOOT_JDK@
250BOOT_JDK_JVMARGS:=@BOOT_JDK_JVMARGS@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700251BOOT_RTJAR:=@BOOT_RTJAR@
Kelly O'Hair228c2162012-09-18 11:29:16 -0700252BOOT_TOOLSJAR=$(BOOT_JDK)/lib/tools.jar
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700253
254# When compiling Java source to be run by the boot jdk
255# use these extra flags, eg -source 6 -target 6
256BOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
257
258# Information about the build system
259NUM_CORES:=@NUM_CORES@
Kelly O'Hair228c2162012-09-18 11:29:16 -0700260# Enable sjavac support = use a javac server,
261# multi core javac compilation and dependency tracking.
262ENABLE_SJAVAC:=@ENABLE_SJAVAC@
263# Store sjavac server synchronization files here, and
264# the sjavac server log files.
265SJAVAC_SERVER_DIR:=@SJAVAC_SERVER_DIR@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700266
Erik Joelsson737b8632013-03-04 16:45:07 +0100267# Number of parallel jobs to use for compilation
268JOBS?=@JOBS@
269
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700270# The OpenJDK makefiles should be changed to using the standard
271# configure output ..._CFLAGS and ..._LIBS. In the meantime we
272# extract the information here.
273FREETYPE2_LIB_PATH:=@FREETYPE2_LIB_PATH@
274FREETYPE2_LIBS:=@FREETYPE2_LIBS@
275FREETYPE2_CFLAGS:=@FREETYPE2_CFLAGS@
276USING_SYSTEM_FT_LIB=@USING_SYSTEM_FT_LIB@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700277CUPS_CFLAGS:=@CUPS_CFLAGS@
278
279PACKAGE_PATH=@PACKAGE_PATH@
280
Erik Joelsson36674b92012-06-07 20:25:06 -0700281# Source file for cacerts
282CACERTS_FILE=@CACERTS_FILE@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700283
Magnus Ihse Bursie1e78e4b2012-10-29 14:06:57 -0700284# Enable unlimited crypto policy
285UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
286
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700287# Necessary additional compiler flags to compile X11
288X_CFLAGS:=@X_CFLAGS@
289X_LIBS:=@X_LIBS@
290OPENWIN_HOME:=@OPENWIN_HOME@
291
Erik Joelssonef56e8f2013-03-06 10:50:37 +0100292# DirectX SDK
293DXSDK_LIB_PATH=@DXSDK_LIB_PATH@
294DXSDK_INCLUDE_PATH=@DXSDK_INCLUDE_PATH@
295
Erik Joelssond49ae782013-02-15 10:40:46 +0100296# The lowest required version of macosx to enforce compatiblity for
Erik Joelssonb70f9bf2013-02-21 14:16:56 +0100297MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
Erik Joelssond49ae782013-02-15 10:40:46 +0100298
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700299# There are two types: CC or CL
300# CC is gcc and others behaving reasonably similar.
301# CL is cl.exe only.
302COMPILER_TYPE:=@COMPILER_TYPE@
303
304CC_OUT_OPTION:=@CC_OUT_OPTION@
305EXE_OUT_OPTION:=@EXE_OUT_OPTION@
306LD_OUT_OPTION:=@LD_OUT_OPTION@
307AR_OUT_OPTION:=@AR_OUT_OPTION@
308
309# Flags used for overriding the default opt setting for a C/C++ source file.
Erik Joelsson36674b92012-06-07 20:25:06 -0700310C_O_FLAG_HIGHEST:=@C_O_FLAG_HIGHEST@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700311C_O_FLAG_HI:=@C_O_FLAG_HI@
312C_O_FLAG_NORM:=@C_O_FLAG_NORM@
313C_O_FLAG_NONE:=@C_O_FLAG_NONE@
Erik Joelsson36674b92012-06-07 20:25:06 -0700314CXX_O_FLAG_HIGHEST:=@CXX_O_FLAG_HIGHEST@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700315CXX_O_FLAG_HI:=@CXX_O_FLAG_HI@
316CXX_O_FLAG_NORM:=@CXX_O_FLAG_NORM@
317CXX_O_FLAG_NONE:=@CXX_O_FLAG_NONE@
318
Erik Joelsson36674b92012-06-07 20:25:06 -0700319C_FLAG_DEPS:=@C_FLAG_DEPS@
320CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
321
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700322# Tools that potentially need to be cross compilation aware.
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700323CC:=@FIXPATH@ @CCACHE@ @CC@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700324
325# CFLAGS used to compile the jdk native libraries (C-code)
326CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
327CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
328
329# CFLAGS used to compile the jdk native launchers (C-code)
330CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
331CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
332
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700333CXX:=@FIXPATH@ @CCACHE@ @CXX@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700334#CXXFLAGS:=@CXXFLAGS@
335
336OBJC:=@CCACHE@ @OBJC@
337#OBJCFLAGS:=@OBJCFLAGS@
338
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700339CPP:=@FIXPATH@ @CPP@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700340#CPPFLAGS:=@CPPFLAGS@
341
Kelly O'Hair228c2162012-09-18 11:29:16 -0700342# The linker can be gcc or ld on posix systems, or link.exe on windows systems.
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700343LD:=@FIXPATH@ @LD@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700344
345# LDFLAGS used to link the jdk native libraries (C-code)
346LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
347LDFLAGS_JDKLIB_SUFFIX:=@LDFLAGS_JDKLIB_SUFFIX@
348
349# On some platforms the linker cannot be used to create executables, thus
350# the need for a separate LDEXE command.
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700351LDEXE:=@FIXPATH@ @LDEXE@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700352
353# LDFLAGS used to link the jdk native launchers (C-code)
354LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
355LDFLAGS_JDKEXE_SUFFIX:=@LDFLAGS_JDKEXE_SUFFIX@
356
Kelly O'Hair228c2162012-09-18 11:29:16 -0700357# LDFLAGS specific to C++ linking.
358LDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@
359
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700360# Sometimes a different linker is needed for c++ libs
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700361LDCXX:=@FIXPATH@ @LDCXX@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700362# The flags for linking libstdc++ linker.
363LIBCXX:=@LIBCXX@
364
365# Sometimes a different linker is needed for c++ executables
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700366LDEXECXX:=@FIXPATH@ @LDEXECXX@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700367
Kelly O'Hair228c2162012-09-18 11:29:16 -0700368# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
369# build platform.
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700370BUILD_CC:=@FIXPATH@ @BUILD_CC@
371BUILD_LD:=@FIXPATH@ @BUILD_LD@
Erik Joelssonf7b99ca2012-07-03 16:11:12 -0700372
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700373AS:=@FIXPATH@ @AS@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700374
Kelly O'Hair228c2162012-09-18 11:29:16 -0700375# AR is used to create a static library (is ar in posix, lib.exe in windows)
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700376AR:=@FIXPATH@ @AR@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700377ARFLAGS:=@ARFLAGS@
378
Kelly O'Hair228c2162012-09-18 11:29:16 -0700379NM:=@NM@
Erik Joelsson21711142013-04-09 09:42:20 +0200380GNM:=@GNM@
Kelly O'Hair228c2162012-09-18 11:29:16 -0700381STRIP:=@STRIP@
382MCS:=@MCS@
383
384LIPO:=@LIPO@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700385
386# Command to create a shared library
387SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@
388
389# Options to linker to specify a mapfile.
390# (Note absence of := assignment, because we do not want to evaluate the macro body here)
391SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@
392
Erik Joelsson36674b92012-06-07 20:25:06 -0700393# Options for C/CXX compiler to be used if linking is performed
394# using reorder file
395C_FLAG_REORDER:=@C_FLAG_REORDER@
396CXX_FLAG_REORDER:=@CXX_FLAG_REORDER@
397
Erik Joelssonf7b99ca2012-07-03 16:11:12 -0700398#
399# Options for generating debug symbols
400ENABLE_DEBUG_SYMBOLS:=@ENABLE_DEBUG_SYMBOLS@
401CFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@
402CXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@
403ZIP_DEBUGINFO_FILES:=@ZIP_DEBUGINFO_FILES@
404
405#
406# Compress (or not) jars
407COMPRESS_JARS=@COMPRESS_JARS@
408
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700409# Options to linker to specify the library name.
410# (Note absence of := assignment, because we do not want to evaluate the macro body here)
411SET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@
412
413# Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
414# (Note absence of := assignment, because we do not want to evaluate the macro body here)
415SET_SHARED_LIBRARY_ORIGIN=@SET_SHARED_LIBRARY_ORIGIN@
Kelly O'Hair228c2162012-09-18 11:29:16 -0700416SET_EXECUTABLE_ORIGIN=@SET_EXECUTABLE_ORIGIN@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700417
418# Different OS:es have different ways of naming shared libraries.
419# The SHARED_LIBRARY macro takes "verify" as and argument and returns:
420# "libverify.so" or "libverify.dylib" or "verify.dll" depending on platform.
421# (Note absence of := assignment, because we do not want to evaluate the macro body here)
422SHARED_LIBRARY=@SHARED_LIBRARY@
423STATIC_LIBRARY=@STATIC_LIBRARY@
424LIBRARY_PREFIX:=@LIBRARY_PREFIX@
425SHARED_LIBRARY_SUFFIX:=@SHARED_LIBRARY_SUFFIX@
426STATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@
427EXE_SUFFIX:=@EXE_SUFFIX@
428OBJ_SUFFIX:=@OBJ_SUFFIX@
429
Erik Joelsson36674b92012-06-07 20:25:06 -0700430POST_STRIP_CMD:=@POST_STRIP_CMD@
431POST_MCS_CMD:=@POST_MCS_CMD@
432
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700433JAVA_FLAGS:=@BOOT_JDK_JVMARGS@
434
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700435JAVA=@FIXPATH@ $(BOOT_JDK)/bin/java $(JAVA_FLAGS)
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700436
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700437JAVAC=@FIXPATH@ $(BOOT_JDK)/bin/javac
Kelly O'Hair228c2162012-09-18 11:29:16 -0700438# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
439# overriding that value by using ?=.
440JAVAC_FLAGS?=@JAVAC_FLAGS@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700441
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700442JAVAH=@FIXPATH@ $(BOOT_JDK)/bin/javah
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700443
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700444JAR=@FIXPATH@ $(BOOT_JDK)/bin/jar
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700445
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700446RMIC=@FIXPATH@ $(BOOT_JDK)/bin/rmic
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700447
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700448NATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700449
Erik Joelsson1d856872013-01-02 15:36:00 +0100450JARSIGNER=@FIXPATH@ $(BOOT_JDK)/bin/jarsigner
451
Fredrik Öhrström9f5b4012013-01-31 14:00:09 +0100452# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...
453BOOTSTRAP_JAVAC_JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
454BOOTSTRAP_JAVAC_ARGS:="-Xbootclasspath/p:$(BOOTSTRAP_JAVAC_JAR)" -cp $(BOOTSTRAP_JAVAC_JAR)
455NEW_JAVAC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javac.Main
456NEW_JAVADOC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javadoc.Main
457
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700458# Base flags for RC
459# Guarding this against resetting value. Legacy make files include spec multiple
460# times.
461ifndef RC_FLAGS
462RC_FLAGS:=@RC_FLAGS@
463endif
464
465# A specific java binary with specific options can be used to run
Kelly O'Hair228c2162012-09-18 11:29:16 -0700466# the long running background sjavac servers and other long running tasks.
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700467SJAVAC_SERVER_JAVA:=@FIXPATH@ @SJAVAC_SERVER_JAVA@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700468
469# Tools adhering to a minimal and common standard of posix compliance.
470AWK:=@AWK@
Kelly O'Hair228c2162012-09-18 11:29:16 -0700471BASENAME:=@BASENAME@
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700472BASH:=@BASH@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700473CAT:=@CAT@
474CCACHE:=@CCACHE@
475# CD is going away, but remains to cater for legacy makefiles.
476CD:=cd
477CHMOD:=@CHMOD@
Erik Joelssonf80cc972013-01-02 11:29:29 +0100478COMM:=@COMM@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700479CP:=@CP@
Erik Joelssonf80cc972013-01-02 11:29:29 +0100480CPIO:=@CPIO@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700481CUT:=@CUT@
482DATE:=@DATE@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700483DIFF:=@DIFF@
Erik Joelssonf80cc972013-01-02 11:29:29 +0100484DIRNAME:=@DIRNAME@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700485FIND:=@FIND@
486FIND_DELETE:=@FIND_DELETE@
487ECHO:=@ECHO@
488EGREP:=@EGREP@
489FGREP:=@FGREP@
490GREP:=@GREP@
491HEAD:=@HEAD@
492LS:=@LS@
493LN:=@LN@
494MKDIR:=@MKDIR@
495MV:=@MV@
496NAWK:=@NAWK@
497PRINTF:=@PRINTF@
498PWD:=@THEPWDCMD@
499RM:=@RM@
500SED:=@SED@
501SH:=@SH@
502SORT:=@SORT@
503TAR:=@TAR@
504TAIL:=@TAIL@
505TEE:=@TEE@
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700506TIME:=@TIME@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700507TR:=@TR@
508TOUCH:=@TOUCH@
Erik Joelssonf80cc972013-01-02 11:29:29 +0100509UNIQ:=@UNIQ@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700510WC:=@WC@
511XARGS:=@XARGS@
512ZIPEXE:=@ZIP@
513ZIP:=@ZIP@
514UNZIP:=@UNZIP@
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700515MT:=@FIXPATH@ @MT@
516RC:=@FIXPATH@ @RC@
517DUMPBIN:=@FIXPATH@ @DUMPBIN@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700518CYGPATH:=@CYGPATH@
519LDD:=@LDD@
520OTOOL:=@OTOOL@
521READELF:=@READELF@
522EXPR:=@EXPR@
523FILE:=@FILE@
Erik Joelsson36674b92012-06-07 20:25:06 -0700524HG:=@HG@
Erik Joelssonf7b99ca2012-07-03 16:11:12 -0700525OBJCOPY:=@OBJCOPY@
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700526SETFILE:=@SETFILE@
Erik Joelsson6cb72b32013-04-05 09:38:54 +0200527XATTR:=@XATTR@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700528
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700529FIXPATH:=@FIXPATH@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700530
531# Where the build output is stored for your convenience.
532BUILD_LOG:=@BUILD_LOG@
Erik Joelssonf7b99ca2012-07-03 16:11:12 -0700533BUILD_LOG_PREVIOUS:=@BUILD_LOG_PREVIOUS@
Erik Joelsson41557452012-11-13 15:54:33 -0800534# Disable the build log wrapper on sjavac+winapi until
535# we have solved how to prevent the log wrapper to wait
536# for the background sjavac server process.
537ifeq (@ENABLE_SJAVAC@X@OPENJDK_BUILD_OS_API@,yesXwinapi)
538 BUILD_LOG_WRAPPER:=
539else
540 BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
541endif
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700542
543# Build setup
Erik Joelssonf7b99ca2012-07-03 16:11:12 -0700544ENABLE_JFR=@ENABLE_JFR@
Omair Majid7b224022013-03-18 10:47:37 -0400545ENABLE_INTREE_EC=@ENABLE_INTREE_EC@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700546USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
547USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
548USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
Erik Joelssonf7b99ca2012-07-03 16:11:12 -0700549LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
Kelly O'Hairf9c6f4b2012-10-26 14:29:57 -0700550MSVCR_DLL:=@MSVCR_DLL@
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700551
Erik Joelssonf7b99ca2012-07-03 16:11:12 -0700552
Fredrik Ohstromc4133952012-04-10 08:18:28 -0700553# ADD_SRCS takes a single argument with source roots
554# and appends any corresponding source roots found
555# below --with-add-source-root and below
556# --with-override-source-root. It is the responsibility
557# of the next macro to get rid of superfluous files.
558ADD_SRCS=$1
559ifneq (,$(ADD_SRC_ROOT))
560 # Append wildcard rule to pickup any matching source roots found below ADD_SRC_ROOT
561 ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(ADD_SRC_ROOT),$1))
562endif
563ifneq (,$(OVERRIDE_SRC_ROOT))
564 # Append wildcard rule to pickup any matching source roots found below OVERRIDE_SRC_ROOT
565 ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(OVERRIDE_SRC_ROOT),$1))
566endif
567
568# OVR_SRCS creates a filter expression to filter out sources in
569# the original source directory that lie inside directories below
570# --with-override-source-root.
571# Use := here since we want to scan for these files here. To avoid recomputation later.
572# We cannot do the scan in configure, since that would force us to rerun configure when
573# we add overridden sources.
574ifneq (,$(OVERRIDE_SRC_ROOT))
575 OVR_SRCS:=$(addsuffix %,$(subst $(OVERRIDE_SRC_ROOT),$(SRC_ROOT),$(sort $(dir $(shell $(FIND) $(OVERRIDE_SRC_ROOT) -type f)))))
576else
577 OVR_SRCS:=
578endif
579
580####################################################
581#
582# INSTALLATION
583#
584
585# Common prefix for all installed files. Defaults to /usr/local,
586# but /opt/myjdk is another common version.
587INSTALL_PREFIX=@prefix@
588
589# Directories containing architecture-dependent files should be relative to exec_prefix
590INSTALL_EXECPREFIX=@exec_prefix@
591
592# java,javac,javah,javap etc are installed here.
593INSTALL_BINDIR=@bindir@
594
595# Read only architecture-independent data
596INSTALL_DATADIR=@datadir@
597
598# Root of above.
599INSTALL_DATAROOTDIR=@datarootdir@
600
601# Doc files, other than info and man.
602INSTALL_DOCDIR=@docdir@
603
604# Html documentation
605INSTALL_HTMLDIR=@htmldir@
606
607# Installing C header files, JNI headers for example.
608INSTALL_INCLUDEDIR=@includedir@
609
610# Installing library files....
611INSTALL_INCLUDEDIR=@libdir@
612
613# Executables that other programs run.
614INSTALL_LIBEXECDIR=@libexecdir@
615
616# Locale-dependent but architecture-independent data, such as message catalogs.
617INSTALL_LOCALEDIR=@localedir@
618
619# Modifiable single-machine data
620INSTALL_LOCALSTATEDIR=@localstatedir@
621
622# Man pages
623INSTALL_MANDIR=@mandir@
624
625# Modifiable architecture-independent data.
626INSTALL_SHAREDSTATEDIR=@sharedstatedir@
627
628# Read-only single-machine data
629INSTALL_SYSCONFDIR=@sysconfdir@
630
631
632####################################################
633#
634# Misc
635#
636
Erik Joelsson36674b92012-06-07 20:25:06 -0700637# Name of Service Agent library
638SALIB_NAME=@SALIB_NAME@
639
Omair Majidca98a332013-04-08 14:07:32 -0400640INCLUDE_SA=@INCLUDE_SA@
641
Erik Joelsson36674b92012-06-07 20:25:06 -0700642OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
643OS_VERSION_MINOR:=@OS_VERSION_MINOR@
644OS_VERSION_MICRO:=@OS_VERSION_MICRO@
645
Erik Joelssonf2fab622013-01-03 20:54:38 +0100646# Images directory definitions
647JDK_IMAGE_SUBDIR:=j2sdk-image
648JRE_IMAGE_SUBDIR:=j2re-image
649JDK_OVERLAY_IMAGE_SUBDIR:=j2sdk-overlay-image
650JRE_OVERLAY_IMAGE_SUBDIR:=j2re-overlay-image
Erik Joelssona88f9ec2013-04-04 09:24:21 +0200651# Colon left out to be able to override output dir for bootcycle-images
652JDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
653JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
654JDK_OVERLAY_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_OVERLAY_IMAGE_SUBDIR)
655JRE_OVERLAY_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_OVERLAY_IMAGE_SUBDIR)
Erik Joelssonf2fab622013-01-03 20:54:38 +0100656
657# Macosx bundles directory definitions
Erik Joelssona88f9ec2013-04-04 09:24:21 +0200658JDK_BUNDLE_SUBDIR=j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents
659JRE_BUNDLE_SUBDIR=j2re-bundle/jre$(JDK_VERSION).jre/Contents
660JDK_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_BUNDLE_SUBDIR)
661JRE_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR)
Erik Joelssonf2fab622013-01-03 20:54:38 +0100662
Kelly O'Hair228c2162012-09-18 11:29:16 -0700663# Include the custom-spec.gmk file if it exists
664-include $(dir @SPEC@)/custom-spec.gmk