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 |
|
33523
|
28 |
JAVA_RC_FLAGS += -i $(JDK_TOPDIR)/src/java.base/windows/native/common
|
|
29 |
ifdef OPENJDK
|
|
30 |
JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/java.base/windows/native/launcher/icons"
|
|
31 |
else
|
|
32 |
JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/closed/java.base/windows/native/launcher/icons"
|
|
33 |
endif
|
|
34 |
|
25859
|
35 |
################################################################################
|
|
36 |
|
|
37 |
# On windows, the debuginfo files get the same name as for java.dll. Build
|
|
38 |
# into another dir and copy selectively so debuginfo for java.dll isn't
|
|
39 |
# overwritten.
|
33523
|
40 |
$(eval $(call SetupBuildLauncher, java, \
|
|
41 |
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
|
|
42 |
LDFLAGS_solaris := -R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR), \
|
|
43 |
LIBS_windows := user32.lib comctl32.lib, \
|
|
44 |
RC_FLAGS := $(JAVA_RC_FLAGS), \
|
|
45 |
VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
|
|
46 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs, \
|
|
47 |
OPTIMIZATION := HIGH, \
|
|
48 |
WINDOWS_STATIC_LINK := true, \
|
|
49 |
NO_JAVA_MS := true, \
|
|
50 |
))
|
25859
|
51 |
|
27565
|
52 |
$(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
|
25859
|
53 |
$(MKDIR) -p $(@D)
|
|
54 |
$(RM) $@
|
33523
|
55 |
$(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs/java$(EXE_SUFFIX) $@
|
25859
|
56 |
|
27565
|
57 |
TARGETS += $(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX)
|
25859
|
58 |
|
|
59 |
ifeq ($(OPENJDK_TARGET_OS), windows)
|
33523
|
60 |
$(eval $(call SetupBuildLauncher, javaw, \
|
|
61 |
CFLAGS := -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
|
|
62 |
LIBS_windows := user32.lib comctl32.lib, \
|
|
63 |
RC_FLAGS := $(JAVA_RC_FLAGS), \
|
|
64 |
VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
|
|
65 |
WINDOWS_STATIC_LINK := true, \
|
|
66 |
NO_JAVA_MS := true, \
|
|
67 |
))
|
25859
|
68 |
endif
|
|
69 |
|
33523
|
70 |
$(eval $(call SetupBuildLauncher, keytool, \
|
|
71 |
MAIN_CLASS := sun.security.tools.keytool.Main, \
|
|
72 |
))
|
25859
|
73 |
|
|
74 |
################################################################################
|
|
75 |
|
|
76 |
BUILD_JEXEC :=
|
|
77 |
BUILD_JEXEC_SRC :=
|
|
78 |
BUILD_JEXEC_INC :=
|
27565
|
79 |
BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
|
25859
|
80 |
|
|
81 |
#
|
|
82 |
# UNHANDLED:
|
|
83 |
# - COMPILE_APPROACH = normal
|
|
84 |
#
|
|
85 |
|
|
86 |
#
|
|
87 |
# jdk/make/java/Makefile
|
|
88 |
#
|
|
89 |
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
|
90 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
|
|
91 |
BUILD_JEXEC := 1
|
|
92 |
endif
|
|
93 |
endif
|
|
94 |
|
|
95 |
ifeq ($(OPENJDK_TARGET_OS), linux)
|
|
96 |
BUILD_JEXEC := 1
|
|
97 |
endif # OPENJDK_TARGET_OS
|
|
98 |
|
|
99 |
#
|
|
100 |
# jdk/make/java/jexec/Makefile
|
|
101 |
#
|
|
102 |
ifeq ($(BUILD_JEXEC), 1)
|
|
103 |
|
|
104 |
ifeq ($(OPENJDK_TARGET_OS), windows)
|
|
105 |
else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
|
106 |
BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/java.base/macosx/native/launcher
|
|
107 |
else
|
|
108 |
BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/launcher
|
|
109 |
endif
|
|
110 |
|
|
111 |
ifeq ($(OPENJDK_TARGET_OS), linux)
|
27565
|
112 |
BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
|
25859
|
113 |
BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/java.base/share/native/libjli
|
|
114 |
endif
|
|
115 |
endif
|
|
116 |
|
|
117 |
#
|
|
118 |
# Note that the two Makefile's seems to contradict each other,
|
|
119 |
# and that src/macosx/bin/jexec.c seems unused
|
|
120 |
#
|
|
121 |
ifneq ($(BUILD_JEXEC_SRC), )
|
|
122 |
$(eval $(call SetupNativeCompilation,BUILD_JEXEC, \
|
|
123 |
SRC := $(BUILD_JEXEC_SRC), \
|
|
124 |
INCLUDE_FILES := jexec.c, \
|
|
125 |
OPTIMIZATION := LOW, \
|
|
126 |
CFLAGS := $(CFLAGS_JDKEXE) \
|
|
127 |
$(BUILD_JEXEC_INC), \
|
|
128 |
CFLAGS_linux := -fPIC, \
|
|
129 |
CFLAGS_solaris := -KPIC, \
|
|
130 |
LDFLAGS := $(LDFLAGS_JDKEXE) \
|
|
131 |
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
|
27565
|
132 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \
|
25859
|
133 |
OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \
|
|
134 |
DEBUG_SYMBOLS := true, \
|
|
135 |
PROGRAM := jexec))
|
|
136 |
|
27565
|
137 |
TARGETS += $(BUILD_JEXEC)
|
25859
|
138 |
endif
|
|
139 |
|
|
140 |
################################################################################
|
|
141 |
|
|
142 |
BUILD_JSPAWNHELPER :=
|
|
143 |
BUILD_JSPAWNHELPER_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/jspawnhelper
|
|
144 |
JSPAWNHELPER_CFLAGS := -I$(JDK_TOPDIR)/src/java.base/unix/native/libjava
|
27565
|
145 |
BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)
|
|
146 |
LINK_JSPAWNHELPER_OBJECTS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc.o
|
33406
|
147 |
BUILD_JSPAWNHELPER_LDFLAGS :=
|
25859
|
148 |
|
|
149 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
|
|
150 |
BUILD_JSPAWNHELPER := 1
|
|
151 |
endif
|
|
152 |
|
|
153 |
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
27565
|
154 |
BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base
|
25859
|
155 |
endif
|
|
156 |
|
|
157 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
|
33406
|
158 |
BUILD_JSPAWNHELPER_LDFLAGS += $(COMPILER_TARGET_BITS_FLAG)64
|
25859
|
159 |
endif
|
|
160 |
|
|
161 |
ifeq ($(BUILD_JSPAWNHELPER), 1)
|
|
162 |
$(eval $(call SetupNativeCompilation,BUILD_JSPAWNHELPER, \
|
|
163 |
SRC := $(BUILD_JSPAWNHELPER_SRC), \
|
|
164 |
INCLUDE_FILES := jspawnhelper.c, \
|
|
165 |
OPTIMIZATION := LOW, \
|
|
166 |
CFLAGS := $(CFLAGS_JDKEXE) $(JSPAWNHELPER_CFLAGS), \
|
33406
|
167 |
LDFLAGS := $(LDFLAGS_JDKEXE) $(BUILD_JSPAWNHELPER_LDFLAGS), \
|
|
168 |
LIBS := $(LINK_JSPAWNHELPER_OBJECTS), \
|
27565
|
169 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jspawnhelper, \
|
25859
|
170 |
OUTPUT_DIR := $(BUILD_JSPAWNHELPER_DST_DIR), \
|
|
171 |
PROGRAM := jspawnhelper))
|
|
172 |
|
|
173 |
$(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS)
|
|
174 |
|
27565
|
175 |
TARGETS += $(BUILD_JSPAWNHELPER)
|
25859
|
176 |
endif
|
|
177 |
|
|
178 |
################################################################################
|