author | erikj |
Tue, 14 Jan 2014 12:05:46 +0100 | |
changeset 22272 | 4cbb04a368cb |
parent 21820 | 701e0b95a267 |
child 22607 | ba232b417248 |
permissions | -rw-r--r-- |
14231 | 1 |
# |
2 |
# Copyright (c) 2011, 2012, 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 |
||
20203
2e0b3aab117a
8019219: Fix typo in jdk/makefiles "default" targets
ihse
parents:
19399
diff
changeset
|
26 |
default: all |
14231 | 27 |
|
28 |
include $(SPEC) |
|
29 |
include MakeBase.gmk |
|
30 |
include NativeCompilation.gmk |
|
31 |
||
32 |
# Setup the java compilers for the JDK build. |
|
33 |
include Setup.gmk |
|
34 |
||
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14523
diff
changeset
|
35 |
# Prepare the find cache. Only used on windows. |
20547 | 36 |
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src/share/bin)) |
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14523
diff
changeset
|
37 |
|
14231 | 38 |
# Build tools |
39 |
include Tools.gmk |
|
40 |
||
20547 | 41 |
BUILD_LAUNCHERS = |
14231 | 42 |
|
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
43 |
# When building a legacy overlay image (on solaris 64 bit), the launchers |
14231 | 44 |
# need to be built with a different rpath and a different output dir. |
20547 | 45 |
ifeq ($(OVERLAY_IMAGES), true) |
46 |
ORIGIN_ROOT := /../.. |
|
47 |
OUTPUT_SUBDIR := $(OPENJDK_TARGET_CPU_ISADIR) |
|
14231 | 48 |
else |
20547 | 49 |
ORIGIN_ROOT := /.. |
14231 | 50 |
endif |
51 |
||
52 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
20547 | 53 |
ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN) |
14231 | 54 |
else |
20884 | 55 |
ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli) |
14231 | 56 |
endif |
57 |
||
58 |
# |
|
59 |
# Applications expect to be able to link against libjawt without invoking |
|
60 |
# System.loadLibrary("jawt") first. This was the behaviour described in the |
|
61 |
# devloper documentation of JAWT and what worked with OpenJDK6. |
|
62 |
# |
|
20547 | 63 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris), ) |
20884 | 64 |
ORIGIN_ARG += $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)) |
14231 | 65 |
endif |
66 |
||
67 |
define SetupLauncher |
|
20547 | 68 |
# TODO: Fix mapfile on solaris. Won't work with ld as linker. |
69 |
# Parameter 1 is the name of the launcher (java, javac, jar...) |
|
70 |
# Parameter 2 is extra CFLAGS |
|
71 |
# Parameter 3 is extra LDFLAGS |
|
72 |
# Parameter 4 is extra LDFLAGS_SUFFIX_posix |
|
73 |
# Parameter 5 is extra LDFLAGS_SUFFIX_windows |
|
74 |
# Parameter 6 is optional Windows JLI library (full path) |
|
75 |
# Parameter 7 is optional Windows resource (RC) flags |
|
76 |
# Parameter 8 is optional Windows version resource file (.rc) |
|
77 |
# Parameter 9 is different output dir |
|
78 |
# Parameter 10 if set, link statically with c runtime on windows. |
|
79 |
# Parameter 11 if set, override plist file on macosx. |
|
14231 | 80 |
|
20547 | 81 |
$1_WINDOWS_JLI_LIB := $(JDK_OUTPUTDIR)/objs/libjli/jli.lib |
82 |
ifneq ($6, ) |
|
83 |
$1_WINDOWS_JLI_LIB := $6 |
|
84 |
endif |
|
85 |
$1_VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc |
|
86 |
ifneq ($8, ) |
|
87 |
$1_VERSION_INFO_RESOURCE := $8 |
|
88 |
endif |
|
14231 | 89 |
|
20547 | 90 |
$1_LDFLAGS := $3 |
91 |
$1_LDFLAGS_SUFFIX := |
|
92 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
93 |
$1_PLIST_FILE := Info-cmdline.plist |
|
94 |
ifneq ($(11), ) |
|
95 |
$1_PLIST_FILE := $(11) |
|
96 |
ifneq ($$(findstring privileged, $$($1_PLIST_FILE)), ) |
|
97 |
$1_CODESIGN := true |
|
98 |
endif |
|
14231 | 99 |
endif |
100 |
||
20547 | 101 |
$1_LDFLAGS += -Wl,-all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \ |
102 |
-framework Cocoa -framework Security -framework ApplicationServices \ |
|
103 |
-sectcreate __TEXT __info_plist $(JDK_TOPDIR)/src/macosx/lib/$$($1_PLIST_FILE) |
|
104 |
$1_LDFLAGS_SUFFIX += -pthread |
|
105 |
endif |
|
106 |
||
107 |
ifeq ($(USE_EXTERNAL_LIBZ), true) |
|
108 |
$1_LDFLAGS_SUFFIX += -lz |
|
109 |
endif |
|
110 |
||
111 |
$1_OUTPUT_DIR_ARG := $9 |
|
112 |
ifeq (, $$($1_OUTPUT_DIR_ARG)) |
|
113 |
$1_OUTPUT_DIR_ARG := $(JDK_OUTPUTDIR)/bin |
|
114 |
endif |
|
115 |
||
116 |
# TODO: maybe it's better to move this if-statement out of this function |
|
117 |
ifeq ($1, java) |
|
118 |
$1_OPTIMIZATION_ARG := HIGH |
|
119 |
$1_LDFLAGS_solaris := -R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR) |
|
120 |
else |
|
121 |
$1_OPTIMIZATION_ARG := LOW |
|
122 |
endif |
|
123 |
||
124 |
$1_CFLAGS := $(CFLAGS_JDKEXE) |
|
125 |
ifeq ($(10), true) |
|
126 |
$1_CFLAGS := $(filter-out -MD, $(CFLAGS_JDKEXE)) |
|
127 |
endif |
|
128 |
||
21805 | 129 |
ifneq ($(wildcard $(JDK_TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)), ) |
130 |
$1_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU) |
|
20547 | 131 |
else |
132 |
$1_MAPFILE := |
|
133 |
endif |
|
14231 | 134 |
|
20547 | 135 |
$(call SetupNativeCompilation,BUILD_LAUNCHER_$1, \ |
136 |
SRC := $(JDK_TOPDIR)/src/share/bin, \ |
|
137 |
INCLUDE_FILES := main.c, \ |
|
138 |
LANG := C, \ |
|
139 |
OPTIMIZATION := $$($1_OPTIMIZATION_ARG), \ |
|
140 |
CFLAGS := $$($1_CFLAGS) \ |
|
141 |
-I$(JDK_TOPDIR)/src/share/bin \ |
|
142 |
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin \ |
|
143 |
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS)/bin \ |
|
144 |
-DFULL_VERSION='"$(FULL_VERSION)"' \ |
|
145 |
-DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \ |
|
146 |
-DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \ |
|
147 |
-DLIBARCHNAME='"$(OPENJDK_TARGET_CPU_LEGACY)"' \ |
|
148 |
-DLAUNCHER_NAME='"$(LAUNCHER_NAME)"' \ |
|
149 |
-DPROGNAME='"$1"' $(DPACKAGEPATH) \ |
|
150 |
$2, \ |
|
151 |
CFLAGS_linux := -fPIC, \ |
|
152 |
CFLAGS_solaris := -KPIC -DHAVE_GETHRTIME, \ |
|
153 |
LDFLAGS := $(LDFLAGS_JDKEXE) \ |
|
154 |
$(ORIGIN_ARG) \ |
|
155 |
$$($1_LDFLAGS), \ |
|
156 |
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_NAME,$1), \ |
|
21606 | 157 |
LDFLAGS_linux := -lpthread \ |
20547 | 158 |
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \ |
159 |
LDFLAGS_solaris := $$($1_LDFLAGS_solaris) \ |
|
160 |
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \ |
|
161 |
MAPFILE := $$($1_MAPFILE), \ |
|
162 |
LDFLAGS_SUFFIX := $(LDFLAGS_JDKEXE_SUFFIX) $$($1_LDFLAGS_SUFFIX), \ |
|
163 |
LDFLAGS_SUFFIX_posix := $4, \ |
|
164 |
LDFLAGS_SUFFIX_windows := $$($1_WINDOWS_JLI_LIB) \ |
|
165 |
$(JDK_OUTPUTDIR)/objs/libjava/java.lib advapi32.lib $5, \ |
|
166 |
LDFLAGS_SUFFIX_linux := -L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \ |
|
167 |
LDFLAGS_SUFFIX_solaris := -L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \ |
|
168 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/$1_objs$(OUTPUT_SUBDIR), \ |
|
169 |
OUTPUT_DIR := $$($1_OUTPUT_DIR_ARG)$(OUTPUT_SUBDIR), \ |
|
170 |
PROGRAM := $1, \ |
|
171 |
DEBUG_SYMBOLS := true, \ |
|
172 |
VERSIONINFO_RESOURCE := $$($1_VERSION_INFO_RESOURCE), \ |
|
173 |
RC_FLAGS := $(RC_FLAGS) \ |
|
174 |
-D "JDK_FNAME=$1$(EXE_SUFFIX)" \ |
|
175 |
-D "JDK_INTERNAL_NAME=$1" \ |
|
176 |
-D "JDK_FTYPE=0x1L" \ |
|
177 |
$7, \ |
|
178 |
MANIFEST := $(JDK_TOPDIR)/src/windows/resource/java.manifest, \ |
|
179 |
CODESIGN := $$($1_CODESIGN)) |
|
14231 | 180 |
|
20547 | 181 |
BUILD_LAUNCHERS += $$(BUILD_LAUNCHER_$1) |
14231 | 182 |
|
20547 | 183 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
184 |
$$(BUILD_LAUNCHER_$1): $(JDK_OUTPUTDIR)/objs/libjli_static.a |
|
185 |
endif |
|
14231 | 186 |
|
20547 | 187 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
188 |
$$(BUILD_LAUNCHER_$1): $(JDK_OUTPUTDIR)/objs/libjava/java.lib \ |
|
189 |
$$($1_WINDOWS_JLI_LIB) |
|
190 |
endif |
|
14231 | 191 |
endef |
192 |
||
193 |
########################################################################################## |
|
194 |
||
20547 | 195 |
XLIBS := $(X_LIBS) -lX11 |
196 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
197 |
DPACKAGEPATH := -DPACKAGE_PATH='"$(PACKAGE_PATH)"' |
|
198 |
XLIBS := |
|
14231 | 199 |
endif |
200 |
||
201 |
ifdef OPENJDK |
|
20547 | 202 |
JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/windows/resource/icons" |
14231 | 203 |
else |
20547 | 204 |
JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows" |
14231 | 205 |
endif |
206 |
||
207 |
# On windows, the debuginfo files get the same name as for java.dll. Build |
|
208 |
# into another dir and copy selectively so debuginfo for java.dll isn't |
|
209 |
# overwritten. |
|
20547 | 210 |
$(eval $(call SetupLauncher,java, \ |
211 |
-DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \ |
|
212 |
$(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \ |
|
213 |
$(JDK_TOPDIR)/src/windows/resource/java.rc, $(JDK_OUTPUTDIR)/objs/java_objs,true)) |
|
14231 | 214 |
|
215 |
$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java) |
|
216 |
$(MKDIR) -p $(@D) |
|
217 |
$(RM) $@ |
|
218 |
$(CP) $(JDK_OUTPUTDIR)/objs/java_objs$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX) $@ |
|
219 |
||
220 |
BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX) |
|
221 |
||
20547 | 222 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
223 |
$(eval $(call SetupLauncher,javaw, \ |
|
224 |
-DJAVAW -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \ |
|
225 |
$(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \ |
|
226 |
$(JDK_TOPDIR)/src/windows/resource/java.rc,,true)) |
|
14231 | 227 |
endif |
228 |
||
229 |
||
230 |
ifndef BUILD_HEADLESS_ONLY |
|
20547 | 231 |
$(eval $(call SetupLauncher,appletviewer, \ |
232 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.applet.Main"$(COMMA) }',, \ |
|
233 |
$(XLIBS))) |
|
14231 | 234 |
endif |
235 |
||
20547 | 236 |
$(eval $(call SetupLauncher,extcheck, \ |
14231 | 237 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.extcheck.Main"$(COMMA) }')) |
238 |
||
20547 | 239 |
$(eval $(call SetupLauncher,idlj, \ |
14231 | 240 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.corba.se.idl.toJavaPortable.Compile"$(COMMA) }')) |
241 |
||
20547 | 242 |
$(eval $(call SetupLauncher,jar, \ |
14231 | 243 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jar.Main"$(COMMA) }')) |
244 |
||
20547 | 245 |
$(eval $(call SetupLauncher,jarsigner, \ |
14523
643702cd3aa8
8003960: build-infra: Jarsigner launcher has wrong classname
erikj
parents:
14235
diff
changeset
|
246 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.jarsigner.Main"$(COMMA) }')) |
14231 | 247 |
|
20547 | 248 |
$(eval $(call SetupLauncher,javac, \ |
14231 | 249 |
-DEXPAND_CLASSPATH_WILDCARDS \ |
250 |
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \ |
|
251 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javac.Main"$(COMMA) }')) |
|
252 |
||
20547 | 253 |
ifeq ($(ENABLE_SJAVAC), yes) |
254 |
$(eval $(call SetupLauncher,sjavac, \ |
|
255 |
-DEXPAND_CLASSPATH_WILDCARDS \ |
|
256 |
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \ |
|
257 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.sjavac.Main"$(COMMA) }')) |
|
14231 | 258 |
endif |
259 |
||
20547 | 260 |
$(eval $(call SetupLauncher,javadoc, \ |
14231 | 261 |
-DEXPAND_CLASSPATH_WILDCARDS \ |
262 |
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \ |
|
263 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javadoc.Main"$(COMMA) }')) |
|
264 |
||
20547 | 265 |
$(eval $(call SetupLauncher,javah, \ |
14231 | 266 |
-DEXPAND_CLASSPATH_WILDCARDS \ |
267 |
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \ |
|
268 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javah.Main"$(COMMA) }')) |
|
269 |
||
20547 | 270 |
$(eval $(call SetupLauncher,javap, \ |
14231 | 271 |
-DEXPAND_CLASSPATH_WILDCARDS \ |
272 |
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \ |
|
273 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javap.Main"$(COMMA) }')) |
|
274 |
||
20547 | 275 |
$(eval $(call SetupLauncher,jdeps, \ |
14994
a544909d1d1c
8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
14523
diff
changeset
|
276 |
-DEXPAND_CLASSPATH_WILDCARDS \ |
a544909d1d1c
8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
14523
diff
changeset
|
277 |
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \ |
a544909d1d1c
8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
14523
diff
changeset
|
278 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.jdeps.Main"$(COMMA) }')) |
a544909d1d1c
8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
14523
diff
changeset
|
279 |
|
20547 | 280 |
BUILD_LAUNCHER_jconsole_CFLAGS_windows := -DJAVAW |
281 |
BUILD_LAUNCHER_jconsole_LDFLAGS_windows := user32.lib |
|
14231 | 282 |
|
20547 | 283 |
$(eval $(call SetupLauncher,jconsole, \ |
14231 | 284 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "-J-Djconsole.showOutputViewer"$(COMMA) "sun.tools.jconsole.JConsole"$(COMMA) }' \ |
285 |
-DAPP_CLASSPATH='{ "/lib/jconsole.jar"$(COMMA) "/lib/tools.jar"$(COMMA) "/classes" }')) |
|
286 |
||
20547 | 287 |
$(eval $(call SetupLauncher,jdb, \ |
14231 | 288 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.example.debug.tty.TTY"$(COMMA) }' \ |
289 |
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }')) |
|
290 |
||
20547 | 291 |
$(eval $(call SetupLauncher,jhat, \ |
14231 | 292 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.hat.Main"$(COMMA) }')) |
293 |
||
20547 | 294 |
$(eval $(call SetupLauncher,jinfo, \ |
14231 | 295 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \ |
20547 | 296 |
"-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \ |
297 |
"-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \ |
|
298 |
"sun.tools.jinfo.JInfo"$(COMMA) }' \ |
|
14231 | 299 |
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \ |
300 |
,,,,,,,,,Info-privileged.plist)) |
|
301 |
||
20547 | 302 |
$(eval $(call SetupLauncher,jmap, \ |
14231 | 303 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \ |
20547 | 304 |
"-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \ |
305 |
"-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \ |
|
306 |
"sun.tools.jmap.JMap"$(COMMA) }' \ |
|
14231 | 307 |
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \ |
308 |
,,,,,,,,,Info-privileged.plist)) |
|
309 |
||
20547 | 310 |
$(eval $(call SetupLauncher,jps, \ |
14231 | 311 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jps.Jps"$(COMMA) }')) |
312 |
||
20547 | 313 |
$(eval $(call SetupLauncher,jrunscript, \ |
14231 | 314 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.script.shell.Main"$(COMMA) }')) |
315 |
||
20547 | 316 |
$(eval $(call SetupLauncher,jjs, \ |
317 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "jdk.nashorn.tools.Shell"$(COMMA) }')) |
|
16029 | 318 |
|
20547 | 319 |
$(eval $(call SetupLauncher,jsadebugd, \ |
14231 | 320 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.jvm.hotspot.jdi.SADebugServer"$(COMMA) }' \ |
321 |
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \ |
|
322 |
,,,,,,,,,Info-privileged.plist)) |
|
323 |
||
20547 | 324 |
$(eval $(call SetupLauncher,jstack, \ |
14231 | 325 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \ |
20547 | 326 |
"-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \ |
327 |
"-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \ |
|
328 |
"sun.tools.jstack.JStack"$(COMMA) }' \ |
|
14231 | 329 |
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \ |
330 |
,,,,,,,,,Info-privileged.plist)) |
|
331 |
||
20547 | 332 |
$(eval $(call SetupLauncher,jstat, \ |
14231 | 333 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstat.Jstat"$(COMMA) }')) |
334 |
||
20547 | 335 |
$(eval $(call SetupLauncher,jstatd, \ |
14231 | 336 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstatd.Jstatd"$(COMMA) }')) |
337 |
||
20547 | 338 |
$(eval $(call SetupLauncher,keytool, \ |
14235 | 339 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.keytool.Main"$(COMMA) }')) |
14231 | 340 |
|
20547 | 341 |
$(eval $(call SetupLauncher,native2ascii, \ |
14231 | 342 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.native2ascii.Main"$(COMMA) }')) |
343 |
||
344 |
ifndef BUILD_HEADLESS_ONLY |
|
20547 | 345 |
$(eval $(call SetupLauncher,policytool, \ |
346 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.policytool.PolicyTool"$(COMMA) }',, \ |
|
347 |
$(XLIBS))) |
|
14231 | 348 |
endif |
349 |
||
20547 | 350 |
$(eval $(call SetupLauncher,rmic, \ |
14231 | 351 |
-DEXPAND_CLASSPATH_WILDCARDS \ |
352 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.rmic.Main"$(COMMA) }')) |
|
353 |
||
20547 | 354 |
$(eval $(call SetupLauncher,schemagen, \ |
14231 | 355 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.jxc.SchemaGenerator"$(COMMA) }')) |
356 |
||
20547 | 357 |
$(eval $(call SetupLauncher,serialver, \ |
14231 | 358 |
-DEXPAND_CLASSPATH_WILDCARDS \ |
359 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.serialver.SerialVer"$(COMMA) }')) |
|
360 |
||
20547 | 361 |
$(eval $(call SetupLauncher,xjc, \ |
14231 | 362 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.xjc.Driver"$(COMMA) }')) |
363 |
||
20547 | 364 |
$(eval $(call SetupLauncher,wsgen, \ |
14231 | 365 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsGen"$(COMMA) }')) |
366 |
||
20547 | 367 |
$(eval $(call SetupLauncher,wsimport, \ |
14231 | 368 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsImport"$(COMMA) }')) |
369 |
||
20547 | 370 |
$(eval $(call SetupLauncher,orbd, \ |
371 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \ |
|
372 |
"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \ |
|
373 |
"-J-Dcom.sun.CORBA.activation.Port=1049"$(COMMA) \ |
|
374 |
"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \ |
|
375 |
"com.sun.corba.se.impl.activation.ORBD"$(COMMA) }')) |
|
14231 | 376 |
|
20547 | 377 |
$(eval $(call SetupLauncher,servertool, \ |
14231 | 378 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.corba.se.impl.activation.ServerTool"$(COMMA) }')) |
379 |
||
20547 | 380 |
$(eval $(call SetupLauncher,tnameserv, \ |
381 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \ |
|
382 |
"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \ |
|
383 |
"-J-Djava.util.logging.LoggingPermission=contol"$(COMMA) \ |
|
384 |
"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \ |
|
385 |
"com.sun.corba.se.impl.naming.cosnaming.TransientNameServer"$(COMMA) }')) |
|
14231 | 386 |
|
20547 | 387 |
$(eval $(call SetupLauncher,pack200, \ |
21820
701e0b95a267
8027900: pack200 option is broken due to the incorrect makefile definition for its driver
kizune
parents:
21805
diff
changeset
|
388 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.java.util.jar.pack.Driver"$(COMMA) }')) |
14231 | 389 |
|
20547 | 390 |
$(eval $(call SetupLauncher,rmid, \ |
391 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.server.Activation"$(COMMA) }')) |
|
14231 | 392 |
|
20547 | 393 |
$(eval $(call SetupLauncher,rmiregistry, \ |
394 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.registry.RegistryImpl"$(COMMA) }')) |
|
14231 | 395 |
|
20547 | 396 |
$(eval $(call SetupLauncher,jcmd, \ |
397 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jcmd.JCmd"$(COMMA) }')) |
|
14231 | 398 |
|
20547 | 399 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
400 |
$(eval $(call SetupLauncher,kinit, \ |
|
401 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Kinit"$(COMMA) }')) |
|
14231 | 402 |
|
20547 | 403 |
$(eval $(call SetupLauncher,klist, \ |
404 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Klist"$(COMMA) }')) |
|
14231 | 405 |
|
20547 | 406 |
$(eval $(call SetupLauncher,ktab, \ |
407 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Ktab"$(COMMA) }')) |
|
14231 | 408 |
endif |
409 |
||
410 |
########################################################################################## |
|
411 |
# The order of the object files on the link command line affects the size of the resulting |
|
412 |
# binary (at least on linux) which causes the size to differ between old and new build. |
|
413 |
ifeq ($(USE_EXTERNAL_LIBZ), true) |
|
20547 | 414 |
UNPACKEXE_CFLAGS := -DSYSTEM_ZLIB |
415 |
UNPACKEXE_ZIPOBJS := -lz |
|
14231 | 416 |
else |
20547 | 417 |
UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5 |
418 |
UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \ |
|
419 |
$(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \ |
|
420 |
$(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \ |
|
421 |
$(JDK_OUTPUTDIR)/objs/libzip/zadler32$(OBJ_SUFFIX) \ |
|
422 |
$(JDK_OUTPUTDIR)/objs/libzip/compress$(OBJ_SUFFIX) \ |
|
423 |
$(JDK_OUTPUTDIR)/objs/libzip/zutil$(OBJ_SUFFIX) \ |
|
424 |
$(JDK_OUTPUTDIR)/objs/libzip/inflate$(OBJ_SUFFIX) \ |
|
425 |
$(JDK_OUTPUTDIR)/objs/libzip/infback$(OBJ_SUFFIX) \ |
|
426 |
$(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \ |
|
427 |
$(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX) |
|
14231 | 428 |
|
429 |
endif |
|
430 |
||
431 |
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc) |
|
20547 | 432 |
UNPACKEXE_CFLAGS += -xregs=no%appl |
433 |
UNPACKEXE_LDFLAGS_solaris += -xmemalign=4s |
|
14231 | 434 |
endif |
435 |
||
20547 | 436 |
UNPACKEXE_LANG := C |
437 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
438 |
UNPACKEXE_LANG := C++ |
|
14231 | 439 |
endif |
22272
4cbb04a368cb
8025936: Windows .pdb and .map files does not have proper dependencies setup
erikj
parents:
21820
diff
changeset
|
440 |
UNPACKEXE_DEBUG_SYMBOLS := true |
14231 | 441 |
# On windows, unpack200 is linked completely differently to all other |
442 |
# executables, using the compiler with the compiler arguments. |
|
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
443 |
# It's also linked incrementally, producing a .ilk file that needs to |
14231 | 444 |
# be kept away. |
20547 | 445 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
446 |
BUILD_UNPACKEXE_LDEXE := $(CC) |
|
447 |
EXE_OUT_OPTION_save := $(EXE_OUT_OPTION) |
|
448 |
EXE_OUT_OPTION := -Fe |
|
22272
4cbb04a368cb
8025936: Windows .pdb and .map files does not have proper dependencies setup
erikj
parents:
21820
diff
changeset
|
449 |
# With the current way unpack200 is built, debug symbols aren't supported |
4cbb04a368cb
8025936: Windows .pdb and .map files does not have proper dependencies setup
erikj
parents:
21820
diff
changeset
|
450 |
# anyway. |
4cbb04a368cb
8025936: Windows .pdb and .map files does not have proper dependencies setup
erikj
parents:
21820
diff
changeset
|
451 |
UNPACKEXE_DEBUG_SYMBOLS := |
14231 | 452 |
endif |
20547 | 453 |
$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \ |
454 |
SRC := $(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack, \ |
|
455 |
EXCLUDE_FILES := jni.cpp, \ |
|
456 |
LANG := $(UNPACKEXE_LANG), \ |
|
457 |
OPTIMIZATION := LOW, \ |
|
458 |
CFLAGS := $(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE) \ |
|
459 |
-DFULL, \ |
|
460 |
CFLAGS_release := -DPRODUCT, \ |
|
461 |
CFLAGS_linux := -fPIC, \ |
|
462 |
CFLAGS_solaris := -KPIC, \ |
|
463 |
CFLAGS_macosx := -fPIC, \ |
|
21805 | 464 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers-unpack200, \ |
20547 | 465 |
LDFLAGS := $(UNPACKEXE_ZIPOBJS), \ |
466 |
LDFLAGS_windows := $(CXXFLAGS_JDKEXE), \ |
|
467 |
LDFLAGS_posix := $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \ |
|
468 |
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \ |
|
469 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
470 |
LDFLAGS_linux := -lc, \ |
|
471 |
LDFLAGS_solaris := $(UNPACKEXE_LDFLAGS_solaris) -lc, \ |
|
472 |
LDFLAGS_SUFFIX := $(LIBCXX), \ |
|
473 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR), \ |
|
474 |
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR), \ |
|
475 |
PROGRAM := unpack200, \ |
|
476 |
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ |
|
477 |
RC_FLAGS := $(RC_FLAGS) \ |
|
478 |
-D "JDK_FNAME=unpack200.exe" \ |
|
479 |
-D "JDK_INTERNAL_NAME=unpack200" \ |
|
480 |
-D "JDK_FTYPE=0x1L", \ |
|
22272
4cbb04a368cb
8025936: Windows .pdb and .map files does not have proper dependencies setup
erikj
parents:
21820
diff
changeset
|
481 |
DEBUG_SYMBOLS := $(UNPACKEXE_DEBUG_SYMBOLS), \ |
20547 | 482 |
MANIFEST := $(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest)) |
14231 | 483 |
|
20547 | 484 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
485 |
EXE_OUT_OPTION := $(EXE_OUT_OPTION_save) |
|
14231 | 486 |
endif |
487 |
||
488 |
ifneq ($(USE_EXTERNAL_LIBZ), true) |
|
489 |
||
20547 | 490 |
$(BUILD_UNPACKEXE): $(UNPACKEXE_ZIPOBJS) |
14231 | 491 |
|
492 |
endif |
|
493 |
||
494 |
# Build into object dir and copy executable afterwards to avoid .ilk file in |
|
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
495 |
# image. The real fix would be clean up linking of unpack200 using |
14231 | 496 |
# -link -incremental:no |
497 |
# like all other launchers. |
|
498 |
$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX): $(BUILD_UNPACKEXE) |
|
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
16029
diff
changeset
|
499 |
$(call install-file) |
14231 | 500 |
|
501 |
BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX) |
|
502 |
||
503 |
########################################################################################## |
|
504 |
||
505 |
||
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
506 |
BUILD_JEXEC := |
14231 | 507 |
BUILD_JEXEC_SRC := |
508 |
BUILD_JEXEC_INC := |
|
509 |
BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR) |
|
510 |
||
511 |
# |
|
512 |
# UNHANDLED: |
|
513 |
# - COMPILE_APPROACH = normal |
|
514 |
# |
|
515 |
||
516 |
# |
|
517 |
# jdk/make/java/Makefile |
|
518 |
# |
|
519 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
20547 | 520 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32) |
521 |
BUILD_JEXEC := 1 |
|
522 |
endif |
|
14231 | 523 |
endif |
524 |
||
525 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
20547 | 526 |
BUILD_JEXEC := 1 |
14231 | 527 |
endif # OPENJDK_TARGET_OS |
528 |
||
529 |
# |
|
530 |
# jdk/make/java/jexec/Makefile |
|
531 |
# |
|
532 |
ifeq ($(BUILD_JEXEC), 1) |
|
533 |
||
20547 | 534 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
535 |
else ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
536 |
BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/macosx/bin |
|
537 |
else |
|
538 |
BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/solaris/bin |
|
539 |
endif |
|
14231 | 540 |
|
20547 | 541 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
542 |
BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib |
|
543 |
BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/share/bin |
|
544 |
endif |
|
14231 | 545 |
endif |
546 |
||
547 |
# |
|
548 |
# Note that the two Makefile's seems to contradict each other, |
|
20547 | 549 |
# and that src/macosx/bin/jexec.c seems unused |
14231 | 550 |
# |
20547 | 551 |
ifneq ($(BUILD_JEXEC_SRC), ) |
552 |
$(eval $(call SetupNativeCompilation,BUILD_JEXEC, \ |
|
553 |
SRC := $(BUILD_JEXEC_SRC), \ |
|
554 |
INCLUDE_FILES := jexec.c, \ |
|
555 |
LANG := C, \ |
|
556 |
OPTIMIZATION := LOW, \ |
|
557 |
CFLAGS := $(CFLAGS_JDKEXE) \ |
|
558 |
$(BUILD_JEXEC_INC), \ |
|
559 |
CFLAGS_linux := -fPIC, \ |
|
560 |
CFLAGS_solaris := -KPIC, \ |
|
561 |
LDFLAGS := $(LDFLAGS_JDKEXE) \ |
|
562 |
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \ |
|
563 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jexec_obj, \ |
|
564 |
OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \ |
|
565 |
DEBUG_SYMBOLS := true, \ |
|
566 |
PROGRAM := jexec)) |
|
14231 | 567 |
|
20547 | 568 |
BUILD_LAUNCHERS += $(BUILD_JEXEC) |
14231 | 569 |
endif |
570 |
||
571 |
########################################################################################## |
|
572 |
||
573 |
# |
|
574 |
# The java-rmi.cgi script in bin/ only gets delivered in certain situations |
|
575 |
# |
|
20547 | 576 |
JAVA_RMI_CGI := $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java-rmi.cgi |
14231 | 577 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
578 |
BUILD_LAUNCHERS += $(JAVA_RMI_CGI) |
|
579 |
endif |
|
580 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
20894 | 581 |
BUILD_LAUNCHERS += $(JAVA_RMI_CGI) |
14231 | 582 |
endif |
583 |
||
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
584 |
# TODO: |
14231 | 585 |
# On windows java-rmi.cgi shouldn't be bundled since Java 1.2, but has been built all |
586 |
# this time anyway. Since jdk6, it has been built from the wrong source and resulted |
|
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
587 |
# in a (almost) copy of the standard java launcher named "java-rmi.exe" ending up in |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
588 |
# the final images bin dir. This weird behavior is mimicked here in the converted |
14231 | 589 |
# makefiles for now. Should probably just be deleted. |
590 |
# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6512052 |
|
20547 | 591 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
592 |
$(eval $(call SetupLauncher,java-rmi, , \ |
|
21805 | 593 |
$(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/make/java/main/java/mapfile-$(OPENJDK_TARGET_CPU)))) |
14231 | 594 |
else |
20547 | 595 |
$(JAVA_RMI_CGI): $(JDK_TOPDIR)/src/solaris/bin/java-rmi.cgi.sh |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
16029
diff
changeset
|
596 |
$(call install-file) |
14231 | 597 |
$(CHMOD) a+x $@ |
598 |
endif |
|
599 |
||
600 |
########################################################################################## |
|
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
601 |
|
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
602 |
BUILD_JSPAWNHELPER := |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
603 |
BUILD_JSPAWNHELPER_SRC := $(JDK_TOPDIR)/src/solaris/native/java/lang |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
604 |
BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR) |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
605 |
LINK_JSPAWNHELPER_OBJECTS := $(JDK_OUTPUTDIR)/objs/libjava/childproc.o |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
606 |
LINK_JSPAWNHELPER_FLAGS := |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
607 |
|
20547 | 608 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris), ) |
609 |
BUILD_JSPAWNHELPER := 1 |
|
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
610 |
endif |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
611 |
|
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
612 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
20547 | 613 |
BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib |
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
614 |
endif |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
615 |
|
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
616 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64) |
20547 | 617 |
LINK_JSPAWNHELPER_FLAGS += -m64 |
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
618 |
endif |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
619 |
|
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
620 |
ifeq ($(BUILD_JSPAWNHELPER), 1) |
20547 | 621 |
$(eval $(call SetupNativeCompilation,BUILD_JSPAWNHELPER, \ |
622 |
SRC := $(BUILD_JSPAWNHELPER_SRC), \ |
|
623 |
INCLUDE_FILES := jspawnhelper.c, \ |
|
624 |
LANG := C, \ |
|
625 |
OPTIMIZATION := LOW, \ |
|
626 |
CFLAGS := $(CFLAGS_JDKEXE), \ |
|
627 |
LDFLAGS := $(LDFLAGS_JDKEXE) $(LINK_JSPAWNHELPER_FLAGS), \ |
|
628 |
LDFLAGS_SUFFIX := $(LINK_JSPAWNHELPER_OBJECTS), \ |
|
629 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jspawnhelper, \ |
|
630 |
OUTPUT_DIR := $(BUILD_JSPAWNHELPER_DST_DIR), \ |
|
631 |
PROGRAM := jspawnhelper)) |
|
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
632 |
|
20547 | 633 |
$(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS) |
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
634 |
|
20547 | 635 |
BUILD_LAUNCHERS += $(BUILD_JSPAWNHELPER) |
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
636 |
endif |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
637 |
|
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
638 |
########################################################################################## |
15324
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
639 |
# jabswitch |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
640 |
|
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
641 |
ifndef OPENJDK |
20547 | 642 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
15324
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
643 |
|
20547 | 644 |
$(eval $(call SetupNativeCompilation,BUILD_JABSWITCH, \ |
645 |
SRC := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge, \ |
|
646 |
INCLUDE_FILES := jabswitch.cpp, \ |
|
647 |
LANG := C++, \ |
|
648 |
CFLAGS := $(filter-out -Zc:wchar_t-, $(CFLAGS_JDKEXE)) -Zc:wchar_t \ |
|
649 |
-analyze- -Od -Gd -D_WINDOWS \ |
|
650 |
-D_UNICODE -DUNICODE -RTC1 -EHsc, \ |
|
651 |
LDFLAGS := $(LDFLAGS_JDKEXE) \ |
|
652 |
Advapi32.lib Version.lib User32.lib, \ |
|
653 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jabswitch, \ |
|
654 |
OUTPUT_DIR := $(JDK_OUTPUTDIR)/bin, \ |
|
655 |
PROGRAM := jabswitch, \ |
|
656 |
DEBUG_SYMBOLS := true, \ |
|
657 |
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/AccessBridgeStatusWindow.rc, \ |
|
658 |
RC_FLAGS := $(RC_FLAGS), \ |
|
659 |
MANIFEST := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/jabswitch.manifest)) |
|
15324
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
660 |
|
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
661 |
BUILD_LAUNCHERS += $(BUILD_JABSWITCH) |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
662 |
|
20547 | 663 |
endif |
15324
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
664 |
endif |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
665 |
|
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
666 |
########################################################################################## |
14231 | 667 |
|
21805 | 668 |
$(BUILD_LAUNCHERS): $(JDK_TOPDIR)/make/CompileLaunchers.gmk |
14231 | 669 |
|
670 |
all: $(BUILD_LAUNCHERS) |
|
671 |
||
672 |
.PHONY: all |