25859
|
1 |
#
|
|
2 |
# Copyright (c) 2011, 2014, 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 |
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, \
|
|
34 |
-DEXPAND_CLASSPATH_WILDCARDS,,,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, \
|
|
47 |
-DJAVAW -DEXPAND_CLASSPATH_WILDCARDS,,,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 |
LANG := C, \
|
|
107 |
OPTIMIZATION := LOW, \
|
|
108 |
CFLAGS := $(CFLAGS_JDKEXE) \
|
|
109 |
$(BUILD_JEXEC_INC), \
|
|
110 |
CFLAGS_linux := -fPIC, \
|
|
111 |
CFLAGS_solaris := -KPIC, \
|
|
112 |
LDFLAGS := $(LDFLAGS_JDKEXE) \
|
|
113 |
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
|
27565
|
114 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \
|
25859
|
115 |
OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \
|
|
116 |
DEBUG_SYMBOLS := true, \
|
|
117 |
PROGRAM := jexec))
|
|
118 |
|
27565
|
119 |
TARGETS += $(BUILD_JEXEC)
|
25859
|
120 |
endif
|
|
121 |
|
|
122 |
################################################################################
|
|
123 |
|
|
124 |
BUILD_JSPAWNHELPER :=
|
|
125 |
BUILD_JSPAWNHELPER_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/jspawnhelper
|
|
126 |
JSPAWNHELPER_CFLAGS := -I$(JDK_TOPDIR)/src/java.base/unix/native/libjava
|
27565
|
127 |
BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
|
|
128 |
LINK_JSPAWNHELPER_OBJECTS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc.o
|
25859
|
129 |
LINK_JSPAWNHELPER_FLAGS :=
|
|
130 |
|
|
131 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
|
|
132 |
BUILD_JSPAWNHELPER := 1
|
|
133 |
endif
|
|
134 |
|
|
135 |
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
27565
|
136 |
BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
|
25859
|
137 |
endif
|
|
138 |
|
|
139 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
|
|
140 |
LINK_JSPAWNHELPER_FLAGS += $(COMPILER_TARGET_BITS_FLAG)64
|
|
141 |
endif
|
|
142 |
|
|
143 |
ifeq ($(BUILD_JSPAWNHELPER), 1)
|
|
144 |
$(eval $(call SetupNativeCompilation,BUILD_JSPAWNHELPER, \
|
|
145 |
SRC := $(BUILD_JSPAWNHELPER_SRC), \
|
|
146 |
INCLUDE_FILES := jspawnhelper.c, \
|
|
147 |
LANG := C, \
|
|
148 |
OPTIMIZATION := LOW, \
|
|
149 |
CFLAGS := $(CFLAGS_JDKEXE) $(JSPAWNHELPER_CFLAGS), \
|
|
150 |
LDFLAGS := $(LDFLAGS_JDKEXE) $(LINK_JSPAWNHELPER_FLAGS), \
|
|
151 |
LDFLAGS_SUFFIX := $(LINK_JSPAWNHELPER_OBJECTS), \
|
27565
|
152 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jspawnhelper, \
|
25859
|
153 |
OUTPUT_DIR := $(BUILD_JSPAWNHELPER_DST_DIR), \
|
|
154 |
PROGRAM := jspawnhelper))
|
|
155 |
|
|
156 |
$(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS)
|
|
157 |
|
27565
|
158 |
TARGETS += $(BUILD_JSPAWNHELPER)
|
25859
|
159 |
endif
|
|
160 |
|
|
161 |
################################################################################
|