author | chegar |
Wed, 03 Dec 2014 14:22:58 +0000 | |
changeset 27565 | 729f9700483a |
parent 27186 | c1b8debdfcc2 |
child 27799 | 097b1d6f6894 |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
24967 | 2 |
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
4 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
10 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
15 |
# accompanied this code). |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
16 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
20 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
23 |
# questions. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
24 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
25 |
|
27565 | 26 |
WIN_VERIFY_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify/verify.lib |
13702 | 27 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
28 |
########################################################################################## |
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25859
diff
changeset
|
29 |
# libfdlibm is statically linked with libjava below and not delivered into the |
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25859
diff
changeset
|
30 |
# product on its own. |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
31 |
|
20547 | 32 |
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH |
13164 | 33 |
|
34 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
|
20547 | 35 |
BUILD_LIBFDLIBM_OPTIMIZATION := NONE |
12892 | 36 |
endif |
37 |
||
25859 | 38 |
LIBFDLIBM_SRC := $(JDK_TOPDIR)/src/java.base/share/native/libfdlibm |
39 |
LIBFDLIBM_CFLAGS := -I$(LIBFDLIBM_SRC) |
|
40 |
||
20547 | 41 |
ifneq ($(OPENJDK_TARGET_OS), macosx) |
42 |
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM, \ |
|
43 |
STATIC_LIBRARY := fdlibm, \ |
|
27565 | 44 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \ |
25859 | 45 |
SRC := $(LIBFDLIBM_SRC), \ |
20547 | 46 |
LANG := C, \ |
47 |
OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \ |
|
25859 | 48 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \ |
20547 | 49 |
CFLAGS_windows_debug := -DLOGGING, \ |
22594 | 50 |
CFLAGS_aix := -qfloat=nomaf, \ |
20547 | 51 |
ARFLAGS := $(ARFLAGS), \ |
27565 | 52 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \ |
20547 | 53 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
13164 | 54 |
|
12892 | 55 |
else |
14855
d104ff4d4bb9
8005178: build-infra: Dependency on libfdlibm on mac is broken
erikj
parents:
14789
diff
changeset
|
56 |
|
20890 | 57 |
# On macosx the old build does partial (incremental) linking of fdlibm instead of |
58 |
# a plain static library. |
|
20547 | 59 |
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC, \ |
60 |
LIBRARY := fdlibm, \ |
|
27565 | 61 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \ |
25859 | 62 |
SRC := $(LIBFDLIBM_SRC), \ |
20547 | 63 |
LANG := C, \ |
25859 | 64 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \ |
20547 | 65 |
LDFLAGS := -nostdlib -r -arch x86_64, \ |
27565 | 66 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \ |
20547 | 67 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
68 |
||
27565 | 69 |
BUILD_LIBFDLIBM := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX) |
20547 | 70 |
$(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC) |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
16513
diff
changeset
|
71 |
$(call install-file) |
12892 | 72 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
73 |
endif |
20890 | 74 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
75 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
76 |
|
20547 | 77 |
BUILD_LIBVERIFY_SRC := check_code.c check_format.c |
13164 | 78 |
|
79 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
20547 | 80 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
21805 | 81 |
BUILD_LIBVERIFY_REORDER := $(JDK_TOPDIR)/make/mapfiles/libverify/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 82 |
endif |
13164 | 83 |
endif |
84 |
||
20547 | 85 |
LIBVERIFY_OPTIMIZATION := HIGH |
86 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), ) |
|
87 |
ifeq ($(ENABLE_DEBUG_SYMBOLS), true) |
|
88 |
LIBVERIFY_OPTIMIZATION := LOW |
|
89 |
endif |
|
13702 | 90 |
endif |
91 |
||
20547 | 92 |
$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \ |
93 |
LIBRARY := verify, \ |
|
94 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
25859 | 95 |
SRC := $(JDK_TOPDIR)/src/java.base/share/native/libverify, \ |
20547 | 96 |
LANG := C, \ |
97 |
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \ |
|
98 |
CFLAGS := $(CFLAGS_JDKLIB), \ |
|
21805 | 99 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libverify/mapfile-vers, \ |
20547 | 100 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
101 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
102 |
LDFLAGS_SUFFIX_posix := -ljvm -lc, \ |
|
103 |
LDFLAGS_SUFFIX_windows := jvm.lib, \ |
|
25859 | 104 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 105 |
RC_FLAGS := $(RC_FLAGS) \ |
106 |
-D "JDK_FNAME=verify.dll" \ |
|
107 |
-D "JDK_INTERNAL_NAME=verify" \ |
|
108 |
-D "JDK_FTYPE=0x2L", \ |
|
109 |
REORDER := $(BUILD_LIBVERIFY_REORDER), \ |
|
27565 | 110 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify, \ |
20547 | 111 |
DEBUG_SYMBOLS := true)) |
13164 | 112 |
|
27565 | 113 |
TARGETS += $(BUILD_LIBVERIFY) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
114 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
115 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
116 |
|
25859 | 117 |
LIBJAVA_SRC_DIRS := $(call FindSrcDirsForLib, java.base, java) |
20547 | 118 |
|
25859 | 119 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
120 |
LIBJAVA_EXCLUDE_FILES += $(JDK_TOPDIR)/src/java.base/unix/native/libjava/HostLocaleProviderAdapter_md.c |
|
13164 | 121 |
endif |
122 |
||
25859 | 123 |
LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \ |
124 |
-I$(JDK_TOPDIR)/src/java.base/share/native/libfdlibm \ |
|
27565 | 125 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \ |
20547 | 126 |
-DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"' |
13164 | 127 |
|
128 |
LIBJAVA_CFLAGS += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \ |
|
20547 | 129 |
-DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \ |
130 |
-DJDK_MICRO_VERSION='"$(JDK_MICRO_VERSION)"' \ |
|
131 |
-DJDK_BUILD_NUMBER='"$(JDK_BUILD_NUMBER)"' |
|
132 |
||
133 |
ifneq (, $(JDK_UPDATE_VERSION)) |
|
134 |
LIBJAVA_CFLAGS += -DJDK_UPDATE_VERSION='"$(JDK_UPDATE_VERSION)"' |
|
13164 | 135 |
endif |
136 |
||
20547 | 137 |
ifneq ($(OPENJDK_TARGET_OS), macosx) |
138 |
LIBJAVA_EXCLUDE_FILES += java_props_macosx.c |
|
13164 | 139 |
else |
20547 | 140 |
BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c |
141 |
BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c |
|
13164 | 142 |
endif |
143 |
||
144 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
20547 | 145 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
21805 | 146 |
LIBJAVA_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 147 |
endif |
13164 | 148 |
endif |
149 |
||
20547 | 150 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \ |
151 |
LIBRARY := java, \ |
|
152 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
153 |
SRC := $(LIBJAVA_SRC_DIRS), \ |
|
22951
5fd21112b2b6
8034043: Native methods for preferences API should not be in libjava
alanb
parents:
22941
diff
changeset
|
154 |
EXCLUDES := fdlibm/src zip prefs, \ |
20547 | 155 |
EXCLUDE_FILES := $(LIBJAVA_EXCLUDE_FILES), \ |
156 |
LANG := C, \ |
|
157 |
OPTIMIZATION := HIGH, \ |
|
158 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
159 |
$(LIBJAVA_CFLAGS), \ |
|
21805 | 160 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers, \ |
20547 | 161 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
162 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
163 |
LDFLAGS_SUFFIX_posix := -ljvm -lverify, \ |
|
164 |
LDFLAGS_SUFFIX_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \ |
|
165 |
LDFLAGS_SUFFIX_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \ |
|
22594 | 166 |
LDFLAGS_SUFFIX_aix := $(LIBDL) $(BUILD_LIBFDLIBM) -lm,\ |
27565 | 167 |
LDFLAGS_SUFFIX_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/ -lfdlibm \ |
20547 | 168 |
-framework CoreFoundation \ |
169 |
-framework Foundation \ |
|
170 |
-framework Security -framework SystemConfiguration, \ |
|
171 |
LDFLAGS_SUFFIX_windows := -export:winFileHandleOpen -export:handleLseek \ |
|
27184 | 172 |
-export:getLastErrorString \ |
20547 | 173 |
jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \ |
174 |
shell32.lib delayimp.lib -DELAYLOAD:shell32.dll \ |
|
175 |
advapi32.lib, \ |
|
25859 | 176 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 177 |
RC_FLAGS := $(RC_FLAGS) \ |
178 |
-D "JDK_FNAME=java.dll" \ |
|
179 |
-D "JDK_INTERNAL_NAME=java" \ |
|
180 |
-D "JDK_FTYPE=0x2L", \ |
|
181 |
REORDER := $(LIBJAVA_REORDER), \ |
|
27565 | 182 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava, \ |
20547 | 183 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
13164 | 184 |
|
27565 | 185 |
TARGETS += $(BUILD_LIBJAVA) |
20547 | 186 |
|
187 |
$(BUILD_LIBJAVA): $(BUILD_LIBVERIFY) |
|
188 |
||
189 |
$(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
190 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
191 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
192 |
|
20547 | 193 |
BUILD_LIBZIP_EXCLUDES := |
194 |
ifeq ($(USE_EXTERNAL_LIBZ), true) |
|
24710
c019dc4104b2
8044725: Bug in zlib 1.2.5 prevents inflation of some gzipped files
sherman
parents:
23562
diff
changeset
|
195 |
LIBZIP_EXCLUDES += zlib-1.2.8 |
20547 | 196 |
endif |
197 |
||
198 |
BUILD_LIBZIP_REORDER := |
|
199 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
200 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
|
21805 | 201 |
BUILD_LIBZIP_REORDER := $(JDK_TOPDIR)/make/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 202 |
endif |
203 |
endif |
|
204 |
||
205 |
ifeq ($(LIBZIP_CAN_USE_MMAP), true) |
|
206 |
BUILD_LIBZIP_MMAP := -DUSE_MMAP |
|
207 |
endif |
|
208 |
||
209 |
$(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \ |
|
210 |
LIBRARY := zip, \ |
|
211 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
212 |
LANG := C, \ |
|
213 |
OPTIMIZATION := LOW, \ |
|
25859 | 214 |
SRC := $(JDK_TOPDIR)/src/java.base/share/native/libzip, \ |
20547 | 215 |
EXCLUDES := $(LIBZIP_EXCLUDES), \ |
216 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
217 |
$(ZLIB_CPPFLAGS) \ |
|
25859 | 218 |
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \ |
219 |
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \ |
|
27565 | 220 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.base, \ |
20547 | 221 |
CFLAGS_posix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \ |
21805 | 222 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libzip/mapfile-vers, \ |
20547 | 223 |
REORDER := $(BUILD_LIBZIP_REORDER), \ |
224 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
225 |
$(call SET_SHARED_LIBRARY_ORIGIN) \ |
|
226 |
$(EXPORT_ZIP_FUNCS), \ |
|
227 |
LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \ |
|
27565 | 228 |
-export:ZIP_ReadEntry -export:ZIP_GetNextEntry \ |
229 |
-export:ZIP_InflateFully -export:ZIP_CRC32 \ |
|
230 |
jvm.lib $(WIN_JAVA_LIB), \ |
|
20547 | 231 |
LDFLAGS_SUFFIX_linux := -ljvm -ljava $(LIBZ), \ |
232 |
LDFLAGS_SUFFIX_solaris := -ljvm -ljava $(LIBZ) -lc, \ |
|
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
233 |
LDFLAGS_SUFFIX_aix := -ljvm -ljava $(LIBZ),\ |
20547 | 234 |
LDFLAGS_SUFFIX_macosx := $(LIBZ) -ljava -ljvm, \ |
25859 | 235 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 236 |
RC_FLAGS := $(RC_FLAGS) \ |
237 |
-D "JDK_FNAME=zip.dll" \ |
|
238 |
-D "JDK_INTERNAL_NAME=zip" \ |
|
239 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 240 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libzip, \ |
20547 | 241 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
242 |
||
243 |
||
244 |
$(BUILD_LIBZIP): $(BUILD_LIBJAVA) |
|
245 |
||
27565 | 246 |
TARGETS += $(BUILD_LIBZIP) |
20547 | 247 |
|
248 |
########################################################################################## |
|
249 |
||
25859 | 250 |
BUILD_LIBJLI_SRC_DIRS := $(JDK_TOPDIR)/src/java.base/share/native/libjli \ |
251 |
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjli |
|
22951
5fd21112b2b6
8034043: Native methods for preferences API should not be in libjava
alanb
parents:
22941
diff
changeset
|
252 |
|
25859 | 253 |
LIBJLI_CFLAGS := $(CFLAGS_JDKLIB) |
20547 | 254 |
|
255 |
BUILD_LIBJLI_FILES := \ |
|
256 |
java.c \ |
|
257 |
splashscreen_stubs.c \ |
|
258 |
parse_manifest.c \ |
|
259 |
version_comp.c \ |
|
260 |
wildcard.c \ |
|
261 |
jli_util.c |
|
262 |
||
263 |
ifeq ($(JVM_VARIANT_ZERO), true) |
|
264 |
ERGO_FAMILY := zero |
|
265 |
else |
|
266 |
ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86) |
|
267 |
ERGO_FAMILY := i586 |
|
268 |
else |
|
269 |
ERGO_FAMILY := $(OPENJDK_TARGET_CPU_ARCH) |
|
270 |
endif |
|
271 |
endif |
|
272 |
||
273 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
25859 | 274 |
BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/java.base/macosx/native/libjli |
20547 | 275 |
BUILD_LIBJLI_FILES += java_md_common.c java_md_macosx.c |
276 |
||
277 |
BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c |
|
278 |
BUILD_LIBJLI_STATIC_java_md_macosx.c_CFLAGS := -x objective-c |
|
279 |
endif |
|
280 |
||
281 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
282 |
BUILD_LIBJLI_FILES += java_md.c \ |
|
283 |
cmdtoargs.c |
|
284 |
# Staticically link with c runtime on windows. |
|
285 |
LIBJLI_CFLAGS := $(filter-out -MD, $(LIBJLI_CFLAGS)) |
|
286 |
else ifneq ($(OPENJDK_TARGET_OS), macosx) |
|
287 |
||
288 |
BUILD_LIBJLI_FILES += java_md_common.c |
|
289 |
BUILD_LIBJLI_FILES += java_md_solinux.c ergo.c |
|
290 |
||
291 |
ERGO_ARCH_FILE = ergo_$(ERGO_FAMILY).c |
|
292 |
||
293 |
# if the architecture specific ergo file exists then |
|
294 |
# use it, else use the generic definitions from ergo.c |
|
25859 | 295 |
ifneq ($(wildcard $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjli/$(ERGO_ARCH_FILE)), ) |
20547 | 296 |
BUILD_LIBJLI_FILES += $(ERGO_ARCH_FILE) |
297 |
else # !ERGO_ARCH_FILE |
|
298 |
LIBJLI_CFLAGS += -DUSE_GENERIC_ERGO |
|
299 |
endif # ERGO_ARCH_FILE |
|
300 |
endif #WINDOWS |
|
301 |
||
25859 | 302 |
LIBJLI_CFLAGS += $(foreach dir, $(BUILD_LIBJLI_SRC_DIRS), -I$(dir)) |
303 |
||
20547 | 304 |
# Append defines depending on target platform |
305 |
LIBJLI_CFLAGS += $(OPENJDK_TARGET_CPU_JLI_CFLAGS) |
|
306 |
||
307 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
308 |
LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" |
|
309 |
endif |
|
310 |
||
311 |
ifneq ($(USE_EXTERNAL_LIBZ), true) |
|
25859 | 312 |
BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8 |
20547 | 313 |
LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS) |
314 |
BUILD_LIBJLI_FILES += \ |
|
315 |
inflate.c \ |
|
316 |
inftrees.c \ |
|
317 |
inffast.c \ |
|
318 |
zadler32.c \ |
|
319 |
zcrc32.c \ |
|
320 |
zutil.c |
|
321 |
endif |
|
322 |
||
323 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
324 |
LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE) |
|
325 |
else |
|
326 |
LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)/jli |
|
327 |
endif |
|
328 |
||
329 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \ |
|
330 |
LIBRARY := jli, \ |
|
331 |
OUTPUT_DIR := $(LIBJLI_OUTPUT_DIR), \ |
|
332 |
SRC := $(BUILD_LIBJLI_SRC_DIRS), \ |
|
333 |
INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \ |
|
334 |
LANG := C, \ |
|
335 |
OPTIMIZATION := HIGH, \ |
|
336 |
CFLAGS := $(LIBJLI_CFLAGS), \ |
|
21805 | 337 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjli/mapfile-vers, \ |
20547 | 338 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
339 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
340 |
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ |
|
341 |
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ |
|
342 |
LDFLAGS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \ |
|
343 |
LDFLAGS_SUFFIX_solaris := $(LIBZ) $(LIBDL) -lc, \ |
|
21606 | 344 |
LDFLAGS_SUFFIX_linux := $(LIBZ) $(LIBDL) -lc -lpthread, \ |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
345 |
LDFLAGS_SUFFIX_aix := $(LIBZ) $(LIBDL),\ |
20547 | 346 |
LDFLAGS_SUFFIX_macosx := $(LIBZ), \ |
347 |
LDFLAGS_SUFFIX_windows := \ |
|
348 |
-export:JLI_Launch \ |
|
349 |
-export:JLI_ManifestIterate \ |
|
350 |
-export:JLI_SetTraceLauncher \ |
|
351 |
-export:JLI_ReportErrorMessage \ |
|
352 |
-export:JLI_ReportErrorMessageSys \ |
|
353 |
-export:JLI_ReportMessage \ |
|
354 |
-export:JLI_ReportExceptionDescription \ |
|
355 |
-export:JLI_MemAlloc \ |
|
356 |
-export:JLI_CmdToArgs \ |
|
357 |
-export:JLI_GetStdArgc \ |
|
358 |
-export:JLI_GetStdArgs \ |
|
359 |
advapi32.lib \ |
|
360 |
comctl32.lib \ |
|
361 |
user32.lib, \ |
|
25859 | 362 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 363 |
RC_FLAGS := $(RC_FLAGS) \ |
364 |
-D "JDK_FNAME=jli.dll" \ |
|
365 |
-D "JDK_INTERNAL_NAME=jli" \ |
|
366 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 367 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli, \ |
20547 | 368 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
369 |
||
27565 | 370 |
TARGETS += $(BUILD_LIBJLI) |
20547 | 371 |
|
372 |
# On windows, the static library has the same suffix as the import library created by |
|
373 |
# with the shared library, so the static library is given a different name. No harm |
|
374 |
# in doing it for all platform to reduce complexity. |
|
375 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
376 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \ |
|
377 |
STATIC_LIBRARY := jli_static, \ |
|
27565 | 378 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \ |
20547 | 379 |
SRC := $(BUILD_LIBJLI_SRC_DIRS), \ |
380 |
INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \ |
|
381 |
LANG := C, \ |
|
382 |
OPTIMIZATION := HIGH, \ |
|
383 |
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \ |
|
384 |
ARFLAGS := $(ARFLAGS), \ |
|
27565 | 385 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \ |
20547 | 386 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
387 |
||
27565 | 388 |
TARGETS += $(BUILD_LIBJLI_STATIC) |
20547 | 389 |
|
390 |
else ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
391 |
# |
|
392 |
# On macosx they do partial (incremental) linking of libjli_static.a |
|
393 |
# code it here...rather than add support to NativeCompilation |
|
394 |
# as this is first time I see it |
|
395 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \ |
|
396 |
LIBRARY := jli_static, \ |
|
27565 | 397 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \ |
20547 | 398 |
SRC := $(BUILD_LIBJLI_SRC_DIRS), \ |
399 |
INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \ |
|
400 |
LANG := C, \ |
|
401 |
OPTIMIZATION := HIGH, \ |
|
402 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \ |
|
403 |
LDFLAGS := -nostdlib -r, \ |
|
27565 | 404 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \ |
20547 | 405 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
406 |
||
27565 | 407 |
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a: $(BUILD_LIBJLI_STATIC) |
20547 | 408 |
$(call install-file) |
409 |
||
27565 | 410 |
TARGETS += $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
411 |
|
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
412 |
else ifeq ($(OPENJDK_TARGET_OS), aix) |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
413 |
# AIX also requires a static libjli because the compiler doesn't support '-rpath' |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
414 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC,\ |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
415 |
STATIC_LIBRARY:=jli_static,\ |
27565 | 416 |
OUTPUT_DIR:=$(SUPPORT_OUTPUTDIR)/native/$(MODULE),\ |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
417 |
SRC:=$(BUILD_LIBJLI_SRC_DIRS),\ |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
418 |
INCLUDE_FILES:=$(BUILD_LIBJLI_FILES),\ |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
419 |
LANG:=C,\ |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
420 |
OPTIMIZATION:=HIGH, \ |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
421 |
CFLAGS:=$(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS),\ |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
422 |
ARFLAGS:=$(ARFLAGS),\ |
27565 | 423 |
OBJECT_DIR:=$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static)) |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
424 |
|
27565 | 425 |
TARGETS += $(BUILD_LIBJLI_STATIC) |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
426 |
|
20547 | 427 |
endif |
25859 | 428 |