spec.gmk.in revision 561:348a881c6da0
1#
2# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3# 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
26# 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)
31# using 'configure @CONFIGURE_COMMAND_LINE@'
32
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#"
44define NEWLINE
45
46
47endef
48
49# A self-referential reference to this file.
50SPEC:=@SPEC@
51
52# Specify where the spec file is.
53MAKE_ARGS="SPEC=$(SPEC)"
54
55MAKE:=@MAKE@
56
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
67# 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
72# The "human readable" name of this configuration
73CONF_NAME:=@CONF_NAME@
74
75# The built jdk will run in this target system.
76OPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
77OPENJDK_TARGET_OS_API:=@OPENJDK_TARGET_OS_API@
78OPENJDK_TARGET_OS_ENV:=@OPENJDK_TARGET_OS_ENV@
79
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@
84
85COMPILE_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
96# We are building on this build system.
97# When not cross-compiling, it is the same as the target.
98OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
99OPENJDK_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@
105
106# Legacy OS values for use in release file.
107REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
108REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
109
110@SET_OPENJDK@
111LIBM:=-lm
112LIBDL:=@LIBDL@
113
114# colon or semicolon
115PATH_SEP:=@PATH_SEP@
116
117ifeq ($(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
126
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@
138JDK_TOPDIR:=@JDK_TOPDIR@
139LANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@
140CORBA_TOPDIR:=@CORBA_TOPDIR@
141JAXP_TOPDIR:=@JAXP_TOPDIR@
142JAXWS_TOPDIR:=@JAXWS_TOPDIR@
143HOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@
144COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
145
146# Location where build customization files may be found
147CUSTOM_MAKE_DIR:=@CUSTOM_MAKE_DIR@
148
149# Information gathered from the version.numbers file.
150JDK_MAJOR_VERSION:=@JDK_MAJOR_VERSION@
151JDK_MINOR_VERSION:=@JDK_MINOR_VERSION@
152JDK_MICRO_VERSION:=@JDK_MICRO_VERSION@
153JDK_UPDATE_VERSION:=@JDK_UPDATE_VERSION@
154JDK_BUILD_NUMBER:=@JDK_BUILD_NUMBER@
155MILESTONE:=@MILESTONE@
156LAUNCHER_NAME:=@LAUNCHER_NAME@
157PRODUCT_NAME:=@PRODUCT_NAME@
158PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
159JDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@
160COMPANY_NAME:=@COMPANY_NAME@
161MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
162MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
163
164# Different version strings generated from the above information.
165JDK_VERSION:=@JDK_VERSION@
166RUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX)
167COOKED_BUILD_NUMBER:=@COOKED_BUILD_NUMBER@
168# These variables need to be generated here so that MILESTONE and
169# JDK_BUILD_NUMBER can be overridden on the make command line.
170ifeq ($(MILESTONE),)
171  RELEASE=$(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
172else
173  RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
174endif
175ifeq ($(JDK_BUILD_NUMBER),b00)
176  USER_RELEASE_SUFFIX=@USER_RELEASE_SUFFIX@
177  FULL_VERSION=$(RELEASE)-$(USER_RELEASE_SUFFIX)-$(JDK_BUILD_NUMBER)
178else
179  FULL_VERSION=$(RELEASE)-$(JDK_BUILD_NUMBER)
180endif
181JRE_RELEASE_VERSION:=$(FULL_VERSION)
182
183# How to compile the code: release, fastdebug or slowdebug
184DEBUG_LEVEL:=@DEBUG_LEVEL@
185
186# This is the JDK variant to build.
187# The JDK variant is a name for a specific set of modules to be compiled for the JDK.
188JDK_VARIANT:=@JDK_VARIANT@
189
190# Should we compile support for running with a graphical UI? (ie headful)
191# Should we compile support for running without? (ie headless)
192SUPPORT_HEADFUL:=@SUPPORT_HEADFUL@
193SUPPORT_HEADLESS:=@SUPPORT_HEADLESS@
194# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options.
195@BUILD_HEADLESS@
196
197# These are the libjvms that we want to build.
198# The java launcher uses the default.
199# The others can be selected by specifying -client -server -minimal1 -kernel -zero or -zeroshark
200# on the java launcher command line.
201JVM_VARIANTS:=@JVM_VARIANTS@
202JVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@
203JVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@
204JVM_VARIANT_MINIMAL1:=@JVM_VARIANT_MINIMAL1@
205JVM_VARIANT_KERNEL:=@JVM_VARIANT_KERNEL@
206JVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@
207JVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@
208
209# Universal binaries on macosx
210MACOSX_UNIVERSAL=@MACOSX_UNIVERSAL@
211
212# Legacy setting: -debug or -fastdebug
213# Still used in version string...
214BUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@
215
216# JDK_OUTPUTDIR specifies where a working jvm is built.
217# You can run $(JDK_OUTPUTDIR)/bin/java
218# Though the layout of the contents of $(JDK_OUTPUTDIR) is not
219# yet the same as a default installation.
220#
221# When you run "make install" it will create the standardized
222# layout for the jdk and the jre inside the IMAGES_OUTPUTDIR subdir.
223# Then it will copy the contents of the jdk into the installation
224# directory.
225
226BUILD_OUTPUT:=@BUILD_OUTPUT@
227LANGTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/langtools
228CORBA_OUTPUTDIR=$(BUILD_OUTPUT)/corba
229JAXP_OUTPUTDIR=$(BUILD_OUTPUT)/jaxp
230JAXWS_OUTPUTDIR=$(BUILD_OUTPUT)/jaxws
231HOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
232JDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
233IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
234JCE_OUTPUTDIR=$(BUILD_OUTPUT)/jce-release
235
236LANGTOOLS_DIST=$(LANGTOOLS_OUTPUTDIR)/dist
237CORBA_DIST=$(CORBA_OUTPUTDIR)/dist
238JAXP_DIST=$(JAXP_OUTPUTDIR)/dist
239JAXWS_DIST=$(JAXWS_OUTPUTDIR)/dist
240HOTSPOT_DIST=@HOTSPOT_DIST@
241
242BUILD_HOTSPOT=@BUILD_HOTSPOT@
243
244# The boot jdk to use
245BOOT_JDK:=@BOOT_JDK@
246BOOT_JDK_JVMARGS:=@BOOT_JDK_JVMARGS@
247BOOT_RTJAR:=@BOOT_RTJAR@
248BOOT_TOOLSJAR=$(BOOT_JDK)/lib/tools.jar
249
250# When compiling Java source to be run by the boot jdk
251# use these extra flags, eg -source 6 -target 6
252BOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
253
254# Information about the build system
255NUM_CORES:=@NUM_CORES@
256# Enable sjavac support = use a javac server,
257# multi core javac compilation and dependency tracking.
258ENABLE_SJAVAC:=@ENABLE_SJAVAC@
259# Store sjavac server synchronization files here, and
260# the sjavac server log files.
261SJAVAC_SERVER_DIR:=@SJAVAC_SERVER_DIR@
262
263# The OpenJDK makefiles should be changed to using the standard
264# configure output ..._CFLAGS and ..._LIBS. In the meantime we
265# extract the information here.
266FREETYPE2_LIB_PATH:=@FREETYPE2_LIB_PATH@
267FREETYPE2_LIBS:=@FREETYPE2_LIBS@
268FREETYPE2_CFLAGS:=@FREETYPE2_CFLAGS@
269USING_SYSTEM_FT_LIB=@USING_SYSTEM_FT_LIB@
270CUPS_CFLAGS:=@CUPS_CFLAGS@
271
272PACKAGE_PATH=@PACKAGE_PATH@
273
274# Source file for cacerts
275CACERTS_FILE=@CACERTS_FILE@
276
277# Enable unlimited crypto policy
278UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
279
280# Necessary additional compiler flags to compile X11 
281X_CFLAGS:=@X_CFLAGS@
282X_LIBS:=@X_LIBS@
283OPENWIN_HOME:=@OPENWIN_HOME@
284
285# There are two types: CC or CL
286# CC is gcc and others behaving reasonably similar.
287# CL is cl.exe only.
288COMPILER_TYPE:=@COMPILER_TYPE@
289
290CC_OUT_OPTION:=@CC_OUT_OPTION@
291EXE_OUT_OPTION:=@EXE_OUT_OPTION@
292LD_OUT_OPTION:=@LD_OUT_OPTION@
293AR_OUT_OPTION:=@AR_OUT_OPTION@
294
295# Flags used for overriding the default opt setting for a C/C++ source file.
296C_O_FLAG_HIGHEST:=@C_O_FLAG_HIGHEST@
297C_O_FLAG_HI:=@C_O_FLAG_HI@
298C_O_FLAG_NORM:=@C_O_FLAG_NORM@
299C_O_FLAG_NONE:=@C_O_FLAG_NONE@
300CXX_O_FLAG_HIGHEST:=@CXX_O_FLAG_HIGHEST@
301CXX_O_FLAG_HI:=@CXX_O_FLAG_HI@
302CXX_O_FLAG_NORM:=@CXX_O_FLAG_NORM@
303CXX_O_FLAG_NONE:=@CXX_O_FLAG_NONE@
304
305C_FLAG_DEPS:=@C_FLAG_DEPS@
306CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
307
308# Tools that potentially need to be cross compilation aware.
309CC:=@FIXPATH@ @CCACHE@ @CC@
310
311# CFLAGS used to compile the jdk native libraries (C-code)
312CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
313CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
314
315# CFLAGS used to compile the jdk native launchers (C-code)
316CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
317CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
318
319CXX:=@FIXPATH@ @CCACHE@ @CXX@
320#CXXFLAGS:=@CXXFLAGS@
321
322OBJC:=@CCACHE@ @OBJC@
323#OBJCFLAGS:=@OBJCFLAGS@
324
325CPP:=@FIXPATH@ @CPP@
326#CPPFLAGS:=@CPPFLAGS@
327
328# The linker can be gcc or ld on posix systems, or link.exe on windows systems.
329LD:=@FIXPATH@ @LD@
330
331# LDFLAGS used to link the jdk native libraries (C-code)
332LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
333LDFLAGS_JDKLIB_SUFFIX:=@LDFLAGS_JDKLIB_SUFFIX@
334
335# On some platforms the linker cannot be used to create executables, thus
336# the need for a separate LDEXE command.
337LDEXE:=@FIXPATH@ @LDEXE@
338
339# LDFLAGS used to link the jdk native launchers (C-code)
340LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
341LDFLAGS_JDKEXE_SUFFIX:=@LDFLAGS_JDKEXE_SUFFIX@
342
343# LDFLAGS specific to C++ linking.
344LDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@
345
346# Sometimes a different linker is needed for c++ libs
347LDCXX:=@FIXPATH@ @LDCXX@
348# The flags for linking libstdc++ linker.
349LIBCXX:=@LIBCXX@
350
351# Sometimes a different linker is needed for c++ executables
352LDEXECXX:=@FIXPATH@ @LDEXECXX@
353
354# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
355# build platform.
356BUILD_CC:=@FIXPATH@ @BUILD_CC@
357BUILD_LD:=@FIXPATH@ @BUILD_LD@
358
359AS:=@FIXPATH@ @AS@
360
361# AR is used to create a static library (is ar in posix, lib.exe in windows)
362AR:=@FIXPATH@ @AR@
363ARFLAGS:=@ARFLAGS@
364
365NM:=@NM@
366STRIP:=@STRIP@
367MCS:=@MCS@
368
369LIPO:=@LIPO@
370
371# Command to create a shared library
372SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@
373
374# Options to linker to specify a mapfile. 
375# (Note absence of := assignment, because we do not want to evaluate the macro body here)
376SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@
377
378# Options for C/CXX compiler to be used if linking is performed
379#   using reorder file
380C_FLAG_REORDER:=@C_FLAG_REORDER@
381CXX_FLAG_REORDER:=@CXX_FLAG_REORDER@
382
383#
384# Options for generating debug symbols
385ENABLE_DEBUG_SYMBOLS:=@ENABLE_DEBUG_SYMBOLS@
386CFLAGS_DEBUG_SYMBOLS:=@CFLAGS_DEBUG_SYMBOLS@
387CXXFLAGS_DEBUG_SYMBOLS:=@CXXFLAGS_DEBUG_SYMBOLS@
388ZIP_DEBUGINFO_FILES:=@ZIP_DEBUGINFO_FILES@
389
390#
391# Compress (or not) jars
392COMPRESS_JARS=@COMPRESS_JARS@
393
394# Options to linker to specify the library name.
395# (Note absence of := assignment, because we do not want to evaluate the macro body here)
396SET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@
397
398# Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
399# (Note absence of := assignment, because we do not want to evaluate the macro body here)
400SET_SHARED_LIBRARY_ORIGIN=@SET_SHARED_LIBRARY_ORIGIN@
401SET_EXECUTABLE_ORIGIN=@SET_EXECUTABLE_ORIGIN@
402
403# Different OS:es have different ways of naming shared libraries.
404# The SHARED_LIBRARY macro takes "verify" as and argument and returns:
405#    "libverify.so" or "libverify.dylib" or "verify.dll" depending on platform.
406# (Note absence of := assignment, because we do not want to evaluate the macro body here)
407SHARED_LIBRARY=@SHARED_LIBRARY@
408STATIC_LIBRARY=@STATIC_LIBRARY@
409LIBRARY_PREFIX:=@LIBRARY_PREFIX@
410SHARED_LIBRARY_SUFFIX:=@SHARED_LIBRARY_SUFFIX@
411STATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@
412EXE_SUFFIX:=@EXE_SUFFIX@
413OBJ_SUFFIX:=@OBJ_SUFFIX@
414
415POST_STRIP_CMD:=@POST_STRIP_CMD@
416POST_MCS_CMD:=@POST_MCS_CMD@
417
418JAVA_FLAGS:=@BOOT_JDK_JVMARGS@
419
420JAVA=@FIXPATH@ $(BOOT_JDK)/bin/java $(JAVA_FLAGS)
421
422JAVAC=@FIXPATH@ $(BOOT_JDK)/bin/javac
423# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
424# overriding that value by using ?=.
425JAVAC_FLAGS?=@JAVAC_FLAGS@
426
427JAVAH=@FIXPATH@ $(BOOT_JDK)/bin/javah
428
429JAR=@FIXPATH@ $(BOOT_JDK)/bin/jar
430
431RMIC=@FIXPATH@ $(BOOT_JDK)/bin/rmic
432
433NATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii
434
435JARSIGNER=@FIXPATH@ $(BOOT_JDK)/bin/jarsigner
436
437# Base flags for RC
438# Guarding this against resetting value. Legacy make files include spec multiple
439# times.
440ifndef RC_FLAGS
441RC_FLAGS:=@RC_FLAGS@
442endif
443
444# A specific java binary with specific options can be used to run
445# the long running background sjavac servers and other long running tasks.
446SJAVAC_SERVER_JAVA:=@FIXPATH@ @SJAVAC_SERVER_JAVA@
447
448# Tools adhering to a minimal and common standard of posix compliance.
449AWK:=@AWK@
450BASENAME:=@BASENAME@
451BASH:=@BASH@
452CAT:=@CAT@
453CCACHE:=@CCACHE@
454# CD is going away, but remains to cater for legacy makefiles.
455CD:=cd
456CHMOD:=@CHMOD@
457COMM:=@COMM@
458CP:=@CP@
459CPIO:=@CPIO@
460CUT:=@CUT@
461DATE:=@DATE@
462DIFF:=@DIFF@
463DIRNAME:=@DIRNAME@
464FIND:=@FIND@
465FIND_DELETE:=@FIND_DELETE@
466ECHO:=@ECHO@
467EGREP:=@EGREP@
468FGREP:=@FGREP@
469GREP:=@GREP@
470HEAD:=@HEAD@
471LS:=@LS@
472LN:=@LN@
473MKDIR:=@MKDIR@
474MV:=@MV@
475NAWK:=@NAWK@
476PRINTF:=@PRINTF@
477PWD:=@THEPWDCMD@
478RM:=@RM@
479SED:=@SED@
480SH:=@SH@
481SORT:=@SORT@
482TAR:=@TAR@
483TAIL:=@TAIL@
484TEE:=@TEE@
485TIME:=@TIME@
486TR:=@TR@
487TOUCH:=@TOUCH@
488UNIQ:=@UNIQ@
489WC:=@WC@
490XARGS:=@XARGS@
491ZIPEXE:=@ZIP@
492ZIP:=@ZIP@
493UNZIP:=@UNZIP@
494MT:=@FIXPATH@ @MT@
495RC:=@FIXPATH@ @RC@
496DUMPBIN:=@FIXPATH@ @DUMPBIN@
497CYGPATH:=@CYGPATH@
498LDD:=@LDD@
499OTOOL:=@OTOOL@
500READELF:=@READELF@
501EXPR:=@EXPR@
502FILE:=@FILE@
503HG:=@HG@
504OBJCOPY:=@OBJCOPY@
505SETFILE:=@SETFILE@
506
507FIXPATH:=@FIXPATH@
508
509# Where the build output is stored for your convenience.
510BUILD_LOG:=@BUILD_LOG@
511BUILD_LOG_PREVIOUS:=@BUILD_LOG_PREVIOUS@
512# Disable the build log wrapper on sjavac+winapi until
513# we have solved how to prevent the log wrapper to wait
514# for the background sjavac server process.
515ifeq (@ENABLE_SJAVAC@X@OPENJDK_BUILD_OS_API@,yesXwinapi)
516    BUILD_LOG_WRAPPER:=
517else
518    BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
519endif
520
521# Build setup
522ENABLE_JFR=@ENABLE_JFR@
523USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
524USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
525USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
526LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
527MSVCR_DLL:=@MSVCR_DLL@
528
529
530# ADD_SRCS takes a single argument with source roots
531# and appends any corresponding source roots found
532# below --with-add-source-root and below
533# --with-override-source-root. It is the responsibility
534# of the next macro to get rid of superfluous files.
535ADD_SRCS=$1
536ifneq (,$(ADD_SRC_ROOT))
537    # Append wildcard rule to pickup any matching source roots found below ADD_SRC_ROOT 
538    ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(ADD_SRC_ROOT),$1))
539endif
540ifneq (,$(OVERRIDE_SRC_ROOT))
541    # Append wildcard rule to pickup any matching source roots found below OVERRIDE_SRC_ROOT 
542    ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(OVERRIDE_SRC_ROOT),$1))
543endif
544
545# OVR_SRCS creates a filter expression to filter out sources in
546# the original source directory that lie inside directories below
547# --with-override-source-root.
548# Use := here since we want to scan for these files here. To avoid recomputation later.
549# We cannot do the scan in configure, since that would force us to rerun configure when
550# we add overridden sources.
551ifneq (,$(OVERRIDE_SRC_ROOT))
552    OVR_SRCS:=$(addsuffix %,$(subst $(OVERRIDE_SRC_ROOT),$(SRC_ROOT),$(sort $(dir $(shell $(FIND) $(OVERRIDE_SRC_ROOT) -type f)))))
553else
554    OVR_SRCS:=
555endif
556
557####################################################
558#
559# INSTALLATION
560#
561
562# Common prefix for all installed files. Defaults to /usr/local,
563# but /opt/myjdk is another common version. 
564INSTALL_PREFIX=@prefix@
565
566# Directories containing architecture-dependent files should be relative to exec_prefix
567INSTALL_EXECPREFIX=@exec_prefix@
568
569# java,javac,javah,javap etc are installed here.
570INSTALL_BINDIR=@bindir@
571
572# Read only architecture-independent data
573INSTALL_DATADIR=@datadir@
574
575# Root of above.
576INSTALL_DATAROOTDIR=@datarootdir@
577
578# Doc files, other than info and man.
579INSTALL_DOCDIR=@docdir@
580
581# Html documentation
582INSTALL_HTMLDIR=@htmldir@
583
584# Installing C header files, JNI headers for example.
585INSTALL_INCLUDEDIR=@includedir@
586
587# Installing library files....
588INSTALL_INCLUDEDIR=@libdir@
589
590# Executables that other programs run.
591INSTALL_LIBEXECDIR=@libexecdir@
592
593# Locale-dependent but architecture-independent data, such as message catalogs. 
594INSTALL_LOCALEDIR=@localedir@
595
596# Modifiable single-machine data
597INSTALL_LOCALSTATEDIR=@localstatedir@
598
599# Man pages
600INSTALL_MANDIR=@mandir@
601
602# Modifiable architecture-independent data.
603INSTALL_SHAREDSTATEDIR=@sharedstatedir@
604
605# Read-only single-machine data
606INSTALL_SYSCONFDIR=@sysconfdir@
607
608
609####################################################
610#
611# Misc
612#
613
614# Name of Service Agent library
615SALIB_NAME=@SALIB_NAME@
616
617OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
618OS_VERSION_MINOR:=@OS_VERSION_MINOR@
619OS_VERSION_MICRO:=@OS_VERSION_MICRO@
620
621# Include the custom-spec.gmk file if it exists
622-include $(dir @SPEC@)/custom-spec.gmk
623