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, \
|
|
35 |
$(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
|
|
36 |
$(JAVA_VERSION_INFO_RESOURCE), $(JDK_OUTPUTDIR)/objs/java_objs,true))
|
|
37 |
|
|
38 |
$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
|
|
39 |
$(MKDIR) -p $(@D)
|
|
40 |
$(RM) $@
|
|
41 |
$(CP) $(JDK_OUTPUTDIR)/objs/java_objs$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX) $@
|
|
42 |
|
|
43 |
LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX)
|
|
44 |
|
|
45 |
ifeq ($(OPENJDK_TARGET_OS), windows)
|
|
46 |
$(eval $(call SetupLauncher,javaw, \
|
|
47 |
-DJAVAW -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \
|
|
48 |
$(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
|
|
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 :=
|
|
60 |
BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
|
|
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)
|
|
93 |
BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib
|
|
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)), \
|
|
114 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jexec_obj, \
|
|
115 |
OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \
|
|
116 |
DEBUG_SYMBOLS := true, \
|
|
117 |
PROGRAM := jexec))
|
|
118 |
|
|
119 |
LIBRARIES += $(BUILD_JEXEC)
|
|
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
|
|
127 |
BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
|
|
128 |
LINK_JSPAWNHELPER_OBJECTS := $(JDK_OUTPUTDIR)/objs/libjava/childproc.o
|
|
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)
|
|
136 |
BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib
|
|
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), \
|
|
152 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jspawnhelper, \
|
|
153 |
OUTPUT_DIR := $(BUILD_JSPAWNHELPER_DST_DIR), \
|
|
154 |
PROGRAM := jspawnhelper))
|
|
155 |
|
|
156 |
$(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS)
|
|
157 |
|
|
158 |
LIBRARIES += $(BUILD_JSPAWNHELPER)
|
|
159 |
endif
|
|
160 |
|
|
161 |
################################################################################
|
|
162 |
|
|
163 |
java.base: $(LAUNCHERS) $(LIBRARIES)
|
|
164 |
|
|
165 |
all: java.base
|
|
166 |
|
|
167 |
.PHONY: all java.base
|