author | igor |
Thu, 14 Oct 2010 16:45:31 -0700 | |
changeset 6913 | 812a208bccda |
parent 6681 | e721d11e4826 |
child 7468 | 6cab86212adb |
child 7308 | 95b4878b4890 |
permissions | -rw-r--r-- |
2 | 1 |
# |
5506 | 2 |
# Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved. |
2 | 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 |
|
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
2 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
2 | 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 |
# |
|
5506 | 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. |
|
2 | 24 |
# |
25 |
||
26 |
# |
|
27 |
# Common variables used by all the Java makefiles. This file should |
|
28 |
# not contain rules. |
|
29 |
# |
|
30 |
||
31 |
# WARNING: This file is shared with other workspaces. |
|
32 |
# So when it includes other files, it must use JDK_TOPDIR. |
|
33 |
# |
|
34 |
||
139 | 35 |
# Check for strange explicit settings (change to empty or true) |
36 |
ifdef OPENJDK |
|
37 |
ifneq ($(OPENJDK),true) |
|
38 |
x:=$(error "OPENJDK (if defined) can only be set to true") |
|
39 |
endif |
|
40 |
endif |
|
41 |
||
2 | 42 |
# |
43 |
# On Solaris, the 'make' utility from Sun will not work with these makefiles. |
|
44 |
# This little rule is only understood by Sun's make, and is harmless |
|
45 |
# when seen by the GNU make tool. If using Sun's make, this causes the |
|
46 |
# make command to fail. |
|
47 |
# |
|
48 |
SUN_MAKE_TEST:sh = echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33 |
|
49 |
||
50 |
ifndef JDK_TOPDIR |
|
32
d190436d5b3e
6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents:
30
diff
changeset
|
51 |
ifdef BUILDDIR |
d190436d5b3e
6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents:
30
diff
changeset
|
52 |
JDK_TOPDIR=$(BUILDDIR)/.. |
d190436d5b3e
6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents:
30
diff
changeset
|
53 |
else |
d190436d5b3e
6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents:
30
diff
changeset
|
54 |
JDK_TOPDIR:=$(error "ERROR: Cannot define top of jdk repository") |
d190436d5b3e
6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents:
30
diff
changeset
|
55 |
endif |
d190436d5b3e
6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents:
30
diff
changeset
|
56 |
endif |
d190436d5b3e
6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents:
30
diff
changeset
|
57 |
ifndef BUILDDIR |
d190436d5b3e
6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents:
30
diff
changeset
|
58 |
# Hack, due to deploy repository using this file. |
d190436d5b3e
6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents:
30
diff
changeset
|
59 |
BUILDDIR=$(JDK_TOPDIR)/make |
2 | 60 |
endif |
61 |
ifndef JDK_MAKE_SHARED_DIR |
|
62 |
JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared |
|
63 |
endif |
|
64 |
||
65 |
include $(JDK_MAKE_SHARED_DIR)/Platform.gmk |
|
66 |
||
67 |
TOPDIR=$(BUILDDIR)/.. |
|
68 |
||
69 |
include $(JDK_TOPDIR)/make/common/CancelImplicits.gmk |
|
70 |
||
71 |
# Historically PLATFORM_SRC used to be src/$(PLATFORM), but we switched it to |
|
72 |
# src/solaris so if you want to build on Linux you didn't need a src/linux |
|
73 |
# directory. In an ideal world it would be called src/genunix but we are not |
|
74 |
# there yet. |
|
75 |
# |
|
76 |
ifndef SHARE_SRC |
|
30
7ea1edf98bfe
6668781: Openjdk windows cygwin build failure: no rule to make linker_md.obj target
ohair
parents:
2
diff
changeset
|
77 |
SHARE_SRC = $(BUILDDIR)/../src/share |
2 | 78 |
endif |
79 |
||
80 |
# Files that cannot be included in the OpenJDK distribution are |
|
81 |
# collected under a parent directory which contains just those files. |
|
82 |
ifndef CLOSED_SRC |
|
30
7ea1edf98bfe
6668781: Openjdk windows cygwin build failure: no rule to make linker_md.obj target
ohair
parents:
2
diff
changeset
|
83 |
CLOSED_SRC = $(BUILDDIR)/../src/closed |
2 | 84 |
endif |
85 |
||
86 |
# If we have no closed directory, force it to an openjdk build |
|
87 |
CLOSED_SRC_DIR_EXISTS := $(shell \ |
|
88 |
if [ -d $(CLOSED_SRC) ] ; then \ |
|
89 |
echo true; \ |
|
90 |
else \ |
|
91 |
echo false; \ |
|
92 |
fi) |
|
93 |
ifeq ($(CLOSED_SRC_DIR_EXISTS), false) |
|
94 |
OPENJDK = true |
|
95 |
endif |
|
96 |
||
97 |
# Define where closed directories are |
|
98 |
ifdef OPENJDK |
|
99 |
CLOSED_SRC = |
|
100 |
CLOSED_SHARE_SRC = |
|
101 |
else |
|
102 |
ifndef CLOSED_SHARE_SRC |
|
103 |
CLOSED_SHARE_SRC = $(CLOSED_SRC)/share |
|
104 |
endif |
|
105 |
endif |
|
106 |
||
107 |
# If OPENJDK is defined, we may still need to use some native libraries that |
|
108 |
# exist only as part of the closed source. If the closed sources are not |
|
109 |
# available, the libraries must have been pre-built. Since these libraries |
|
110 |
# and the JDK internal interfaces to these are reasonably stable this is not |
|
111 |
# a significant problem. But we do need to provide a way to locate them, |
|
112 |
# including a way to point to a new one when there have been changes. |
|
113 |
# |
|
114 |
# If you have a formal binary plugs download, set ALT_BINARY_PLUGS_PATH |
|
115 |
# to the location. |
|
116 |
# (Optionally you can set ALT_CLOSED_JDK_IMPORT_PATH to point to the latest |
|
117 |
# build JDK, or last promotion for this JDK version, but will not work |
|
118 |
# on windows). |
|
119 |
# |
|
120 |
# As the OPENJDK is built, the binary plugs are used instead of building the |
|
121 |
# libraries. |
|
122 |
# Individual Makefiles that specify USE_BINARY_PLUG_LIBRARY, will get |
|
123 |
# the binary plug copy (or a copy from a built JDK). |
|
124 |
# |
|
125 |
# See common/internal/BinaryPlugs.gmk for more information. |
|
126 |
# |
|
127 |
# Usage notes: |
|
128 |
# |
|
129 |
# ALT_BINARY_PLUGS_JARFILE is probably rarely needed. It can be used |
|
130 |
# to identify the exact jar file to be used for all closed classes.. |
|
131 |
# |
|
132 |
# ALT_BINARY_PLUGS_PATH points to a directory containing precisely the |
|
133 |
# binaries needed to build. |
|
134 |
# |
|
135 |
# ALT_BUILD_BINARY_PLUGS_PATH points to a directory containing binary plug dirs |
|
136 |
# multiple architectures named using the standard conventions |
|
137 |
# This is useful for build scripts that need to build multiple architectures |
|
138 |
# of the OpenJDK. |
|
139 |
# |
|
140 |
# ALT_CLOSED_JDK_IMPORT_PATH points to the top-level of a specific platform |
|
141 |
# JDK image. |
|
142 |
# |
|
143 |
# The precedence is that |
|
144 |
# 1. ALT_BINARY_PLUGS_JARFILE overrides any other location of the classes |
|
145 |
# 2. ALT_BINARY_PLUGS_PATH overrides all locations of classes and libraries |
|
146 |
# 3. ALT_BUILD_BINARY_PLUGS_PATH is used to find a ALT_BINARY_PLUGS_PATH |
|
147 |
# 4. ALT_CLOSED_JDK_IMPORT_PATH is used to locate classes and libraries |
|
2301 | 148 |
# Note: If any of the ALT_ variables are modified here, it is assumed |
149 |
# that the build should be done with IMPORT_BINARY_PLUGS=true as |
|
150 |
# well. Otherwise the default will be IMPORT_BINARY_PLUGS=false. |
|
151 |
# Lastly, setting IMPORT_BINARY_PLUGS=false on the command line |
|
152 |
# will override this logic, and plugs will not be imported. |
|
2 | 153 |
# |
154 |
||
155 |
# Always needed, defines the name of the imported/exported jarfile |
|
156 |
BINARY_PLUGS_JARNAME = rt-closed.jar |
|
157 |
||
158 |
ifdef OPENJDK |
|
159 |
ifdef ALT_CLOSED_JDK_IMPORT_PATH |
|
160 |
CLOSED_JDK_IMPORT_PATH = $(ALT_CLOSED_JDK_IMPORT_PATH) |
|
161 |
BINARY_PLUGS_PATH = $(CLOSED_JDK_IMPORT_PATH) |
|
162 |
BINARY_PLUGS_JARFILE = $(CLOSED_JDK_IMPORT_PATH)/jre/lib/rt.jar |
|
2301 | 163 |
IMPORT_BINARY_PLUGS=true |
2 | 164 |
endif |
165 |
ifdef ALT_BUILD_BINARY_PLUGS_PATH |
|
166 |
BUILD_BINARY_PLUGS_PATH = $(ALT_BUILD_BINARY_PLUGS_PATH) |
|
2301 | 167 |
IMPORT_BINARY_PLUGS=true |
2 | 168 |
else |
169 |
BUILD_BINARY_PLUGS_PATH = $(SLASH_JAVA)/re/jdk/$(JDK_VERSION)/promoted/latest/openjdk/binaryplugs |
|
170 |
endif |
|
171 |
BINARY_PLUGS_PATH = $(BUILD_BINARY_PLUGS_PATH)/$(PLATFORM)-$(ARCH) |
|
172 |
BINARY_PLUGS_JARFILE = $(BINARY_PLUGS_PATH)/jre/lib/$(BINARY_PLUGS_JARNAME) |
|
173 |
ifdef ALT_BINARY_PLUGS_PATH |
|
174 |
BINARY_PLUGS_PATH = $(ALT_BINARY_PLUGS_PATH) |
|
175 |
BINARY_PLUGS_JARFILE = $(BINARY_PLUGS_PATH)/jre/lib/$(BINARY_PLUGS_JARNAME) |
|
2301 | 176 |
IMPORT_BINARY_PLUGS=true |
2 | 177 |
endif |
178 |
ifdef ALT_BINARY_PLUGS_JARFILE |
|
179 |
BINARY_PLUGS_JARFILE = $(ALT_BINARY_PLUGS_JARFILE) |
|
2301 | 180 |
IMPORT_BINARY_PLUGS=true |
2 | 181 |
endif |
182 |
endif # OPENJDK |
|
183 |
||
184 |
# |
|
185 |
# Get platform definitions |
|
186 |
# |
|
187 |
||
188 |
include $(JDK_TOPDIR)/make/common/Defs-$(PLATFORM).gmk |
|
189 |
||
190 |
# |
|
191 |
# Freetype logic is applicable to OpenJDK only |
|
192 |
# |
|
193 |
ifdef OPENJDK |
|
194 |
||
195 |
#if we use system lib we do not need to copy it to build tree |
|
196 |
USING_SYSTEM_FT_LIB=false |
|
197 |
||
198 |
ifeq ($(PLATFORM), windows) |
|
199 |
DEVTOOLS_FT_DIR=$(JDK_DEVTOOLS_DIR)/win32/freetype-$(ARCH) |
|
200 |
endif |
|
201 |
ifeq ($(PLATFORM), linux) |
|
202 |
DEVTOOLS_FT_DIR=$(JDK_DEVTOOLS_DIR)/$(PLATFORM)/freetype-$(ARCH) |
|
203 |
endif |
|
204 |
ifeq ($(PLATFORM), solaris) |
|
205 |
# historically for Solaris we have slightly different devtools |
|
206 |
# naming conventions |
|
207 |
DEVTOOLS_FT_DIR=$(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/freetype-$(ARCH) |
|
208 |
endif |
|
209 |
||
210 |
DEVTOOLS_FT_DIR_EXISTS = $(shell \ |
|
211 |
if [ -f $(DEVTOOLS_FT_DIR)/include/ft2build.h ] ; then \ |
|
212 |
echo true; \ |
|
213 |
else \ |
|
214 |
echo false; \ |
|
215 |
fi) |
|
216 |
||
217 |
ifdef ALT_FREETYPE_LIB_PATH |
|
218 |
FREETYPE_LIB_PATH = $(ALT_FREETYPE_LIB_PATH) |
|
219 |
else |
|
220 |
ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true) |
|
221 |
FREETYPE_LIB_PATH = $(DEVTOOLS_FT_DIR)/lib |
|
222 |
else |
|
223 |
FREETYPE_LIB_PATH = /usr/lib |
|
224 |
USING_SYSTEM_FT_LIB=true |
|
225 |
endif |
|
226 |
endif |
|
227 |
||
228 |
ifdef ALT_FREETYPE_HEADERS_PATH |
|
229 |
FREETYPE_HEADERS_PATH = $(ALT_FREETYPE_HEADERS_PATH) |
|
230 |
else |
|
231 |
ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true) |
|
232 |
FREETYPE_HEADERS_PATH = $(DEVTOOLS_FT_DIR)/include |
|
233 |
else |
|
234 |
FREETYPE_HEADERS_PATH = /usr/include |
|
235 |
endif |
|
236 |
endif |
|
237 |
endif |
|
238 |
||
239 |
# |
|
3704
bd98409d8c32
4963968: zlib should be upgraded to current version of zlib
sherman
parents:
2301
diff
changeset
|
240 |
# zlib version |
bd98409d8c32
4963968: zlib should be upgraded to current version of zlib
sherman
parents:
2301
diff
changeset
|
241 |
# |
bd98409d8c32
4963968: zlib should be upgraded to current version of zlib
sherman
parents:
2301
diff
changeset
|
242 |
ZLIB_VERSION = 1.2.3 |
bd98409d8c32
4963968: zlib should be upgraded to current version of zlib
sherman
parents:
2301
diff
changeset
|
243 |
|
bd98409d8c32
4963968: zlib should be upgraded to current version of zlib
sherman
parents:
2301
diff
changeset
|
244 |
|
bd98409d8c32
4963968: zlib should be upgraded to current version of zlib
sherman
parents:
2301
diff
changeset
|
245 |
# |
2 | 246 |
# Localizations for the different parts of the product beyond English |
247 |
# |
|
248 |
||
249 |
JRE_LOCALES = de es fr it ja ko sv zh_CN zh_TW zh_HK |
|
250 |
PLUGIN_LOCALES = de es fr it ja ko sv zh_CN zh_TW zh_HK |
|
251 |
JDK_LOCALES = ja zh_CN |
|
252 |
||
253 |
# |
|
254 |
# A list of locales we support but don't have resource files. |
|
255 |
# This is defined to optimize the search of resource bundles. |
|
256 |
# |
|
257 |
JRE_NONEXIST_LOCALES = en en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh |
|
258 |
||
259 |
# |
|
260 |
# All libraries except libjava and libjvm itself link against libjvm and |
|
261 |
# libjava, the latter for its exported common utilities. libjava only links |
|
262 |
# against libjvm. Programs' makefiles take their own responsibility for |
|
263 |
# adding other libs. |
|
264 |
# |
|
265 |
ifdef PACKAGE |
|
266 |
# put JAVALIB first, but do not lose any platform specific values.... |
|
267 |
LDLIBS_COMMON = $(JAVALIB) |
|
268 |
endif # PACKAGE |
|
269 |
||
270 |
# |
|
271 |
# Libraries that must appear ahead of libc.so on the link command line |
|
272 |
# |
|
273 |
ifdef PROGRAM |
|
274 |
||
275 |
ifeq ($(PLATFORM), solaris) |
|
276 |
LDLIBS_COMMON = -lthread -ldl |
|
277 |
endif |
|
278 |
||
279 |
ifeq ($(PLATFORM), linux) |
|
280 |
LDLIBS_COMMON = -ldl |
|
281 |
endif |
|
282 |
||
283 |
endif # PROGRAM |
|
284 |
||
285 |
LDLIBS_COMMON += $(EXTRA_LIBS) |
|
286 |
||
287 |
# |
|
288 |
# Default is to build, not import native binaries |
|
289 |
# |
|
290 |
ifndef IMPORT_NATIVE_BINARIES |
|
291 |
IMPORT_NATIVE_BINARIES=false |
|
292 |
endif |
|
293 |
# If importing libraries in, no incremental builds |
|
294 |
ifeq ($(IMPORT_NATIVE_BINARIES),true) |
|
295 |
INCREMENTAL_BUILD=false |
|
296 |
endif |
|
297 |
||
298 |
# for generated libraries |
|
299 |
LIBDIR = $(OUTPUTDIR)/lib |
|
300 |
ABS_LIBDIR = $(ABS_OUTPUTDIR)/lib |
|
301 |
# Optional place to save the windows .lib files |
|
302 |
LIBFILES_DIR = $(OUTPUTDIR)/libfiles |
|
303 |
# for ext jre files |
|
304 |
EXTDIR = $(LIBDIR)/ext |
|
305 |
# for generated include files |
|
306 |
INCLUDEDIR = $(OUTPUTDIR)/include |
|
307 |
# for generated class files |
|
308 |
CLASSBINDIR = $(OUTPUTDIR)/classes |
|
309 |
DEMOCLASSDIR = $(OUTPUTDIR)/democlasses |
|
4681
7d382dfe6e55
6916217: make/modules/Makefile requires ALT_JDK_IMPORT_PATH
mchung
parents:
4665
diff
changeset
|
310 |
# for modules |
7d382dfe6e55
6916217: make/modules/Makefile requires ALT_JDK_IMPORT_PATH
mchung
parents:
4665
diff
changeset
|
311 |
MODULES_DIR = $(OUTPUTDIR)/modules |
7d382dfe6e55
6916217: make/modules/Makefile requires ALT_JDK_IMPORT_PATH
mchung
parents:
4665
diff
changeset
|
312 |
ABS_MODULES_DIR = $(ABS_OUTPUTDIR)/modules |
2 | 313 |
# for generated tool class files |
314 |
BUILDTOOLCLASSDIR = $(OUTPUTDIR)/btclasses |
|
315 |
# for build tool jar files |
|
316 |
BUILDTOOLJARDIR = $(OUTPUTDIR)/btjars |
|
317 |
ABS_BUILDTOOLJARDIR = $(ABS_OUTPUTDIR)/btjars |
|
305
9b905a071b0e
6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents:
139
diff
changeset
|
318 |
# for generated tool class files |
9b905a071b0e
6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents:
139
diff
changeset
|
319 |
BUILDTOOLBINDIR = $(OUTPUTDIR)/btbins |
2 | 320 |
# for generated java source files |
321 |
GENSRCDIR = $(OUTPUTDIR)/gensrc |
|
322 |
# for generated C source files (not javah) |
|
323 |
GENNATIVESRCDIR = $(OUTPUTDIR)/gennativesrc |
|
324 |
# for imported source files |
|
325 |
IMPORTSRCDIR = $(OUTPUTDIR)/impsrc |
|
326 |
# for imported documents |
|
327 |
IMPORTDOCDIR = $(OUTPUTDIR)/impdoc |
|
328 |
# for generated demo |
|
329 |
DEMODIR = $(OUTPUTDIR)/demo |
|
330 |
# for sample code |
|
331 |
SAMPLEDIR = $(OUTPUTDIR)/sample |
|
332 |
# for generated documentation |
|
333 |
DOCSDIR = $(OUTPUTDIR)/docs$(DOCSDIRSUFFIX) |
|
334 |
DOCSDIRSUFFIX = |
|
335 |
||
336 |
# The MESSAGE, WARNING and ERROR files are used to store sanityck and |
|
6681
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
337 |
# warnings and errors. |
2 | 338 |
ifndef ERROR_FILE |
339 |
ERROR_FILE = $(OUTPUTDIR)/sanityCheckErrors.txt |
|
340 |
endif |
|
341 |
ifndef WARNING_FILE |
|
342 |
WARNING_FILE = $(OUTPUTDIR)/sanityCheckWarnings.txt |
|
343 |
endif |
|
344 |
ifndef MESSAGE_FILE |
|
345 |
MESSAGE_FILE = $(OUTPUTDIR)/sanityCheckMessages.txt |
|
346 |
endif |
|
347 |
||
348 |
JDK_IMAGE_DIR = $(ABS_OUTPUTDIR)/j2sdk-image |
|
349 |
JRE_IMAGE_DIR = $(ABS_OUTPUTDIR)/j2re-image |
|
350 |
||
351 |
#where the demo source can be found |
|
352 |
DEMOSRCDIR = $(SHARE_SRC)/demo |
|
353 |
||
354 |
# An attempt is made to generate unique enough directories for the |
|
355 |
# generated files to not have name collisisons. Most build units |
|
356 |
# defines PRODUCT (except Release.gmk), but then they may or may |
|
357 |
# not define PACKAGE, THREADIR (only HPI uses this), PROGRAM, and |
|
358 |
# LIBRARY. This code chunk attempts to generate a unique |
|
359 |
# OBJDIR/CLASSHDRDIR for each build unit based on which of those |
|
360 |
# values are set within each build unit. |
|
361 |
||
362 |
UNIQUE_LOCATION_STRING = tmp |
|
363 |
||
364 |
ifneq ($(PRODUCT),) |
|
365 |
UNIQUE_LOCATION_STRING += /$(PRODUCT) |
|
366 |
endif |
|
367 |
||
368 |
ifneq ($(PACKAGE),) |
|
369 |
UNIQUE_LOCATION_STRING += /$(PACKAGE) |
|
370 |
endif |
|
371 |
||
372 |
ifneq ($(PROGRAM),) |
|
373 |
UNIQUE_LOCATION_STRING += /$(PROGRAM) |
|
374 |
endif |
|
375 |
||
376 |
ifneq ($(LIBRARY),) |
|
377 |
ifneq ($(LIBRARY_OUTPUT),) |
|
378 |
UNIQUE_LOCATION_STRING += /$(LIBRARY_OUTPUT) |
|
379 |
else |
|
380 |
UNIQUE_LOCATION_STRING += /$(LIBRARY) |
|
381 |
endif |
|
382 |
endif |
|
383 |
||
384 |
ifneq ($(THREADDIR),) |
|
385 |
UNIQUE_LOCATION_STRING += /$(THREADDIR) |
|
386 |
endif |
|
387 |
||
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
388 |
# |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
389 |
# Build units may or may not define MODULE. Default to "other". |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
390 |
# |
4681
7d382dfe6e55
6916217: make/modules/Makefile requires ALT_JDK_IMPORT_PATH
mchung
parents:
4665
diff
changeset
|
391 |
# MODULE variable defines the lowest-level module name that |
7d382dfe6e55
6916217: make/modules/Makefile requires ALT_JDK_IMPORT_PATH
mchung
parents:
4665
diff
changeset
|
392 |
# might or might not be the name of the modules created in |
7d382dfe6e55
6916217: make/modules/Makefile requires ALT_JDK_IMPORT_PATH
mchung
parents:
4665
diff
changeset
|
393 |
# the modules build (see make/modules/modules.config and |
7d382dfe6e55
6916217: make/modules/Makefile requires ALT_JDK_IMPORT_PATH
mchung
parents:
4665
diff
changeset
|
394 |
# modules.group). |
7d382dfe6e55
6916217: make/modules/Makefile requires ALT_JDK_IMPORT_PATH
mchung
parents:
4665
diff
changeset
|
395 |
# |
7d382dfe6e55
6916217: make/modules/Makefile requires ALT_JDK_IMPORT_PATH
mchung
parents:
4665
diff
changeset
|
396 |
MODULES_TEMPDIR = $(OUTPUTDIR)/tmp/modules |
7d382dfe6e55
6916217: make/modules/Makefile requires ALT_JDK_IMPORT_PATH
mchung
parents:
4665
diff
changeset
|
397 |
ABS_MODULES_TEMPDIR = $(ABS_OUTPUTDIR)/tmp/modules |
7d382dfe6e55
6916217: make/modules/Makefile requires ALT_JDK_IMPORT_PATH
mchung
parents:
4665
diff
changeset
|
398 |
|
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
399 |
ifndef MODULE |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
400 |
MODULE = other |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
401 |
endif |
4681
7d382dfe6e55
6916217: make/modules/Makefile requires ALT_JDK_IMPORT_PATH
mchung
parents:
4665
diff
changeset
|
402 |
override MODULE_DEST_DIR = $(MODULES_TEMPDIR)/$(MODULE) |
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
403 |
|
2 | 404 |
# the use of += above makes a space separated list which we need to |
405 |
# remove for filespecs. |
|
406 |
# |
|
407 |
NULLSTRING := |
|
408 |
ONESPACE := $(NULLSTRING) # space before this comment is required. |
|
409 |
UNIQUE_PATH = $(subst $(ONESPACE),,$(UNIQUE_LOCATION_STRING)) |
|
410 |
||
411 |
# TEMPDIR is a unique general purpose directory |
|
412 |
# need to use 'override' because GNU Make on Linux exports the wrong |
|
413 |
# value. |
|
414 |
override TEMPDIR = $(OUTPUTDIR)/$(UNIQUE_PATH) |
|
415 |
override ABS_TEMPDIR = $(ABS_OUTPUTDIR)/$(UNIQUE_PATH) |
|
416 |
||
417 |
# This must be created right away for pattern rules in Sanity.gmk to work. |
|
418 |
dummy1:=$(shell $(MKDIR) -p $(TEMPDIR)) |
|
419 |
dummy2:=$(shell $(MKDIR) -p $(TEMP_DISK)) |
|
420 |
||
421 |
# OBJDIRNAME is the name of the directory where the object code is to |
|
422 |
# be placed. It's name depends on whether the data model architecture |
|
423 |
# is 32-bit or not. |
|
424 |
ifneq ($(ARCH_DATA_MODEL), 32) |
|
425 |
OBJDIRNAME = obj$(ARCH_DATA_MODEL)$(OBJDIRNAME_SUFFIX) |
|
426 |
else |
|
427 |
OBJDIRNAME = obj$(OBJDIRNAME_SUFFIX) |
|
428 |
endif |
|
429 |
OBJDIR = $(TEMPDIR)/$(OBJDIRNAME) |
|
430 |
||
431 |
# CLASSHDRDIR is where the generated C Class Header files go. |
|
432 |
CLASSHDRDIR = $(TEMPDIR)/CClassHeaders |
|
433 |
||
434 |
# |
|
435 |
# CLASSDESTDIR can be used to specify the directory where generated classes |
|
436 |
# are to be placed. The default is CLASSBINDIR. |
|
437 |
# |
|
438 |
ifndef CLASSDESTDIR |
|
439 |
CLASSDESTDIR = $(CLASSBINDIR) |
|
440 |
endif |
|
441 |
||
442 |
INCLUDES = -I. -I$(CLASSHDRDIR) \ |
|
443 |
$(patsubst %,-I%,$(subst $(CLASSPATH_SEPARATOR), ,$(VPATH.h))) $(OTHER_INCLUDES) |
|
444 |
OTHER_CPPFLAGS = $(INCLUDES) |
|
445 |
||
446 |
||
447 |
# |
|
448 |
# vpaths. These are the default locations searched for source files. |
|
449 |
# GNUmakefiles of individual areas often override the default settings. |
|
450 |
# There are no longer default vpath entries for C and assembler files |
|
451 |
# so we can ensure that libraries don't get their hands on JVM files. |
|
452 |
# |
|
453 |
# We define an intermediate variable for Java files because |
|
454 |
# we use its value later to help define $SOURCEPATH |
|
455 |
||
456 |
VPATH0.java = $(GENSRCDIR)$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/classes$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/classes |
|
457 |
ifdef OPENJDK |
|
458 |
VPATH.java = $(VPATH0.java) |
|
459 |
else |
|
460 |
# |
|
461 |
# If filenames are duplicated between open/closed workspaces, prefer |
|
462 |
# the closed files. |
|
463 |
# |
|
464 |
# Source ordering is important: some targets depend on closed files |
|
465 |
# replacing open ones, and thus the closed file sources must be found |
|
466 |
# before the open ones. |
|
467 |
# |
|
468 |
# Don't reorder without consulting the teams that depend on this behavior. |
|
469 |
# |
|
470 |
VPATH.java = $(CLOSED_PLATFORM_SRC)/classes$(CLASSPATH_SEPARATOR)$(CLOSED_SHARE_SRC)/classes$(CLASSPATH_SEPARATOR)$(VPATH0.java) |
|
471 |
endif |
|
472 |
vpath %.java $(VPATH.java) |
|
473 |
vpath %.class $(CLASSBINDIR) |
|
474 |
vpath %.$(OBJECT_SUFFIX) $(OBJDIR) |
|
475 |
||
476 |
# |
|
477 |
# VPATH.h is used elsewhere to generate include flags. By default, |
|
478 |
# anyone has access to the include files that the JVM area exports, |
|
479 |
# namely jni.h, jvm.h, and jni_utils.h, plus their platform-specific |
|
480 |
# relatives. |
|
481 |
# |
|
1090
c5805b1672a6
6732421: Removed old javavm and Classic VM files from the jdk7 sources
ohair
parents:
919
diff
changeset
|
482 |
VPATH.h = $(PLATFORM_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/javavm/export |
2 | 483 |
vpath %.h $(VPATH.h) |
484 |
||
485 |
# |
|
486 |
# Used in two ways: helps link against libjava.so. Also if overridden |
|
487 |
# determines where your shared library is installed. |
|
488 |
# |
|
489 |
ifndef LIB_LOCATION |
|
490 |
LIB_LOCATION = $(LIBDIR)/$(LIBARCH) |
|
491 |
endif |
|
492 |
||
493 |
# |
|
494 |
# Java header and stub variables |
|
495 |
# |
|
496 |
CLASSHDRS = $(patsubst %,$(CLASSHDRDIR)/%.h,$(subst .,_,$(CLASSES.export))) |
|
497 |
CLASSSTUBOBJS = classstubs.$(OBJECT_SUFFIX) |
|
498 |
STUBPREAMBLE = $(INCLUDEDIR)/StubPreamble.h |
|
499 |
||
500 |
# |
|
501 |
# Classpath seen by javac (different from the one seen by the VM |
|
502 |
# running javac), and useful variables. |
|
503 |
# |
|
504 |
SOURCEPATH = $(VPATH.java) |
|
505 |
PKG = $(shell $(EXPR) $(PACKAGE) : '\([a-z]*\)') |
|
506 |
PKGDIR = $(subst .,/,$(PACKAGE)) |
|
507 |
||
508 |
# |
|
509 |
# The java/javac/jdk variables (JAVAC_CMD, JAVA_CMD, etc.) |
|
510 |
# |
|
511 |
include $(JDK_MAKE_SHARED_DIR)/Defs-java.gmk |
|
512 |
||
513 |
# |
|
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
514 |
# Macros to find the module that $@ belongs to |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
515 |
# |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
516 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
517 |
UNIQUE_PATH_PATTERN = $(subst /,.,$(UNIQUE_PATH)) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
518 |
MODULE_PATH_PATTERN = -e 's%.*\/classes\/%classes\/%' \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
519 |
-e 's%.*\/$(UNIQUE_PATH_PATTERN)\/%classes\/%' \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
520 |
-e 's%.*\/lib\/%lib\/%' \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
521 |
-e 's%.*\/bin\/%bin\/%' \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
522 |
-e 's%.*\/include\/%include\/%' \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
523 |
-e 's%.*\/demo\/%demo\/%' \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
524 |
-e 's%.*\/sample\/%sample\/%' |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
525 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
526 |
# Install a file to its module |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
527 |
define install-module-file |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
528 |
dest=`echo $(@D)/ | $(SED) $(MODULE_PATH_PATTERN)` ; \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
529 |
$(MKDIR) -p $(MODULE_DEST_DIR)/$$dest; \ |
4681
7d382dfe6e55
6916217: make/modules/Makefile requires ALT_JDK_IMPORT_PATH
mchung
parents:
4665
diff
changeset
|
530 |
$(CP) -f $@ $(MODULE_DEST_DIR)/$$dest |
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
531 |
endef |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
532 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
533 |
# Install all files from the directory to its module |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
534 |
define install-module-dir |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
535 |
dest=`echo $(@D)/ | $(SED) $(MODULE_PATH_PATTERN)` ; \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
536 |
$(MKDIR) -p $(MODULE_DEST_DIR)/$$dest; \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
537 |
$(CP) -rf $(@D)/* $(MODULE_DEST_DIR)/$$dest |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
538 |
endef |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
539 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
540 |
# chmod the file in its module |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
541 |
define chmod-module-file |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
542 |
dest=`echo $@ | $(SED) $(MODULE_PATH_PATTERN)` ; \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
543 |
$(CHMOD) $1 $(MODULE_DEST_DIR)/$$dest |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
544 |
endef |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
545 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
546 |
# install a sym link in its module |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
547 |
define install-module-sym-link |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
548 |
dest=`echo $@ | $(SED) $(MODULE_PATH_PATTERN)` ; \ |
4681
7d382dfe6e55
6916217: make/modules/Makefile requires ALT_JDK_IMPORT_PATH
mchung
parents:
4665
diff
changeset
|
549 |
$(LN) -sf $1 $(MODULE_DEST_DIR)/$$dest |
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
550 |
endef |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
551 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
552 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
553 |
# Run MAKE $@ for a launcher: |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
554 |
# $(call make-launcher, name, mainclass, java-args, main-args) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
555 |
define make-launcher |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
556 |
$(CD) $(BUILDDIR)/launchers && \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
557 |
$(MAKE) -f Makefile.launcher \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
558 |
MODULE=$(MODULE) \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
559 |
PROGRAM=$(strip $1) \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
560 |
MAIN_CLASS=$(strip $2) \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
561 |
MAIN_JAVA_ARGS="$(strip $3)" \ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
562 |
MAIN_ARGS="$(strip $4)" |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
563 |
endef |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
564 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
565 |
# |
2 | 566 |
# Convenient macros |
567 |
# |
|
568 |
||
569 |
# Prepare $@ target, remove old one and making sure directory exists |
|
570 |
define prep-target |
|
571 |
$(MKDIR) -p $(@D) |
|
572 |
$(RM) $@ |
|
573 |
endef |
|
574 |
||
575 |
# Simple install of $< file to $@ |
|
576 |
define install-file |
|
577 |
$(prep-target) |
|
578 |
$(CP) $< $@ |
|
4917
c98da2209f8c
6915413: Module build: building of specified jdk components instead of all
mchung
parents:
4681
diff
changeset
|
579 |
@$(install-module-file) |
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
580 |
endef |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
581 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
582 |
define chmod-file |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
583 |
$(CHMOD) $1 $@ |
4917
c98da2209f8c
6915413: Module build: building of specified jdk components instead of all
mchung
parents:
4681
diff
changeset
|
584 |
@$(call chmod-module-file, $1) |
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
585 |
endef |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
586 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
587 |
define install-sym-link |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
588 |
$(LN) -s $1 $@ |
4917
c98da2209f8c
6915413: Module build: building of specified jdk components instead of all
mchung
parents:
4681
diff
changeset
|
589 |
@$(call install-module-sym-link, $1) |
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
590 |
endef |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
591 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
592 |
# |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
593 |
# Marcos for files not belonging to any module |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
594 |
define install-non-module-file |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
595 |
$(prep-target) |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
596 |
$(CP) $< $@ |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
597 |
endef |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
598 |
|
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
599 |
define install-manifest-file |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
600 |
$(install-non-module-file) |
2 | 601 |
endef |
602 |
||
603 |
# Cleanup rule for after debug java run (hotspot.log file is left around) |
|
604 |
# (This could be an old leftover file in a read-only area, use the @- prefix) |
|
605 |
HOTSPOT_LOG_NAME = hotspot.log |
|
606 |
define java-vm-cleanup |
|
607 |
if [ -w $(HOTSPOT_LOG_NAME) ] ; then $(RM) $(HOTSPOT_LOG_NAME); fi |
|
608 |
endef |
|
609 |
||
610 |
# Current directory |
|
611 |
CURRENT_DIRECTORY := $(shell $(PWD)) |
|
612 |
||
613 |
# |
|
614 |
# Create BYFILE OPT and DBG settings, if CFLAGS_OPT/foobar.o is set then it is |
|
615 |
# used for this file, otherwise the default settings are used. |
|
616 |
# |
|
617 |
CFLAGS_$(VARIANT)/BYFILE = $(CFLAGS_$(VARIANT)/$(@F)) \ |
|
618 |
$(CFLAGS_$(VARIANT)$(CFLAGS_$(VARIANT)/$(@F))) |
|
619 |
CXXFLAGS_$(VARIANT)/BYFILE = $(CXXFLAGS_$(VARIANT)/$(@F)) \ |
|
620 |
$(CXXFLAGS_$(VARIANT)$(CXXFLAGS_$(VARIANT)/$(@F))) |
|
621 |
||
622 |
# |
|
623 |
# Tool flags |
|
624 |
# |
|
625 |
ASFLAGS = $(ASFLAGS_$(VARIANT)) $(ASFLAGS_COMMON) $(OTHER_ASFLAGS) |
|
626 |
CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS) |
|
627 |
CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS) |
|
628 |
CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) \ |
|
629 |
$(DEFINES) $(OPTIONS:%=-D%) |
|
630 |
LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS) |
|
631 |
LDLIBS = $(OTHER_LDLIBS) $(LDLIBS_$(VARIANT)) $(LDLIBS_COMMON) |
|
632 |
LINTFLAGS = $(LINTFLAGS_$(VARIANT)) $(LINTFLAGS_COMMON) \ |
|
633 |
$(OTHER_LINTFLAGS) |
|
634 |
||
4116
54b55d640d9a
6888709: Change use of -DX=\""Y\"" to -DX='"Y"', consistently for all platforms
ohair
parents:
3704
diff
changeset
|
635 |
VERSION_DEFINES = -DRELEASE='"$(RELEASE)"' |
2 | 636 |
|
637 |
ifdef INSANE |
|
638 |
export INSANE |
|
639 |
endif |
|
640 |
||
641 |
ifdef ALT_COPYRIGHT_YEAR |
|
642 |
COPYRIGHT_YEAR = $(ALT_COPYRIGHT_YEAR) |
|
643 |
else |
|
847 | 644 |
COPYRIGHT_YEAR := $(shell $(DATE) '+%Y') |
2 | 645 |
endif |
646 |
||
647 |
# Install of imported file (JDK_IMPORT_PATH, or some other external location) |
|
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
648 |
define install-importonly-file |
2 | 649 |
@$(ECHO) "ASSEMBLY_IMPORT: $@" |
1164
fcf7f66faf68
6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents:
919
diff
changeset
|
650 |
$(prep-target) |
fcf7f66faf68
6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents:
919
diff
changeset
|
651 |
$(CP) $< $@ |
fcf7f66faf68
6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents:
919
diff
changeset
|
652 |
@if [ "$(PLATFORM)" = "linux" -a "$(@F)" = "libjvm.so" ] ; then \ |
fcf7f66faf68
6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents:
919
diff
changeset
|
653 |
if [ -x /usr/sbin/selinuxenabled ] ; then \ |
fcf7f66faf68
6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents:
919
diff
changeset
|
654 |
/usr/sbin/selinuxenabled; \ |
fcf7f66faf68
6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents:
919
diff
changeset
|
655 |
if [ $$? = 0 ] ; then \ |
fcf7f66faf68
6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents:
919
diff
changeset
|
656 |
$(ECHO) "/usr/bin/chcon -t textrel_shlib_t $@"; \ |
fcf7f66faf68
6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents:
919
diff
changeset
|
657 |
/usr/bin/chcon -t textrel_shlib_t $@; \ |
fcf7f66faf68
6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents:
919
diff
changeset
|
658 |
if [ $$? != 0 ]; then \ |
fcf7f66faf68
6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents:
919
diff
changeset
|
659 |
echo "ERROR: Cannot chcon $@"; \ |
fcf7f66faf68
6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents:
919
diff
changeset
|
660 |
fi; \ |
fcf7f66faf68
6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents:
919
diff
changeset
|
661 |
fi; \ |
fcf7f66faf68
6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents:
919
diff
changeset
|
662 |
fi; \ |
fcf7f66faf68
6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents:
919
diff
changeset
|
663 |
fi |
2 | 664 |
endef |
665 |
||
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
666 |
define install-import-file |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
667 |
$(install-importonly-file) |
4917
c98da2209f8c
6915413: Module build: building of specified jdk components instead of all
mchung
parents:
4681
diff
changeset
|
668 |
@$(install-module-file) |
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
669 |
endef |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
4116
diff
changeset
|
670 |
|
2 | 671 |
.PHONY: all build clean clobber |