author | ihse |
Thu, 29 Oct 2015 16:31:00 +0100 | |
changeset 33406 | 4680f7495292 |
parent 32267 | 4e96a9ee01b1 |
child 33523 | eb067bcd9414 |
permissions | -rw-r--r-- |
25859 | 1 |
# |
33406 | 2 |
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
25859 | 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 |
include LauncherCommon.gmk |
|
27 |
||
28 |
################################################################################ |
|
29 |
||
30 |
# On windows, the debuginfo files get the same name as for java.dll. Build |
|
31 |
# into another dir and copy selectively so debuginfo for java.dll isn't |
|
32 |
# overwritten. |
|
33 |
$(eval $(call SetupLauncher,java, \ |
|
32267
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
29931
diff
changeset
|
34 |
-DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES,,,user32.lib comctl32.lib, \ |
27565 | 35 |
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jli_static.lib, $(JAVA_RC_FLAGS), \ |
36 |
$(JAVA_VERSION_INFO_RESOURCE), $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs,true)) |
|
25859 | 37 |
|
27565 | 38 |
$(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java) |
25859 | 39 |
$(MKDIR) -p $(@D) |
40 |
$(RM) $@ |
|
27565 | 41 |
$(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX) $@ |
25859 | 42 |
|
27565 | 43 |
TARGETS += $(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX) |
25859 | 44 |
|
45 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
46 |
$(eval $(call SetupLauncher,javaw, \ |
|
32267
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
29931
diff
changeset
|
47 |
-DJAVAW -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES,,,user32.lib comctl32.lib, \ |
27565 | 48 |
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jli_static.lib, $(JAVA_RC_FLAGS), \ |
25859 | 49 |
$(JAVA_VERSION_INFO_RESOURCE),,true)) |
50 |
endif |
|
51 |
||
52 |
$(eval $(call SetupLauncher,keytool, \ |
|
53 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.keytool.Main"$(COMMA) }')) |
|
54 |
||
55 |
################################################################################ |
|
56 |
||
57 |
BUILD_JEXEC := |
|
58 |
BUILD_JEXEC_SRC := |
|
59 |
BUILD_JEXEC_INC := |
|
27565 | 60 |
BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR) |
25859 | 61 |
|
62 |
# |
|
63 |
# UNHANDLED: |
|
64 |
# - COMPILE_APPROACH = normal |
|
65 |
# |
|
66 |
||
67 |
# |
|
68 |
# jdk/make/java/Makefile |
|
69 |
# |
|
70 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
71 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32) |
|
72 |
BUILD_JEXEC := 1 |
|
73 |
endif |
|
74 |
endif |
|
75 |
||
76 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
77 |
BUILD_JEXEC := 1 |
|
78 |
endif # OPENJDK_TARGET_OS |
|
79 |
||
80 |
# |
|
81 |
# jdk/make/java/jexec/Makefile |
|
82 |
# |
|
83 |
ifeq ($(BUILD_JEXEC), 1) |
|
84 |
||
85 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
86 |
else ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
87 |
BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/java.base/macosx/native/launcher |
|
88 |
else |
|
89 |
BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/launcher |
|
90 |
endif |
|
91 |
||
92 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
27565 | 93 |
BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base |
25859 | 94 |
BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/java.base/share/native/libjli |
95 |
endif |
|
96 |
endif |
|
97 |
||
98 |
# |
|
99 |
# Note that the two Makefile's seems to contradict each other, |
|
100 |
# and that src/macosx/bin/jexec.c seems unused |
|
101 |
# |
|
102 |
ifneq ($(BUILD_JEXEC_SRC), ) |
|
103 |
$(eval $(call SetupNativeCompilation,BUILD_JEXEC, \ |
|
104 |
SRC := $(BUILD_JEXEC_SRC), \ |
|
105 |
INCLUDE_FILES := jexec.c, \ |
|
106 |
OPTIMIZATION := LOW, \ |
|
107 |
CFLAGS := $(CFLAGS_JDKEXE) \ |
|
108 |
$(BUILD_JEXEC_INC), \ |
|
109 |
CFLAGS_linux := -fPIC, \ |
|
110 |
CFLAGS_solaris := -KPIC, \ |
|
111 |
LDFLAGS := $(LDFLAGS_JDKEXE) \ |
|
112 |
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \ |
|
27565 | 113 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \ |
25859 | 114 |
OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \ |
115 |
DEBUG_SYMBOLS := true, \ |
|
116 |
PROGRAM := jexec)) |
|
117 |
||
27565 | 118 |
TARGETS += $(BUILD_JEXEC) |
25859 | 119 |
endif |
120 |
||
121 |
################################################################################ |
|
122 |
||
123 |
BUILD_JSPAWNHELPER := |
|
124 |
BUILD_JSPAWNHELPER_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/jspawnhelper |
|
125 |
JSPAWNHELPER_CFLAGS := -I$(JDK_TOPDIR)/src/java.base/unix/native/libjava |
|
27565 | 126 |
BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR) |
127 |
LINK_JSPAWNHELPER_OBJECTS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc.o |
|
33406 | 128 |
BUILD_JSPAWNHELPER_LDFLAGS := |
25859 | 129 |
|
130 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), ) |
|
131 |
BUILD_JSPAWNHELPER := 1 |
|
132 |
endif |
|
133 |
||
134 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
27565 | 135 |
BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base |
25859 | 136 |
endif |
137 |
||
138 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64) |
|
33406 | 139 |
BUILD_JSPAWNHELPER_LDFLAGS += $(COMPILER_TARGET_BITS_FLAG)64 |
25859 | 140 |
endif |
141 |
||
142 |
ifeq ($(BUILD_JSPAWNHELPER), 1) |
|
143 |
$(eval $(call SetupNativeCompilation,BUILD_JSPAWNHELPER, \ |
|
144 |
SRC := $(BUILD_JSPAWNHELPER_SRC), \ |
|
145 |
INCLUDE_FILES := jspawnhelper.c, \ |
|
146 |
OPTIMIZATION := LOW, \ |
|
147 |
CFLAGS := $(CFLAGS_JDKEXE) $(JSPAWNHELPER_CFLAGS), \ |
|
33406 | 148 |
LDFLAGS := $(LDFLAGS_JDKEXE) $(BUILD_JSPAWNHELPER_LDFLAGS), \ |
149 |
LIBS := $(LINK_JSPAWNHELPER_OBJECTS), \ |
|
27565 | 150 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jspawnhelper, \ |
25859 | 151 |
OUTPUT_DIR := $(BUILD_JSPAWNHELPER_DST_DIR), \ |
152 |
PROGRAM := jspawnhelper)) |
|
153 |
||
154 |
$(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS) |
|
155 |
||
27565 | 156 |
TARGETS += $(BUILD_JSPAWNHELPER) |
25859 | 157 |
endif |
158 |
||
159 |
################################################################################ |