spec.gmk.in revision 764:4fb877dfe5c4
1198090Srdivacky#
2198090Srdivacky# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3198090Srdivacky# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4198090Srdivacky#
5198090Srdivacky# This code is free software; you can redistribute it and/or modify it
6198090Srdivacky# under the terms of the GNU General Public License version 2 only, as
7198090Srdivacky# published by the Free Software Foundation.  Oracle designates this
8198090Srdivacky# particular file as subject to the "Classpath" exception as provided
9198090Srdivacky# by Oracle in the LICENSE file that accompanied this code.
10198090Srdivacky#
11198090Srdivacky# This code is distributed in the hope that it will be useful, but WITHOUT
12198090Srdivacky# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13198090Srdivacky# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14198090Srdivacky# version 2 for more details (a copy is included in the LICENSE file that
15198090Srdivacky# accompanied this code).
16198090Srdivacky#
17198090Srdivacky# You should have received a copy of the GNU General Public License version
18198090Srdivacky# 2 along with this work; if not, write to the Free Software Foundation,
19198090Srdivacky# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20198090Srdivacky#
21198090Srdivacky# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22198090Srdivacky# or visit www.oracle.com if you need additional information or have any
23198090Srdivacky# questions.
24198090Srdivacky#
25198090Srdivacky
26198090Srdivacky# Configured @DATE_WHEN_CONFIGURED@ to build
27198090Srdivacky# for target system @OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU@
28198090Srdivacky#   (called @OPENJDK_TARGET_AUTOCONF_NAME@ by autoconf)
29198090Srdivacky# on build system @OPENJDK_BUILD_OS@-@OPENJDK_BUILD_CPU@
30198090Srdivacky#   (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf)
31198090Srdivacky# using 'configure @CONFIGURE_COMMAND_LINE@'
32198090Srdivacky
33198090Srdivacky# When calling macros, the spaces between arguments are 
34198090Srdivacky# often semantically important! Sometimes we need to subst 
35198090Srdivacky# spaces and commas, therefore we need the following macros.
36198090SrdivackyX:=
37198090SrdivackySPACE:=$(X) $(X)
38198090SrdivackyCOMMA:=,
39198090SrdivackyHASH:=\#
40198090SrdivackySQUOTE:='
41198090Srdivacky#'
42198090SrdivackyDQUOTE:="
43198090Srdivacky#"
44198090Srdivackydefine NEWLINE
45198090Srdivacky
46198090Srdivacky
47198090Srdivackyendef
48198090Srdivacky
49198090Srdivacky# A self-referential reference to this file.
50198090SrdivackySPEC:=@SPEC@
51198090Srdivacky
52198090Srdivacky# Specify where the spec file is.
53198090SrdivackyMAKE_ARGS="SPEC=$(SPEC)"
54198090Srdivacky
55198090SrdivackyMAKE:=@MAKE@
56198090Srdivacky
57198090Srdivacky# Pass along the verbosity and log level settings.
58198090Srdivackyifeq (,$(findstring VERBOSE=,$(MAKE)))
59198090Srdivacky    MAKE:=$(MAKE) $(VERBOSE) VERBOSE="$(VERBOSE)" LOG_LEVEL="$(LOG_LEVEL)"
60198090Srdivackyendif
61198090Srdivacky
62198090Srdivacky# No implicit variables or rules!
63198090Srdivackyifeq (,$(findstring -R,$(MAKE)))
64198090Srdivacky    MAKE:=$(MAKE) -R
65198090Srdivackyendif
66198090Srdivacky
67198090Srdivacky# Specify where the common include directory for makefiles is.
68198090Srdivackyifeq (,$(findstring -I @SRC_ROOT@/common/makefiles,$(MAKE)))
69198090Srdivacky    MAKE:=$(MAKE) -I @SRC_ROOT@/common/makefiles
70198090Srdivackyendif
71198090Srdivacky
72198090Srdivacky# The "human readable" name of this configuration
73198090SrdivackyCONF_NAME:=@CONF_NAME@
74198090Srdivacky
75206274Srdivacky# The built jdk will run in this target system.
76206274SrdivackyOPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
77206274SrdivackyOPENJDK_TARGET_OS_API:=@OPENJDK_TARGET_OS_API@
78206274SrdivackyOPENJDK_TARGET_OS_ENV:=@OPENJDK_TARGET_OS_ENV@
79206274Srdivacky
80198090SrdivackyOPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@
81198090SrdivackyOPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@
82198090SrdivackyOPENJDK_TARGET_CPU_BITS:=@OPENJDK_TARGET_CPU_BITS@
83198090SrdivackyOPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
84198090Srdivacky
85198090SrdivackyCOMPILE_TYPE:=@COMPILE_TYPE@
86198090Srdivacky
87206274Srdivacky# Legacy support
88206274SrdivackyOPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@
89206274SrdivackyOPENJDK_TARGET_CPU_LIBDIR:=@OPENJDK_TARGET_CPU_LIBDIR@
90206274SrdivackyOPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@
91206274SrdivackyOPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@
92206274SrdivackyOPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
93206274SrdivackyOPENJDK_TARGET_CPU_JLI_CFLAGS:=@OPENJDK_TARGET_CPU_JLI_CFLAGS@
94206274SrdivackyOPENJDK_TARGET_OS_API_DIR:=@OPENJDK_TARGET_OS_API_DIR@
95198090Srdivacky
96198090Srdivacky# We are building on this build system.
97198090Srdivacky# When not cross-compiling, it is the same as the target.
98198090SrdivackyOPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
99198090SrdivackyOPENJDK_BUILD_OS_API:=@OPENJDK_BUILD_OS_API@
100198090Srdivacky
101198090SrdivackyOPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@
102198090SrdivackyOPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
103198090SrdivackyOPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
104198090SrdivackyOPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
105198090Srdivacky
106198090Srdivacky# Legacy OS values for use in release file.
107198090SrdivackyREQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
108198090SrdivackyREQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
109198090Srdivacky
110198090Srdivacky@SET_OPENJDK@
111198090SrdivackyLIBM:=-lm
112198090SrdivackyLIBDL:=@LIBDL@
113198090Srdivacky
114198090Srdivacky# colon or semicolon
115198090SrdivackyPATH_SEP:=@PATH_SEP@
116198090Srdivacky
117198090Srdivackyifeq ($(OPENJDK_TARGET_OS), windows)
118198090Srdivacky  # On Windows, the Visual Studio toolchain needs the LIB and INCLUDE
119198090Srdivacky  # environment variables (in Windows path style), and the PATH needs to
120198090Srdivacky  # be adjusted to include Visual Studio tools (but this needs to be in
121198090Srdivacky  # cygwin/msys style).
122198090Srdivacky  export PATH:=@VS_PATH@
123198090Srdivacky  export INCLUDE:=@VS_INCLUDE@
124198090Srdivacky  export LIB:=@VS_LIB@
125198090Srdivackyendif
126198090Srdivacky
127198090Srdivacky# The sys root where standard headers and libraries are found.
128198090Srdivacky# Usually not needed since the configure script should have
129198090Srdivacky# taken it into account already when setting CFLAGS et al.
130198090SrdivackySYS_ROOT:=@SYS_ROOT@
131206274Srdivacky
132206274Srdivacky# Paths to the source code
133198090SrdivackySRC_ROOT:=@SRC_ROOT@
134198090SrdivackyADD_SRC_ROOT:=@ADD_SRC_ROOT@
135206274SrdivackyOVERRIDE_SRC_ROOT:=@OVERRIDE_SRC_ROOT@
136198090SrdivackyTOPDIR:=@SRC_ROOT@
137198090SrdivackyOUTPUT_ROOT:=@OUTPUT_ROOT@
138198090SrdivackyJDK_TOPDIR:=@JDK_TOPDIR@
139206274SrdivackyLANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@
140198090SrdivackyCORBA_TOPDIR:=@CORBA_TOPDIR@
141198090SrdivackyJAXP_TOPDIR:=@JAXP_TOPDIR@
142206274SrdivackyJAXWS_TOPDIR:=@JAXWS_TOPDIR@
143206274SrdivackyHOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@
144198090SrdivackyNASHORN_TOPDIR:=@NASHORN_TOPDIR@
145198090SrdivackyCOPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
146198090Srdivacky
147198090Srdivacky# Location where build customization files may be found
148198090SrdivackyCUSTOM_MAKE_DIR:=@CUSTOM_MAKE_DIR@
149198090Srdivacky
150198090Srdivacky# Information gathered from the version.numbers file.
151198090SrdivackyJDK_MAJOR_VERSION:=@JDK_MAJOR_VERSION@
152198090SrdivackyJDK_MINOR_VERSION:=@JDK_MINOR_VERSION@
153198090SrdivackyJDK_MICRO_VERSION:=@JDK_MICRO_VERSION@
154198090SrdivackyJDK_UPDATE_VERSION:=@JDK_UPDATE_VERSION@
155198090SrdivackyJDK_BUILD_NUMBER:=@JDK_BUILD_NUMBER@
156198090SrdivackyMILESTONE:=@MILESTONE@
157198090SrdivackyLAUNCHER_NAME:=@LAUNCHER_NAME@
158198090SrdivackyPRODUCT_NAME:=@PRODUCT_NAME@
159198090SrdivackyPRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
160198090SrdivackyJDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@
161198090SrdivackyCOMPANY_NAME:=@COMPANY_NAME@
162198090SrdivackyMACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
163198090SrdivackyMACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
164198090Srdivacky
165198090Srdivacky# Different version strings generated from the above information.
166198090SrdivackyJDK_VERSION:=@JDK_VERSION@
167198090SrdivackyRUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX)
168198090SrdivackyCOOKED_BUILD_NUMBER:=@COOKED_BUILD_NUMBER@
169198090Srdivacky# These variables need to be generated here so that MILESTONE and
170198090Srdivacky# JDK_BUILD_NUMBER can be overridden on the make command line.
171198090Srdivackyifeq ($(MILESTONE),)
172198090Srdivacky  RELEASE=$(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
173198090Srdivackyelse
174198090Srdivacky  RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
175198090Srdivackyendif
176198090Srdivackyifeq ($(JDK_BUILD_NUMBER),b00)
177198090Srdivacky  USER_RELEASE_SUFFIX=@USER_RELEASE_SUFFIX@
178198090Srdivacky  FULL_VERSION=$(RELEASE)-$(USER_RELEASE_SUFFIX)-$(JDK_BUILD_NUMBER)
179198090Srdivackyelse
180198090Srdivacky  FULL_VERSION=$(RELEASE)-$(JDK_BUILD_NUMBER)
181198090Srdivackyendif
182198090SrdivackyJRE_RELEASE_VERSION:=$(FULL_VERSION)
183198090Srdivacky
184198090Srdivacky# How to compile the code: release, fastdebug or slowdebug
185198090SrdivackyDEBUG_LEVEL:=@DEBUG_LEVEL@
186198090Srdivacky
187198090Srdivacky# This is the JDK variant to build.
188207618Srdivacky# The JDK variant is a name for a specific set of modules to be compiled for the JDK.
189198090SrdivackyJDK_VARIANT:=@JDK_VARIANT@
190198090Srdivacky
191198090Srdivacky# Should we compile support for running with a graphical UI? (ie headful)
192198090Srdivacky# Should we compile support for running without? (ie headless)
193198090SrdivackySUPPORT_HEADFUL:=@SUPPORT_HEADFUL@
194198090SrdivackySUPPORT_HEADLESS:=@SUPPORT_HEADLESS@
195198090Srdivacky# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options.
196198090Srdivacky@BUILD_HEADLESS@
197198090Srdivacky
198198090Srdivacky# These are the libjvms that we want to build.
199198090Srdivacky# The java launcher uses the default.
200198090Srdivacky# The others can be selected by specifying -client -server -minimal1 -kernel -zero or -zeroshark
201198090Srdivacky# on the java launcher command line.
202198090SrdivackyJVM_VARIANTS:=@JVM_VARIANTS@
203198090SrdivackyJVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@
204198090SrdivackyJVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@
205198090SrdivackyJVM_VARIANT_MINIMAL1:=@JVM_VARIANT_MINIMAL1@
206198090SrdivackyJVM_VARIANT_KERNEL:=@JVM_VARIANT_KERNEL@
207198090SrdivackyJVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@
208198090SrdivackyJVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@
209198090Srdivacky
210198090Srdivacky# Universal binaries on macosx
211198090SrdivackyMACOSX_UNIVERSAL=@MACOSX_UNIVERSAL@
212198090Srdivacky
213198090Srdivacky# Legacy setting: -debug or -fastdebug
214198090Srdivacky# Still used in version string...
215198090SrdivackyBUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@
216198090Srdivacky
217198090Srdivacky# JDK_OUTPUTDIR specifies where a working jvm is built.
218198090Srdivacky# You can run $(JDK_OUTPUTDIR)/bin/java
219198090Srdivacky# Though the layout of the contents of $(JDK_OUTPUTDIR) is not
220198090Srdivacky# yet the same as a default installation.
221198090Srdivacky#
222198090Srdivacky# When you run "make install" it will create the standardized
223206274Srdivacky# layout for the jdk and the jre inside the IMAGES_OUTPUTDIR subdir.
224198090Srdivacky# Then it will copy the contents of the jdk into the installation
225198090Srdivacky# directory.
226198090Srdivacky
227198090SrdivackyBUILD_OUTPUT:=@BUILD_OUTPUT@
228198090Srdivacky# Colon left out to be able to override IMAGES_OUTPUTDIR for bootcycle-images
229198090SrdivackyLANGTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/langtools
230198090SrdivackyCORBA_OUTPUTDIR=$(BUILD_OUTPUT)/corba
231198090SrdivackyJAXP_OUTPUTDIR=$(BUILD_OUTPUT)/jaxp
232198090SrdivackyJAXWS_OUTPUTDIR=$(BUILD_OUTPUT)/jaxws
233198090SrdivackyHOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
234198090SrdivackyJDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
235198090SrdivackyNASHORN_OUTPUTDIR=$(BUILD_OUTPUT)/nashorn
236198090SrdivackyIMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
237198090SrdivackyJCE_OUTPUTDIR=$(BUILD_OUTPUT)/jce-release
238198090Srdivacky
239198090SrdivackyLANGTOOLS_DIST=$(LANGTOOLS_OUTPUTDIR)/dist
240198090SrdivackyCORBA_DIST=$(CORBA_OUTPUTDIR)/dist
241198090SrdivackyJAXP_DIST=$(JAXP_OUTPUTDIR)/dist
242198090SrdivackyJAXWS_DIST=$(JAXWS_OUTPUTDIR)/dist
243198090SrdivackyHOTSPOT_DIST=@HOTSPOT_DIST@
244198090SrdivackyNASHORN_DIST=$(NASHORN_OUTPUTDIR)/dist
245198090Srdivacky
246198090SrdivackyBUILD_HOTSPOT=@BUILD_HOTSPOT@
247198090Srdivacky
248198090Srdivacky# The boot jdk to use
249198090SrdivackyBOOT_JDK:=@BOOT_JDK@
250198090SrdivackyBOOT_JDK_JVMARGS:=@BOOT_JDK_JVMARGS@
251198090SrdivackyBOOT_RTJAR:=@BOOT_RTJAR@
252198090SrdivackyBOOT_TOOLSJAR=$(BOOT_JDK)/lib/tools.jar
253198090Srdivacky
254198090Srdivacky# When compiling Java source to be run by the boot jdk
255198090Srdivacky# use these extra flags, eg -source 6 -target 6
256198090SrdivackyBOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
257198090Srdivacky
258198090Srdivacky# Information about the build system
259198090SrdivackyNUM_CORES:=@NUM_CORES@
260198090Srdivacky# Enable sjavac support = use a javac server,
261198090Srdivacky# multi core javac compilation and dependency tracking.
262198090SrdivackyENABLE_SJAVAC:=@ENABLE_SJAVAC@
263198090Srdivacky# Store sjavac server synchronization files here, and
264198090Srdivacky# the sjavac server log files.
265198090SrdivackySJAVAC_SERVER_DIR:=@SJAVAC_SERVER_DIR@
266198090Srdivacky
267198090Srdivacky# Number of parallel jobs to use for compilation
268198090SrdivackyJOBS?=@JOBS@
269198090Srdivacky
270198090Srdivacky# The OpenJDK makefiles should be changed to using the standard
271198090Srdivacky# configure output ..._CFLAGS and ..._LIBS. In the meantime we
272198090Srdivacky# extract the information here.
273198090SrdivackyFREETYPE2_LIB_PATH:=@FREETYPE2_LIB_PATH@
274198090SrdivackyFREETYPE2_LIBS:=@FREETYPE2_LIBS@
275198090SrdivackyFREETYPE2_CFLAGS:=@FREETYPE2_CFLAGS@
276198090SrdivackyUSING_SYSTEM_FT_LIB=@USING_SYSTEM_FT_LIB@
277198090SrdivackyCUPS_CFLAGS:=@CUPS_CFLAGS@
278198090SrdivackyALSA_LIBS:=@ALSA_LIBS@
279198090SrdivackyALSA_CFLAGS:=@ALSA_CFLAGS@
280198090Srdivacky
281198090SrdivackyPACKAGE_PATH=@PACKAGE_PATH@
282198090Srdivacky
283198090Srdivacky# Source file for cacerts
284198090SrdivackyCACERTS_FILE=@CACERTS_FILE@
285198090Srdivacky
286198090Srdivacky# Enable unlimited crypto policy
287198090SrdivackyUNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
288198090Srdivacky
289198090Srdivacky# Necessary additional compiler flags to compile X11 
290198090SrdivackyX_CFLAGS:=@X_CFLAGS@
291198090SrdivackyX_LIBS:=@X_LIBS@
292198090SrdivackyOPENWIN_HOME:=@OPENWIN_HOME@
293198090Srdivacky
294206274Srdivacky# DirectX SDK
295206274SrdivackyDXSDK_LIB_PATH=@DXSDK_LIB_PATH@
296206274SrdivackyDXSDK_INCLUDE_PATH=@DXSDK_INCLUDE_PATH@
297198090Srdivacky
298198090Srdivacky# The lowest required version of macosx to enforce compatiblity for
299198090SrdivackyMACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
300198090Srdivacky
301206274Srdivacky# There are two types: CC or CL
302206274Srdivacky# CC is gcc and others behaving reasonably similar.
303206274Srdivacky# CL is cl.exe only.
304206274SrdivackyCOMPILER_TYPE:=@COMPILER_TYPE@
305198090SrdivackyCOMPILER_NAME:=@COMPILER_NAME@
306198090Srdivacky
307206274SrdivackyTARGET_BITS_FLAG=@TARGET_BITS_FLAG@
308206274SrdivackyCOMPILER_SUPPORTS_TARGET_BITS_FLAG=@COMPILER_SUPPORTS_TARGET_BITS_FLAG@
309206274Srdivacky
310198090SrdivackyCC_OUT_OPTION:=@CC_OUT_OPTION@
311198090SrdivackyEXE_OUT_OPTION:=@EXE_OUT_OPTION@
312198090SrdivackyLD_OUT_OPTION:=@LD_OUT_OPTION@
313198090SrdivackyAR_OUT_OPTION:=@AR_OUT_OPTION@
314198090Srdivacky
315198090Srdivacky# Flags used for overriding the default opt setting for a C/C++ source file.
316198090SrdivackyC_O_FLAG_HIGHEST:=@C_O_FLAG_HIGHEST@
317198090SrdivackyC_O_FLAG_HI:=@C_O_FLAG_HI@
318198090SrdivackyC_O_FLAG_NORM:=@C_O_FLAG_NORM@
319198090SrdivackyC_O_FLAG_NONE:=@C_O_FLAG_NONE@
320198090SrdivackyCXX_O_FLAG_HIGHEST:=@CXX_O_FLAG_HIGHEST@
321198090SrdivackyCXX_O_FLAG_HI:=@CXX_O_FLAG_HI@
322198090SrdivackyCXX_O_FLAG_NORM:=@CXX_O_FLAG_NORM@
323198090SrdivackyCXX_O_FLAG_NONE:=@CXX_O_FLAG_NONE@
324198090Srdivacky
325198090SrdivackyC_FLAG_DEPS:=@C_FLAG_DEPS@
326198090SrdivackyCXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
327198090Srdivacky
328198090Srdivacky# Tools that potentially need to be cross compilation aware.
329198090SrdivackyCC:=@FIXPATH@ @CCACHE@ @CC@
330198090Srdivacky
331198090Srdivacky# CFLAGS used to compile the jdk native libraries (C-code)
332198090SrdivackyCFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
333198090SrdivackyCXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
334198090Srdivacky
335198090Srdivacky# CFLAGS used to compile the jdk native launchers (C-code)
336198090SrdivackyCFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
337198090SrdivackyCXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
338198090Srdivacky
339198090SrdivackyCXX:=@FIXPATH@ @CCACHE@ @CXX@
340198090Srdivacky#CXXFLAGS:=@CXXFLAGS@
341198090Srdivacky
342198090SrdivackyOBJC:=@CCACHE@ @OBJC@
343198090Srdivacky#OBJCFLAGS:=@OBJCFLAGS@
344198090Srdivacky
345198090SrdivackyCPP:=@FIXPATH@ @CPP@
346198090Srdivacky#CPPFLAGS:=@CPPFLAGS@
347198090Srdivacky
348198090Srdivacky# The linker can be gcc or ld on posix systems, or link.exe on windows systems.
349198090SrdivackyLD:=@FIXPATH@ @LD@
350198090Srdivacky
351198090Srdivacky# LDFLAGS used to link the jdk native libraries (C-code)
352198090SrdivackyLDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
353198090SrdivackyLDFLAGS_JDKLIB_SUFFIX:=@LDFLAGS_JDKLIB_SUFFIX@
354198090Srdivacky
355198090Srdivacky# On some platforms the linker cannot be used to create executables, thus
356198090Srdivacky# the need for a separate LDEXE command.
357198090SrdivackyLDEXE:=@FIXPATH@ @LDEXE@
358198090Srdivacky
359198090Srdivacky# LDFLAGS used to link the jdk native launchers (C-code)
360198090SrdivackyLDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
361198090SrdivackyLDFLAGS_JDKEXE_SUFFIX:=@LDFLAGS_JDKEXE_SUFFIX@
362198090Srdivacky
363198090Srdivacky# LDFLAGS specific to C++ linking.
364198090SrdivackyLDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@
365198090Srdivacky
366198090Srdivacky# Sometimes a different linker is needed for c++ libs
367198090SrdivackyLDCXX:=@FIXPATH@ @LDCXX@
368206274Srdivacky# The flags for linking libstdc++ linker.
369198090SrdivackyLIBCXX:=@LIBCXX@
370198090Srdivacky
371198090Srdivacky# Sometimes a different linker is needed for c++ executables
372198090SrdivackyLDEXECXX:=@FIXPATH@ @LDEXECXX@
373198090Srdivacky
374198090Srdivacky# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
375198090Srdivacky# build platform.
376198090SrdivackyBUILD_CC:=@FIXPATH@ @BUILD_CC@
377198090SrdivackyBUILD_LD:=@FIXPATH@ @BUILD_LD@
378198090Srdivacky
379198090SrdivackyAS:=@FIXPATH@ @AS@
380198090Srdivacky
381198090Srdivacky# AR is used to create a static library (is ar in posix, lib.exe in windows)
382198090SrdivackyAR:=@FIXPATH@ @AR@
383198090SrdivackyARFLAGS:=@ARFLAGS@
384198090Srdivacky
385198090SrdivackyNM:=@NM@
386198090SrdivackyGNM:=@GNM@
387198090SrdivackySTRIP:=@STRIP@
388198090SrdivackyMCS:=@MCS@
389198090Srdivacky
390198090SrdivackyLIPO:=@LIPO@
391198090Srdivacky
392198090Srdivacky# Command to create a shared library
393198090SrdivackySHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@
394198090Srdivacky
395198090Srdivacky# Options to linker to specify a mapfile. 
396198090Srdivacky# (Note absence of := assignment, because we do not want to evaluate the macro body here)
397198090SrdivackySET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@
398198090Srdivacky
399198090Srdivacky# Options for C/CXX compiler to be used if linking is performed
400198090Srdivacky#   using reorder file
401198090SrdivackyC_FLAG_REORDER:=@C_FLAG_REORDER@
402198090SrdivackyCXX_FLAG_REORDER:=@CXX_FLAG_REORDER@
403198090Srdivacky
404198090Srdivacky#
405198090Srdivacky# Options for generating debug symbols
406198090SrdivackyENABLE_DEBUG_SYMBOLS:=@ENABLE_DEBUG_SYMBOLS@
407198090SrdivackyCFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@
408206274SrdivackyCXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@
409198090SrdivackyZIP_DEBUGINFO_FILES:=@ZIP_DEBUGINFO_FILES@
410198090Srdivacky
411198090Srdivacky#
412198090Srdivacky# Compress (or not) jars
413198090SrdivackyCOMPRESS_JARS=@COMPRESS_JARS@
414198090Srdivacky
415198090Srdivacky# Options to linker to specify the library name.
416198090Srdivacky# (Note absence of := assignment, because we do not want to evaluate the macro body here)
417198090SrdivackySET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@
418198090Srdivacky
419198090Srdivacky# Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
420198090Srdivacky# (Note absence of := assignment, because we do not want to evaluate the macro body here)
421198090SrdivackySET_SHARED_LIBRARY_ORIGIN=@SET_SHARED_LIBRARY_ORIGIN@
422198090SrdivackySET_EXECUTABLE_ORIGIN=@SET_EXECUTABLE_ORIGIN@
423198090Srdivacky
424198090Srdivacky# Different OS:es have different ways of naming shared libraries.
425198090Srdivacky# The SHARED_LIBRARY macro takes "verify" as and argument and returns:
426198090Srdivacky#    "libverify.so" or "libverify.dylib" or "verify.dll" depending on platform.
427198090Srdivacky# (Note absence of := assignment, because we do not want to evaluate the macro body here)
428198090SrdivackySHARED_LIBRARY=@SHARED_LIBRARY@
429198090SrdivackySTATIC_LIBRARY=@STATIC_LIBRARY@
430198090SrdivackyLIBRARY_PREFIX:=@LIBRARY_PREFIX@
431198090SrdivackySHARED_LIBRARY_SUFFIX:=@SHARED_LIBRARY_SUFFIX@
432198090SrdivackySTATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@
433198090SrdivackyEXE_SUFFIX:=@EXE_SUFFIX@
434198090SrdivackyOBJ_SUFFIX:=@OBJ_SUFFIX@
435198090Srdivacky
436198090SrdivackyPOST_STRIP_CMD:=@POST_STRIP_CMD@
437198090SrdivackyPOST_MCS_CMD:=@POST_MCS_CMD@
438198090Srdivacky
439198090SrdivackyJAVA_FLAGS:=@BOOT_JDK_JVMARGS@
440198090Srdivacky
441198090SrdivackyJAVA=@FIXPATH@ $(BOOT_JDK)/bin/java $(JAVA_FLAGS)
442198090Srdivacky
443198090SrdivackyJAVAC=@FIXPATH@ $(BOOT_JDK)/bin/javac
444198090Srdivacky# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
445198090Srdivacky# overriding that value by using ?=.
446206274SrdivackyJAVAC_FLAGS?=@JAVAC_FLAGS@
447198090Srdivacky
448198090SrdivackyJAVAH=@FIXPATH@ $(BOOT_JDK)/bin/javah
449198090Srdivacky
450198090SrdivackyJAR=@FIXPATH@ $(BOOT_JDK)/bin/jar
451198090Srdivacky
452198090SrdivackyRMIC=@FIXPATH@ $(BOOT_JDK)/bin/rmic
453198090Srdivacky
454198090SrdivackyNATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii
455198090Srdivacky
456198090SrdivackyJARSIGNER=@FIXPATH@ $(BOOT_JDK)/bin/jarsigner
457198090Srdivacky
458198090Srdivacky# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...
459198090SrdivackyBOOTSTRAP_JAVAC_JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
460198090SrdivackyBOOTSTRAP_JAVAC_ARGS:="-Xbootclasspath/p:$(BOOTSTRAP_JAVAC_JAR)" -cp $(BOOTSTRAP_JAVAC_JAR)
461198090SrdivackyNEW_JAVAC   = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javac.Main
462198090SrdivackyNEW_JAVADOC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javadoc.Main
463198090Srdivacky
464198090Srdivacky# Base flags for RC
465198090Srdivacky# Guarding this against resetting value. Legacy make files include spec multiple
466198090Srdivacky# times.
467198090Srdivackyifndef RC_FLAGS
468198090SrdivackyRC_FLAGS:=@RC_FLAGS@
469198090Srdivackyendif
470198090Srdivacky
471198090Srdivacky# A specific java binary with specific options can be used to run
472198090Srdivacky# the long running background sjavac servers and other long running tasks.
473198090SrdivackySJAVAC_SERVER_JAVA:=@FIXPATH@ @SJAVAC_SERVER_JAVA@
474198090Srdivacky
475198090Srdivacky# Tools adhering to a minimal and common standard of posix compliance.
476198090SrdivackyAWK:=@AWK@
477198090SrdivackyBASENAME:=@BASENAME@
478198090SrdivackyBASH:=@BASH@
479198090SrdivackyCAT:=@CAT@
480198090SrdivackyCCACHE:=@CCACHE@
481198090Srdivacky# CD is going away, but remains to cater for legacy makefiles.
482206274SrdivackyCD:=cd
483206274SrdivackyCHMOD:=@CHMOD@
484206274SrdivackyCODESIGN:=@CODESIGN@
485198090SrdivackyCOMM:=@COMM@
486198090SrdivackyCP:=@CP@
487198090SrdivackyCPIO:=@CPIO@
488206274SrdivackyCUT:=@CUT@
489198090SrdivackyDATE:=@DATE@
490198090SrdivackyDIFF:=@DIFF@
491206274SrdivackyDIRNAME:=@DIRNAME@
492206274SrdivackyFIND:=@FIND@
493198090SrdivackyFIND_DELETE:=@FIND_DELETE@
494198090SrdivackyECHO:=@ECHO@
495198090SrdivackyEGREP:=@EGREP@
496198090SrdivackyFGREP:=@FGREP@
497198090SrdivackyGREP:=@GREP@
498198090SrdivackyHEAD:=@HEAD@
499198090SrdivackyLS:=@LS@
500198090SrdivackyLN:=@LN@
501198090SrdivackyMKDIR:=@MKDIR@
502198090SrdivackyMV:=@MV@
503198090SrdivackyNAWK:=@NAWK@
504198090SrdivackyPRINTF:=@PRINTF@
505198090SrdivackyPWD:=@THEPWDCMD@
506198090SrdivackyRM:=@RM@
507198090SrdivackySED:=@SED@
508198090SrdivackySH:=@SH@
509198090SrdivackySORT:=@SORT@
510198090SrdivackyTAR:=@TAR@
511198090SrdivackyTAIL:=@TAIL@
512198090SrdivackyTEE:=@TEE@
513198090SrdivackyTIME:=@TIME@
514198090SrdivackyIS_GNU_TIME:=@IS_GNU_TIME@
515198090SrdivackyTR:=@TR@
516198090SrdivackyTOUCH:=@TOUCH@
517198090SrdivackyUNIQ:=@UNIQ@
518198090SrdivackyWC:=@WC@
519198090SrdivackyXARGS:=@XARGS@
520198090SrdivackyZIPEXE:=@ZIP@
521198090SrdivackyZIP:=@ZIP@
522198090SrdivackyUNZIP:=@UNZIP@
523198090SrdivackyMT:=@FIXPATH@ @MT@
524198090SrdivackyRC:=@FIXPATH@ @RC@
525198090SrdivackyDUMPBIN:=@FIXPATH@ @DUMPBIN@
526198090SrdivackyCYGPATH:=@CYGPATH@
527198090SrdivackyLDD:=@LDD@
528198090SrdivackyOTOOL:=@OTOOL@
529198090SrdivackyREADELF:=@READELF@
530198090SrdivackyEXPR:=@EXPR@
531198090SrdivackyFILE:=@FILE@
532198090SrdivackyHG:=@HG@
533198090SrdivackyOBJCOPY:=@OBJCOPY@
534198090SrdivackySETFILE:=@SETFILE@
535198090SrdivackyXATTR:=@XATTR@
536198090SrdivackyJT_HOME:=@JT_HOME@
537198090SrdivackyJTREGEXE:=@JTREGEXE@
538198090Srdivacky
539198090SrdivackyFIXPATH:=@FIXPATH@
540198090Srdivacky
541198090Srdivacky# Where the build output is stored for your convenience.
542198090SrdivackyBUILD_LOG:=@BUILD_LOG@
543198090SrdivackyBUILD_LOG_PREVIOUS:=@BUILD_LOG_PREVIOUS@
544198090Srdivacky# Disable the build log wrapper on sjavac+winapi until
545198090Srdivacky# we have solved how to prevent the log wrapper to wait
546198090Srdivacky# for the background sjavac server process.
547198090Srdivackyifeq (@ENABLE_SJAVAC@X@OPENJDK_BUILD_OS_API@,yesXwinapi)
548198090Srdivacky    BUILD_LOG_WRAPPER:=
549198090Srdivackyelse
550198090Srdivacky    BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
551198090Srdivackyendif
552198090Srdivacky
553198090Srdivacky# Build setup
554198090SrdivackyENABLE_JFR=@ENABLE_JFR@
555198090SrdivackyENABLE_INTREE_EC=@ENABLE_INTREE_EC@
556198090SrdivackyUSE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
557198090SrdivackyUSE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
558198090SrdivackyUSE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
559198090SrdivackyLIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
560198090SrdivackyMSVCR_DLL:=@MSVCR_DLL@
561198090Srdivacky
562198090Srdivacky
563198090Srdivacky# ADD_SRCS takes a single argument with source roots
564198090Srdivacky# and appends any corresponding source roots found
565198090Srdivacky# below --with-add-source-root and below
566198090Srdivacky# --with-override-source-root. It is the responsibility
567198090Srdivacky# of the next macro to get rid of superfluous files.
568198090SrdivackyADD_SRCS=$1
569198090Srdivackyifneq (,$(ADD_SRC_ROOT))
570198090Srdivacky    # Append wildcard rule to pickup any matching source roots found below ADD_SRC_ROOT 
571198090Srdivacky    ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(ADD_SRC_ROOT),$1))
572198090Srdivackyendif
573198090Srdivackyifneq (,$(OVERRIDE_SRC_ROOT))
574198090Srdivacky    # Append wildcard rule to pickup any matching source roots found below OVERRIDE_SRC_ROOT 
575198090Srdivacky    ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(OVERRIDE_SRC_ROOT),$1))
576198090Srdivackyendif
577198090Srdivacky
578198090Srdivacky# OVR_SRCS creates a filter expression to filter out sources in
579198090Srdivacky# the original source directory that lie inside directories below
580198090Srdivacky# --with-override-source-root.
581198090Srdivacky# Use := here since we want to scan for these files here. To avoid recomputation later.
582198090Srdivacky# We cannot do the scan in configure, since that would force us to rerun configure when
583198090Srdivacky# we add overridden sources.
584198090Srdivackyifneq (,$(OVERRIDE_SRC_ROOT))
585198090Srdivacky    OVR_SRCS:=$(addsuffix %,$(subst $(OVERRIDE_SRC_ROOT),$(SRC_ROOT),$(sort $(dir $(shell $(FIND) $(OVERRIDE_SRC_ROOT) -type f)))))
586198090Srdivackyelse
587198090Srdivacky    OVR_SRCS:=
588198090Srdivackyendif
589198090Srdivacky
590198090Srdivacky####################################################
591198090Srdivacky#
592198090Srdivacky# INSTALLATION
593198090Srdivacky#
594198090Srdivacky
595198090Srdivacky# Common prefix for all installed files. Defaults to /usr/local,
596198090Srdivacky# but /opt/myjdk is another common version. 
597198090SrdivackyINSTALL_PREFIX=@prefix@
598198090Srdivacky
599198090Srdivacky# Directories containing architecture-dependent files should be relative to exec_prefix
600198090SrdivackyINSTALL_EXECPREFIX=@exec_prefix@
601198090Srdivacky
602198090Srdivacky# java,javac,javah,javap etc are installed here.
603198090SrdivackyINSTALL_BINDIR=@bindir@
604198090Srdivacky
605198090Srdivacky# Read only architecture-independent data
606198090SrdivackyINSTALL_DATADIR=@datadir@
607198090Srdivacky
608198090Srdivacky# Root of above.
609198090SrdivackyINSTALL_DATAROOTDIR=@datarootdir@
610198090Srdivacky
611198090Srdivacky# Doc files, other than info and man.
612198090SrdivackyINSTALL_DOCDIR=@docdir@
613198090Srdivacky
614198090Srdivacky# Html documentation
615198090SrdivackyINSTALL_HTMLDIR=@htmldir@
616198090Srdivacky
617198090Srdivacky# Installing C header files, JNI headers for example.
618198090SrdivackyINSTALL_INCLUDEDIR=@includedir@
619198090Srdivacky
620198090Srdivacky# Installing library files....
621198090SrdivackyINSTALL_INCLUDEDIR=@libdir@
622198090Srdivacky
623198090Srdivacky# Executables that other programs run.
624198090SrdivackyINSTALL_LIBEXECDIR=@libexecdir@
625198090Srdivacky
626198090Srdivacky# Locale-dependent but architecture-independent data, such as message catalogs. 
627198090SrdivackyINSTALL_LOCALEDIR=@localedir@
628198090Srdivacky
629198090Srdivacky# Modifiable single-machine data
630198090SrdivackyINSTALL_LOCALSTATEDIR=@localstatedir@
631198090Srdivacky
632198090Srdivacky# Man pages
633198090SrdivackyINSTALL_MANDIR=@mandir@
634198090Srdivacky
635198090Srdivacky# Modifiable architecture-independent data.
636198090SrdivackyINSTALL_SHAREDSTATEDIR=@sharedstatedir@
637198090Srdivacky
638198090Srdivacky# Read-only single-machine data
639198090SrdivackyINSTALL_SYSCONFDIR=@sysconfdir@
640198090Srdivacky
641198090Srdivacky
642198090Srdivacky####################################################
643198090Srdivacky#
644198090Srdivacky# Misc
645198090Srdivacky#
646198090Srdivacky
647198090Srdivacky# Name of Service Agent library
648198090SrdivackySALIB_NAME=@SALIB_NAME@
649198090Srdivacky
650198090SrdivackyINCLUDE_SA=@INCLUDE_SA@
651198090Srdivacky
652198090SrdivackyOS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
653198090SrdivackyOS_VERSION_MINOR:=@OS_VERSION_MINOR@
654198090SrdivackyOS_VERSION_MICRO:=@OS_VERSION_MICRO@
655198090Srdivacky
656198090Srdivacky# Images directory definitions
657198090SrdivackyJDK_IMAGE_SUBDIR:=j2sdk-image
658198090SrdivackyJRE_IMAGE_SUBDIR:=j2re-image
659198090SrdivackyJDK_OVERLAY_IMAGE_SUBDIR:=j2sdk-overlay-image
660198090SrdivackyJRE_OVERLAY_IMAGE_SUBDIR:=j2re-overlay-image
661198090Srdivacky# Colon left out to be able to override output dir for bootcycle-images
662198090SrdivackyJDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
663198090SrdivackyJRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
664198090SrdivackyJDK_OVERLAY_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_OVERLAY_IMAGE_SUBDIR)
665198090SrdivackyJRE_OVERLAY_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_OVERLAY_IMAGE_SUBDIR)
666198090Srdivacky
667198090Srdivacky# Macosx bundles directory definitions
668198090SrdivackyJDK_BUNDLE_SUBDIR=j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents
669198090SrdivackyJRE_BUNDLE_SUBDIR=j2re-bundle/jre$(JDK_VERSION).jre/Contents
670198090SrdivackyJDK_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_BUNDLE_SUBDIR)
671198090SrdivackyJRE_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR)
672198090Srdivacky
673198090Srdivacky# Include the custom-spec.gmk file if it exists
674198090Srdivacky-include $(dir @SPEC@)/custom-spec.gmk
675198090Srdivacky