spec.gmk.in revision 881:e877cb3eb4d6
1273562Smarcel#
2273562Smarcel# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3273562Smarcel# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4273562Smarcel#
5273562Smarcel# This code is free software; you can redistribute it and/or modify it
6273562Smarcel# under the terms of the GNU General Public License version 2 only, as
7273562Smarcel# published by the Free Software Foundation.  Oracle designates this
8273562Smarcel# particular file as subject to the "Classpath" exception as provided
9273562Smarcel# by Oracle in the LICENSE file that accompanied this code.
10277353Smarcel#
11273562Smarcel# This code is distributed in the hope that it will be useful, but WITHOUT
12273562Smarcel# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13273562Smarcel# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14273562Smarcel# version 2 for more details (a copy is included in the LICENSE file that
15273562Smarcel# accompanied this code).
16273562Smarcel#
17273562Smarcel# You should have received a copy of the GNU General Public License version
18273562Smarcel# 2 along with this work; if not, write to the Free Software Foundation,
19273562Smarcel# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20273562Smarcel#
21273562Smarcel# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22277353Smarcel# or visit www.oracle.com if you need additional information or have any
23273562Smarcel# questions.
24273562Smarcel#
25273562Smarcel
26273562Smarcel# Configured @DATE_WHEN_CONFIGURED@ to build
27273562Smarcel# for target system @OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU@
28273562Smarcel#   (called @OPENJDK_TARGET_AUTOCONF_NAME@ by autoconf)
29277353Smarcel# on build system @OPENJDK_BUILD_OS@-@OPENJDK_BUILD_CPU@
30277353Smarcel#   (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf)
31273562Smarcel# using 'configure @CONFIGURE_COMMAND_LINE@'
32273562Smarcel
33273562Smarcel# When calling macros, the spaces between arguments are 
34277353Smarcel# often semantically important! Sometimes we need to subst 
35277353Smarcel# spaces and commas, therefore we need the following macros.
36277353SmarcelX:=
37277353SmarcelSPACE:=$(X) $(X)
38277353SmarcelCOMMA:=,
39277353SmarcelHASH:=\#
40277353SmarcelSQUOTE:='
41277353Smarcel#'
42277353SmarcelDQUOTE:="
43277353Smarcel#"
44277353Smarceldefine NEWLINE
45277353Smarcel
46277353Smarcel
47277353Smarcelendef
48273562Smarcel
49273562Smarcel# A self-referential reference to this file.
50273562SmarcelSPEC:=@SPEC@
51277353Smarcel
52277353Smarcel# Specify where the spec file is.
53277353SmarcelMAKE_ARGS="SPEC=$(SPEC)"
54273562Smarcel
55273562SmarcelMAKE:=@MAKE@
56273562Smarcel
57273562Smarcel# Pass along the verbosity setting.
58273562Smarcelifeq (,$(findstring VERBOSE=,$(MAKE)))
59273562Smarcel    MAKE:=$(MAKE) $(VERBOSE) VERBOSE="$(VERBOSE)"
60277353Smarcelendif
61273562Smarcel
62277353Smarcel# No implicit variables or rules!
63277353Smarcelifeq (,$(findstring -R,$(MAKE)))
64273562Smarcel    MAKE:=$(MAKE) -R
65273562Smarcelendif
66273562Smarcel
67277353Smarcel# Specify where the common include directory for makefiles is.
68277353Smarcelifeq (,$(findstring -I @SRC_ROOT@/common/makefiles,$(MAKE)))
69287111Smarcel    MAKE:=$(MAKE) -I @SRC_ROOT@/common/makefiles
70287111Smarcelendif
71287111Smarcel
72287111Smarcel# The "human readable" name of this configuration
73287111SmarcelCONF_NAME:=@CONF_NAME@
74287111Smarcel
75287111Smarcel# The built jdk will run in this target system.
76287111SmarcelOPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
77287111SmarcelOPENJDK_TARGET_OS_API:=@OPENJDK_TARGET_OS_API@
78287111SmarcelOPENJDK_TARGET_OS_ENV:=@OPENJDK_TARGET_OS_ENV@
79287111Smarcel
80273562SmarcelOPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@
81277353SmarcelOPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@
82287111SmarcelOPENJDK_TARGET_CPU_BITS:=@OPENJDK_TARGET_CPU_BITS@
83273562SmarcelOPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
84287111Smarcel
85287111SmarcelCOMPILE_TYPE:=@COMPILE_TYPE@
86287111Smarcel
87287111Smarcel# Legacy support
88287111SmarcelOPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@
89273562SmarcelOPENJDK_TARGET_CPU_LIBDIR:=@OPENJDK_TARGET_CPU_LIBDIR@
90277353SmarcelOPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@
91273562SmarcelOPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@
92277353SmarcelOPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
93277353SmarcelOPENJDK_TARGET_CPU_JLI_CFLAGS:=@OPENJDK_TARGET_CPU_JLI_CFLAGS@
94277353SmarcelOPENJDK_TARGET_OS_API_DIR:=@OPENJDK_TARGET_OS_API_DIR@
95277353Smarcel
96273562Smarcel# We are building on this build system.
97277353Smarcel# When not cross-compiling, it is the same as the target.
98273562SmarcelOPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
99277353SmarcelOPENJDK_BUILD_OS_API:=@OPENJDK_BUILD_OS_API@
100277353Smarcel
101277353SmarcelOPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@
102277353SmarcelOPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
103277353SmarcelOPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
104277353SmarcelOPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
105277353Smarcel
106273562Smarcel# Legacy OS values for use in release file.
107273562SmarcelREQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
108273562SmarcelREQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
109273562Smarcel
110273562Smarcel@SET_OPENJDK@
111273562SmarcelLIBM:=-lm
112273562SmarcelLIBDL:=@LIBDL@
113273562Smarcel
114277353Smarcel# colon or semicolon
115277353SmarcelPATH_SEP:=@PATH_SEP@
116277353Smarcel
117273562Smarcelifeq ($(OPENJDK_TARGET_OS), windows)
118277353Smarcel  # On Windows, the Visual Studio toolchain needs the LIB and INCLUDE
119273562Smarcel  # environment variables (in Windows path style), and the PATH needs to
120273562Smarcel  # be adjusted to include Visual Studio tools (but this needs to be in
121273562Smarcel  # cygwin/msys style).
122273562Smarcel  export PATH:=@VS_PATH@
123273562Smarcel  export INCLUDE:=@VS_INCLUDE@
124277353Smarcel  export LIB:=@VS_LIB@
125277353Smarcelendif
126277353Smarcel
127277353Smarcel# The sys root where standard headers and libraries are found.
128277353Smarcel# Usually not needed since the configure script should have
129273562Smarcel# taken it into account already when setting CFLAGS et al.
130277353SmarcelSYS_ROOT:=@SYS_ROOT@
131273562Smarcel
132273562Smarcel# Paths to the source code
133277353SmarcelSRC_ROOT:=@SRC_ROOT@
134277353SmarcelADD_SRC_ROOT:=@ADD_SRC_ROOT@
135277353SmarcelOVERRIDE_SRC_ROOT:=@OVERRIDE_SRC_ROOT@
136277353SmarcelTOPDIR:=@SRC_ROOT@
137277353SmarcelOUTPUT_ROOT:=@OUTPUT_ROOT@
138273562SmarcelJDK_TOPDIR:=@JDK_TOPDIR@
139277353SmarcelLANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@
140277353SmarcelCORBA_TOPDIR:=@CORBA_TOPDIR@
141277353SmarcelJAXP_TOPDIR:=@JAXP_TOPDIR@
142277353SmarcelJAXWS_TOPDIR:=@JAXWS_TOPDIR@
143277353SmarcelHOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@
144277353SmarcelNASHORN_TOPDIR:=@NASHORN_TOPDIR@
145277353SmarcelCOPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
146277353Smarcel
147277353Smarcel# Location where build customization files may be found
148277353SmarcelCUSTOM_MAKE_DIR:=@CUSTOM_MAKE_DIR@
149273562Smarcel
150273562Smarcel# Information gathered from the version.numbers file.
151277353SmarcelJDK_MAJOR_VERSION:=@JDK_MAJOR_VERSION@
152273562SmarcelJDK_MINOR_VERSION:=@JDK_MINOR_VERSION@
153277353SmarcelJDK_MICRO_VERSION:=@JDK_MICRO_VERSION@
154277353SmarcelJDK_UPDATE_VERSION:=@JDK_UPDATE_VERSION@
155277353SmarcelJDK_BUILD_NUMBER:=@JDK_BUILD_NUMBER@
156277353SmarcelMILESTONE:=@MILESTONE@
157277353SmarcelLAUNCHER_NAME:=@LAUNCHER_NAME@
158277353SmarcelPRODUCT_NAME:=@PRODUCT_NAME@
159277353SmarcelPRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
160277353SmarcelJDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@
161277353SmarcelCOMPANY_NAME:=@COMPANY_NAME@
162277353SmarcelMACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
163277353SmarcelMACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
164277353Smarcel
165277353Smarcel# Different version strings generated from the above information.
166277353SmarcelJDK_VERSION:=@JDK_VERSION@
167277353SmarcelRUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX)
168277353SmarcelCOOKED_BUILD_NUMBER:=@COOKED_BUILD_NUMBER@
169277353Smarcel# These variables need to be generated here so that MILESTONE and
170277353Smarcel# JDK_BUILD_NUMBER can be overridden on the make command line.
171277353Smarcelifeq ($(MILESTONE),)
172277353Smarcel  RELEASE=$(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
173277353Smarcelelse
174277353Smarcel  RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
175277353Smarcelendif
176277353Smarcelifeq ($(JDK_BUILD_NUMBER),b00)
177277353Smarcel  USER_RELEASE_SUFFIX=@USER_RELEASE_SUFFIX@
178277353Smarcel  FULL_VERSION=$(RELEASE)-$(USER_RELEASE_SUFFIX)-$(JDK_BUILD_NUMBER)
179277353Smarcelelse
180277353Smarcel  FULL_VERSION=$(RELEASE)-$(JDK_BUILD_NUMBER)
181277353Smarcelendif
182277353SmarcelJRE_RELEASE_VERSION:=$(FULL_VERSION)
183277353Smarcel
184277353Smarcel# How to compile the code: release, fastdebug or slowdebug
185277353SmarcelDEBUG_LEVEL:=@DEBUG_LEVEL@
186277353Smarcel
187277353Smarcel# This is the JDK variant to build.
188287111Smarcel# The JDK variant is a name for a specific set of modules to be compiled for the JDK.
189287111SmarcelJDK_VARIANT:=@JDK_VARIANT@
190287111Smarcel
191287111Smarcel# Should we compile support for running with a graphical UI? (ie headful)
192287111Smarcel# Should we compile support for running without? (ie headless)
193287111SmarcelSUPPORT_HEADFUL:=@SUPPORT_HEADFUL@
194287111SmarcelSUPPORT_HEADLESS:=@SUPPORT_HEADLESS@
195287111Smarcel# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options.
196287111Smarcel@BUILD_HEADLESS@
197287111Smarcel
198287111Smarcel# These are the libjvms that we want to build.
199287111Smarcel# The java launcher uses the default.
200287111Smarcel# The others can be selected by specifying -client -server -minimal1 -kernel -zero or -zeroshark
201277353Smarcel# on the java launcher command line.
202277353SmarcelJVM_VARIANTS:=@JVM_VARIANTS@
203277353SmarcelJVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@
204277353SmarcelJVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@
205277353SmarcelJVM_VARIANT_MINIMAL1:=@JVM_VARIANT_MINIMAL1@
206277353SmarcelJVM_VARIANT_KERNEL:=@JVM_VARIANT_KERNEL@
207277353SmarcelJVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@
208277353SmarcelJVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@
209277353Smarcel
210277353Smarcel# Universal binaries on macosx
211277353SmarcelMACOSX_UNIVERSAL=@MACOSX_UNIVERSAL@
212277353Smarcel
213277353Smarcel# Legacy setting: -debug or -fastdebug
214277353Smarcel# Still used in version string...
215277353SmarcelBUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@
216277353Smarcel
217277353Smarcel# JDK_OUTPUTDIR specifies where a working jvm is built.
218277353Smarcel# You can run $(JDK_OUTPUTDIR)/bin/java
219277353Smarcel# Though the layout of the contents of $(JDK_OUTPUTDIR) is not
220277353Smarcel# yet the same as a default installation.
221277353Smarcel#
222277353Smarcel# When you run "make install" it will create the standardized
223277353Smarcel# layout for the jdk and the jre inside the IMAGES_OUTPUTDIR subdir.
224277353Smarcel# Then it will copy the contents of the jdk into the installation
225277353Smarcel# directory.
226277353Smarcel
227277353SmarcelBUILD_OUTPUT:=@BUILD_OUTPUT@
228277353SmarcelLANGTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/langtools
229277353SmarcelCORBA_OUTPUTDIR=$(BUILD_OUTPUT)/corba
230277353SmarcelJAXP_OUTPUTDIR=$(BUILD_OUTPUT)/jaxp
231277353SmarcelJAXWS_OUTPUTDIR=$(BUILD_OUTPUT)/jaxws
232277353SmarcelHOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
233277353SmarcelJDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
234277353SmarcelNASHORN_OUTPUTDIR=$(BUILD_OUTPUT)/nashorn
235277353SmarcelIMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
236277353SmarcelJCE_OUTPUTDIR=$(BUILD_OUTPUT)/jce-release
237277353Smarcel
238277353SmarcelLANGTOOLS_DIST=$(LANGTOOLS_OUTPUTDIR)/dist
239277353SmarcelCORBA_DIST=$(CORBA_OUTPUTDIR)/dist
240277353SmarcelJAXP_DIST=$(JAXP_OUTPUTDIR)/dist
241277353SmarcelJAXWS_DIST=$(JAXWS_OUTPUTDIR)/dist
242277353SmarcelHOTSPOT_DIST=@HOTSPOT_DIST@
243277353SmarcelNASHORN_DIST=$(NASHORN_OUTPUTDIR)/dist
244277353Smarcel
245277353SmarcelBUILD_HOTSPOT=@BUILD_HOTSPOT@
246277353Smarcel
247277353Smarcel# The boot jdk to use
248277353SmarcelBOOT_JDK:=@BOOT_JDK@
249277353SmarcelBOOT_JDK_JVMARGS:=@BOOT_JDK_JVMARGS@
250277353SmarcelBOOT_RTJAR:=@BOOT_RTJAR@
251277353SmarcelBOOT_TOOLSJAR=$(BOOT_JDK)/lib/tools.jar
252277353Smarcel
253277353Smarcel# When compiling Java source to be run by the boot jdk
254277353Smarcel# use these extra flags, eg -source 6 -target 6
255277353SmarcelBOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
256277353Smarcel
257277353Smarcel# Information about the build system
258277353SmarcelNUM_CORES:=@NUM_CORES@
259277353Smarcel# Enable sjavac support = use a javac server,
260277353Smarcel# multi core javac compilation and dependency tracking.
261277353SmarcelENABLE_SJAVAC:=@ENABLE_SJAVAC@
262277353Smarcel# Store sjavac server synchronization files here, and
263277353Smarcel# the sjavac server log files.
264277353SmarcelSJAVAC_SERVER_DIR:=@SJAVAC_SERVER_DIR@
265277353Smarcel
266277353Smarcel# The OpenJDK makefiles should be changed to using the standard
267277353Smarcel# configure output ..._CFLAGS and ..._LIBS. In the meantime we
268277353Smarcel# extract the information here.
269277353SmarcelFREETYPE2_LIB_PATH:=@FREETYPE2_LIB_PATH@
270277353SmarcelFREETYPE2_LIBS:=@FREETYPE2_LIBS@
271277353SmarcelFREETYPE2_CFLAGS:=@FREETYPE2_CFLAGS@
272277353SmarcelUSING_SYSTEM_FT_LIB=@USING_SYSTEM_FT_LIB@
273277353SmarcelCUPS_CFLAGS:=@CUPS_CFLAGS@
274277353Smarcel
275277353SmarcelPACKAGE_PATH=@PACKAGE_PATH@
276277353Smarcel
277277353Smarcel# Source file for cacerts
278277353SmarcelCACERTS_FILE=@CACERTS_FILE@
279277353Smarcel
280277353Smarcel# Enable unlimited crypto policy
281277353SmarcelUNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
282277353Smarcel
283277353Smarcel# Necessary additional compiler flags to compile X11 
284277353SmarcelX_CFLAGS:=@X_CFLAGS@
285277353SmarcelX_LIBS:=@X_LIBS@
286277353SmarcelOPENWIN_HOME:=@OPENWIN_HOME@
287277353Smarcel
288277353Smarcel# The lowest required version of macosx to enforce compatiblity for
289277353SmarcelMACOSX_REQUIRED_VERSION=@MACOSX_REQUIRED_VERSION@
290277353Smarcel
291277353Smarcel# There are two types: CC or CL
292277353Smarcel# CC is gcc and others behaving reasonably similar.
293273562Smarcel# CL is cl.exe only.
294277353SmarcelCOMPILER_TYPE:=@COMPILER_TYPE@
295277353Smarcel
296273562SmarcelCC_OUT_OPTION:=@CC_OUT_OPTION@
297273562SmarcelEXE_OUT_OPTION:=@EXE_OUT_OPTION@
298273562SmarcelLD_OUT_OPTION:=@LD_OUT_OPTION@
299287111SmarcelAR_OUT_OPTION:=@AR_OUT_OPTION@
300273562Smarcel
301273562Smarcel# Flags used for overriding the default opt setting for a C/C++ source file.
302273562SmarcelC_O_FLAG_HIGHEST:=@C_O_FLAG_HIGHEST@
303273562SmarcelC_O_FLAG_HI:=@C_O_FLAG_HI@
304273562SmarcelC_O_FLAG_NORM:=@C_O_FLAG_NORM@
305273562SmarcelC_O_FLAG_NONE:=@C_O_FLAG_NONE@
306273562SmarcelCXX_O_FLAG_HIGHEST:=@CXX_O_FLAG_HIGHEST@
307273562SmarcelCXX_O_FLAG_HI:=@CXX_O_FLAG_HI@
308273562SmarcelCXX_O_FLAG_NORM:=@CXX_O_FLAG_NORM@
309273562SmarcelCXX_O_FLAG_NONE:=@CXX_O_FLAG_NONE@
310273562Smarcel
311273562SmarcelC_FLAG_DEPS:=@C_FLAG_DEPS@
312273562SmarcelCXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
313277353Smarcel
314# Tools that potentially need to be cross compilation aware.
315CC:=@FIXPATH@ @CCACHE@ @CC@
316
317# CFLAGS used to compile the jdk native libraries (C-code)
318CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
319CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
320
321# CFLAGS used to compile the jdk native launchers (C-code)
322CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
323CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
324
325CXX:=@FIXPATH@ @CCACHE@ @CXX@
326#CXXFLAGS:=@CXXFLAGS@
327
328OBJC:=@CCACHE@ @OBJC@
329#OBJCFLAGS:=@OBJCFLAGS@
330
331CPP:=@FIXPATH@ @CPP@
332#CPPFLAGS:=@CPPFLAGS@
333
334# The linker can be gcc or ld on posix systems, or link.exe on windows systems.
335LD:=@FIXPATH@ @LD@
336
337# LDFLAGS used to link the jdk native libraries (C-code)
338LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
339LDFLAGS_JDKLIB_SUFFIX:=@LDFLAGS_JDKLIB_SUFFIX@
340
341# On some platforms the linker cannot be used to create executables, thus
342# the need for a separate LDEXE command.
343LDEXE:=@FIXPATH@ @LDEXE@
344
345# LDFLAGS used to link the jdk native launchers (C-code)
346LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
347LDFLAGS_JDKEXE_SUFFIX:=@LDFLAGS_JDKEXE_SUFFIX@
348
349# LDFLAGS specific to C++ linking.
350LDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@
351
352# Sometimes a different linker is needed for c++ libs
353LDCXX:=@FIXPATH@ @LDCXX@
354# The flags for linking libstdc++ linker.
355LIBCXX:=@LIBCXX@
356
357# Sometimes a different linker is needed for c++ executables
358LDEXECXX:=@FIXPATH@ @LDEXECXX@
359
360# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
361# build platform.
362BUILD_CC:=@FIXPATH@ @BUILD_CC@
363BUILD_LD:=@FIXPATH@ @BUILD_LD@
364
365AS:=@FIXPATH@ @AS@
366
367# AR is used to create a static library (is ar in posix, lib.exe in windows)
368AR:=@FIXPATH@ @AR@
369ARFLAGS:=@ARFLAGS@
370
371NM:=@NM@
372STRIP:=@STRIP@
373MCS:=@MCS@
374
375LIPO:=@LIPO@
376
377# Command to create a shared library
378SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@
379
380# Options to linker to specify a mapfile. 
381# (Note absence of := assignment, because we do not want to evaluate the macro body here)
382SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@
383
384# Options for C/CXX compiler to be used if linking is performed
385#   using reorder file
386C_FLAG_REORDER:=@C_FLAG_REORDER@
387CXX_FLAG_REORDER:=@CXX_FLAG_REORDER@
388
389#
390# Options for generating debug symbols
391ENABLE_DEBUG_SYMBOLS:=@ENABLE_DEBUG_SYMBOLS@
392CFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@
393CXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@
394ZIP_DEBUGINFO_FILES:=@ZIP_DEBUGINFO_FILES@
395
396#
397# Compress (or not) jars
398COMPRESS_JARS=@COMPRESS_JARS@
399
400# Options to linker to specify the library name.
401# (Note absence of := assignment, because we do not want to evaluate the macro body here)
402SET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@
403
404# Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
405# (Note absence of := assignment, because we do not want to evaluate the macro body here)
406SET_SHARED_LIBRARY_ORIGIN=@SET_SHARED_LIBRARY_ORIGIN@
407SET_EXECUTABLE_ORIGIN=@SET_EXECUTABLE_ORIGIN@
408
409# Different OS:es have different ways of naming shared libraries.
410# The SHARED_LIBRARY macro takes "verify" as and argument and returns:
411#    "libverify.so" or "libverify.dylib" or "verify.dll" depending on platform.
412# (Note absence of := assignment, because we do not want to evaluate the macro body here)
413SHARED_LIBRARY=@SHARED_LIBRARY@
414STATIC_LIBRARY=@STATIC_LIBRARY@
415LIBRARY_PREFIX:=@LIBRARY_PREFIX@
416SHARED_LIBRARY_SUFFIX:=@SHARED_LIBRARY_SUFFIX@
417STATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@
418EXE_SUFFIX:=@EXE_SUFFIX@
419OBJ_SUFFIX:=@OBJ_SUFFIX@
420
421POST_STRIP_CMD:=@POST_STRIP_CMD@
422POST_MCS_CMD:=@POST_MCS_CMD@
423
424JAVA_FLAGS:=@BOOT_JDK_JVMARGS@
425
426JAVA=@FIXPATH@ $(BOOT_JDK)/bin/java $(JAVA_FLAGS)
427
428JAVAC=@FIXPATH@ $(BOOT_JDK)/bin/javac
429# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
430# overriding that value by using ?=.
431JAVAC_FLAGS?=@JAVAC_FLAGS@
432
433JAVAH=@FIXPATH@ $(BOOT_JDK)/bin/javah
434
435JAR=@FIXPATH@ $(BOOT_JDK)/bin/jar
436
437RMIC=@FIXPATH@ $(BOOT_JDK)/bin/rmic
438
439NATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii
440
441JARSIGNER=@FIXPATH@ $(BOOT_JDK)/bin/jarsigner
442
443# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...
444BOOTSTRAP_JAVAC_JAR:=$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
445BOOTSTRAP_JAVAC_ARGS:="-Xbootclasspath/p:$(BOOTSTRAP_JAVAC_JAR)" -cp $(BOOTSTRAP_JAVAC_JAR)
446NEW_JAVAC   = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javac.Main
447NEW_JAVADOC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javadoc.Main
448
449# Base flags for RC
450# Guarding this against resetting value. Legacy make files include spec multiple
451# times.
452ifndef RC_FLAGS
453RC_FLAGS:=@RC_FLAGS@
454endif
455
456# A specific java binary with specific options can be used to run
457# the long running background sjavac servers and other long running tasks.
458SJAVAC_SERVER_JAVA:=@FIXPATH@ @SJAVAC_SERVER_JAVA@
459
460# Tools adhering to a minimal and common standard of posix compliance.
461AWK:=@AWK@
462BASENAME:=@BASENAME@
463BASH:=@BASH@
464CAT:=@CAT@
465CCACHE:=@CCACHE@
466# CD is going away, but remains to cater for legacy makefiles.
467CD:=cd
468CHMOD:=@CHMOD@
469COMM:=@COMM@
470CP:=@CP@
471CPIO:=@CPIO@
472CUT:=@CUT@
473DATE:=@DATE@
474DIFF:=@DIFF@
475DIRNAME:=@DIRNAME@
476FIND:=@FIND@
477FIND_DELETE:=@FIND_DELETE@
478ECHO:=@ECHO@
479EGREP:=@EGREP@
480FGREP:=@FGREP@
481GREP:=@GREP@
482HEAD:=@HEAD@
483LS:=@LS@
484LN:=@LN@
485MKDIR:=@MKDIR@
486MV:=@MV@
487NAWK:=@NAWK@
488PRINTF:=@PRINTF@
489PWD:=@THEPWDCMD@
490RM:=@RM@
491SED:=@SED@
492SH:=@SH@
493SORT:=@SORT@
494TAR:=@TAR@
495TAIL:=@TAIL@
496TEE:=@TEE@
497TIME:=@TIME@
498TR:=@TR@
499TOUCH:=@TOUCH@
500UNIQ:=@UNIQ@
501WC:=@WC@
502XARGS:=@XARGS@
503ZIPEXE:=@ZIP@
504ZIP:=@ZIP@
505UNZIP:=@UNZIP@
506MT:=@FIXPATH@ @MT@
507RC:=@FIXPATH@ @RC@
508DUMPBIN:=@FIXPATH@ @DUMPBIN@
509CYGPATH:=@CYGPATH@
510LDD:=@LDD@
511OTOOL:=@OTOOL@
512READELF:=@READELF@
513EXPR:=@EXPR@
514FILE:=@FILE@
515HG:=@HG@
516OBJCOPY:=@OBJCOPY@
517SETFILE:=@SETFILE@
518
519FIXPATH:=@FIXPATH@
520
521# Where the build output is stored for your convenience.
522BUILD_LOG:=@BUILD_LOG@
523BUILD_LOG_PREVIOUS:=@BUILD_LOG_PREVIOUS@
524# Disable the build log wrapper on sjavac+winapi until
525# we have solved how to prevent the log wrapper to wait
526# for the background sjavac server process.
527ifeq (@ENABLE_SJAVAC@X@OPENJDK_BUILD_OS_API@,yesXwinapi)
528    BUILD_LOG_WRAPPER:=
529else
530    BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
531endif
532
533# Build setup
534ENABLE_JFR=@ENABLE_JFR@
535USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
536USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
537USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
538LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
539MSVCR_DLL:=@MSVCR_DLL@
540
541
542# ADD_SRCS takes a single argument with source roots
543# and appends any corresponding source roots found
544# below --with-add-source-root and below
545# --with-override-source-root. It is the responsibility
546# of the next macro to get rid of superfluous files.
547ADD_SRCS=$1
548ifneq (,$(ADD_SRC_ROOT))
549    # Append wildcard rule to pickup any matching source roots found below ADD_SRC_ROOT 
550    ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(ADD_SRC_ROOT),$1))
551endif
552ifneq (,$(OVERRIDE_SRC_ROOT))
553    # Append wildcard rule to pickup any matching source roots found below OVERRIDE_SRC_ROOT 
554    ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(OVERRIDE_SRC_ROOT),$1))
555endif
556
557# OVR_SRCS creates a filter expression to filter out sources in
558# the original source directory that lie inside directories below
559# --with-override-source-root.
560# Use := here since we want to scan for these files here. To avoid recomputation later.
561# We cannot do the scan in configure, since that would force us to rerun configure when
562# we add overridden sources.
563ifneq (,$(OVERRIDE_SRC_ROOT))
564    OVR_SRCS:=$(addsuffix %,$(subst $(OVERRIDE_SRC_ROOT),$(SRC_ROOT),$(sort $(dir $(shell $(FIND) $(OVERRIDE_SRC_ROOT) -type f)))))
565else
566    OVR_SRCS:=
567endif
568
569####################################################
570#
571# INSTALLATION
572#
573
574# Common prefix for all installed files. Defaults to /usr/local,
575# but /opt/myjdk is another common version. 
576INSTALL_PREFIX=@prefix@
577
578# Directories containing architecture-dependent files should be relative to exec_prefix
579INSTALL_EXECPREFIX=@exec_prefix@
580
581# java,javac,javah,javap etc are installed here.
582INSTALL_BINDIR=@bindir@
583
584# Read only architecture-independent data
585INSTALL_DATADIR=@datadir@
586
587# Root of above.
588INSTALL_DATAROOTDIR=@datarootdir@
589
590# Doc files, other than info and man.
591INSTALL_DOCDIR=@docdir@
592
593# Html documentation
594INSTALL_HTMLDIR=@htmldir@
595
596# Installing C header files, JNI headers for example.
597INSTALL_INCLUDEDIR=@includedir@
598
599# Installing library files....
600INSTALL_INCLUDEDIR=@libdir@
601
602# Executables that other programs run.
603INSTALL_LIBEXECDIR=@libexecdir@
604
605# Locale-dependent but architecture-independent data, such as message catalogs. 
606INSTALL_LOCALEDIR=@localedir@
607
608# Modifiable single-machine data
609INSTALL_LOCALSTATEDIR=@localstatedir@
610
611# Man pages
612INSTALL_MANDIR=@mandir@
613
614# Modifiable architecture-independent data.
615INSTALL_SHAREDSTATEDIR=@sharedstatedir@
616
617# Read-only single-machine data
618INSTALL_SYSCONFDIR=@sysconfdir@
619
620
621####################################################
622#
623# Misc
624#
625
626# Name of Service Agent library
627SALIB_NAME=@SALIB_NAME@
628
629OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
630OS_VERSION_MINOR:=@OS_VERSION_MINOR@
631OS_VERSION_MICRO:=@OS_VERSION_MICRO@
632
633# Images directory definitions
634JDK_IMAGE_SUBDIR:=j2sdk-image
635JRE_IMAGE_SUBDIR:=j2re-image
636JDK_OVERLAY_IMAGE_SUBDIR:=j2sdk-overlay-image
637JRE_OVERLAY_IMAGE_SUBDIR:=j2re-overlay-image
638JDK_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
639JRE_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
640JDK_OVERLAY_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JDK_OVERLAY_IMAGE_SUBDIR)
641JRE_OVERLAY_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/$(JRE_OVERLAY_IMAGE_SUBDIR)
642
643# Macosx bundles directory definitions
644JDK_BUNDLE_SUBDIR:=j2sdk-bundle/jdk$(JDK_VERSION).jdk/Contents
645JRE_BUNDLE_SUBDIR:=j2re-bundle/jre$(JDK_VERSION).jre/Contents
646JDK_BUNDLE_DIR:=$(IMAGES_OUTPUTDIR)/$(JDK_BUNDLE_SUBDIR)
647JRE_BUNDLE_DIR:=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR)
648
649# Include the custom-spec.gmk file if it exists
650-include $(dir @SPEC@)/custom-spec.gmk
651