author | duke |
Wed, 05 Jul 2017 20:34:59 +0200 | |
changeset 30705 | 9104b426a3e8 |
parent 30434 | 6b881118c93b |
child 30784 | 28105f71beb2 |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
2 |
# Copyright (c) 2011, 2015, 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 |
########################################################################################## |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
29 |
# libfdlibm is statically linked with libjava below and not delivered into the |
26191
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 |
OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \ |
25859 | 47 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \ |
20547 | 48 |
CFLAGS_windows_debug := -DLOGGING, \ |
22594 | 49 |
CFLAGS_aix := -qfloat=nomaf, \ |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
50 |
DISABLED_WARNINGS_gcc := sign-compare, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
51 |
DISABLED_WARNINGS_microsoft := 4146 4244 4018, \ |
20547 | 52 |
ARFLAGS := $(ARFLAGS), \ |
27565 | 53 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \ |
20547 | 54 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
13164 | 55 |
|
12892 | 56 |
else |
14855
d104ff4d4bb9
8005178: build-infra: Dependency on libfdlibm on mac is broken
erikj
parents:
14789
diff
changeset
|
57 |
|
20890 | 58 |
# On macosx the old build does partial (incremental) linking of fdlibm instead of |
59 |
# a plain static library. |
|
20547 | 60 |
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC, \ |
61 |
LIBRARY := fdlibm, \ |
|
27565 | 62 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \ |
25859 | 63 |
SRC := $(LIBFDLIBM_SRC), \ |
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 |
|
13164 | 77 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
20547 | 78 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
21805 | 79 |
BUILD_LIBVERIFY_REORDER := $(JDK_TOPDIR)/make/mapfiles/libverify/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 80 |
endif |
13164 | 81 |
endif |
82 |
||
20547 | 83 |
LIBVERIFY_OPTIMIZATION := HIGH |
84 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), ) |
|
85 |
ifeq ($(ENABLE_DEBUG_SYMBOLS), true) |
|
86 |
LIBVERIFY_OPTIMIZATION := LOW |
|
87 |
endif |
|
13702 | 88 |
endif |
89 |
||
20547 | 90 |
$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \ |
91 |
LIBRARY := verify, \ |
|
92 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
25859 | 93 |
SRC := $(JDK_TOPDIR)/src/java.base/share/native/libverify, \ |
20547 | 94 |
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \ |
95 |
CFLAGS := $(CFLAGS_JDKLIB), \ |
|
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
96 |
DISABLED_WARNINGS_microsoft := 4244 4267, \ |
21805 | 97 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libverify/mapfile-vers, \ |
20547 | 98 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
99 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
27736
8c9bd4be4a86
8058631: Rename posix to unix in build system to match file name changes
ihse
parents:
27186
diff
changeset
|
100 |
LDFLAGS_SUFFIX_unix := -ljvm -lc, \ |
20547 | 101 |
LDFLAGS_SUFFIX_windows := jvm.lib, \ |
25859 | 102 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 103 |
RC_FLAGS := $(RC_FLAGS) \ |
104 |
-D "JDK_FNAME=verify.dll" \ |
|
105 |
-D "JDK_INTERNAL_NAME=verify" \ |
|
106 |
-D "JDK_FTYPE=0x2L", \ |
|
107 |
REORDER := $(BUILD_LIBVERIFY_REORDER), \ |
|
27565 | 108 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify, \ |
20547 | 109 |
DEBUG_SYMBOLS := true)) |
13164 | 110 |
|
27565 | 111 |
TARGETS += $(BUILD_LIBVERIFY) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
112 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
113 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
114 |
|
25859 | 115 |
LIBJAVA_SRC_DIRS := $(call FindSrcDirsForLib, java.base, java) |
20547 | 116 |
|
25859 | 117 |
LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \ |
118 |
-I$(JDK_TOPDIR)/src/java.base/share/native/libfdlibm \ |
|
27565 | 119 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \ |
20547 | 120 |
-DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"' |
13164 | 121 |
|
122 |
LIBJAVA_CFLAGS += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \ |
|
20547 | 123 |
-DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \ |
124 |
-DJDK_MICRO_VERSION='"$(JDK_MICRO_VERSION)"' \ |
|
125 |
-DJDK_BUILD_NUMBER='"$(JDK_BUILD_NUMBER)"' |
|
126 |
||
127 |
ifneq (, $(JDK_UPDATE_VERSION)) |
|
128 |
LIBJAVA_CFLAGS += -DJDK_UPDATE_VERSION='"$(JDK_UPDATE_VERSION)"' |
|
13164 | 129 |
endif |
130 |
||
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
131 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
20547 | 132 |
BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c |
133 |
BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c |
|
13164 | 134 |
endif |
135 |
||
136 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
20547 | 137 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
21805 | 138 |
LIBJAVA_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 139 |
endif |
13164 | 140 |
endif |
141 |
||
20547 | 142 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \ |
143 |
LIBRARY := java, \ |
|
144 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
145 |
SRC := $(LIBJAVA_SRC_DIRS), \ |
|
146 |
OPTIMIZATION := HIGH, \ |
|
147 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
148 |
$(LIBJAVA_CFLAGS), \ |
|
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
149 |
DISABLED_WARNINGS_gcc := type-limits format-nonliteral, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
150 |
DISABLED_WARNINGS_clang := int-conversion, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
151 |
DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \ |
30434 | 152 |
DISABLED_WARNINGS_microsoft := 4022 4267 4996, \ |
153 |
WARNINGS_AS_ERRORS_solstudio := false, \ |
|
21805 | 154 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers, \ |
20547 | 155 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
156 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
27736
8c9bd4be4a86
8058631: Rename posix to unix in build system to match file name changes
ihse
parents:
27186
diff
changeset
|
157 |
LDFLAGS_SUFFIX_unix := -ljvm -lverify, \ |
20547 | 158 |
LDFLAGS_SUFFIX_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \ |
159 |
LDFLAGS_SUFFIX_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \ |
|
22594 | 160 |
LDFLAGS_SUFFIX_aix := $(LIBDL) $(BUILD_LIBFDLIBM) -lm,\ |
27565 | 161 |
LDFLAGS_SUFFIX_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/ -lfdlibm \ |
20547 | 162 |
-framework CoreFoundation \ |
163 |
-framework Foundation \ |
|
164 |
-framework Security -framework SystemConfiguration, \ |
|
165 |
LDFLAGS_SUFFIX_windows := -export:winFileHandleOpen -export:handleLseek \ |
|
27184 | 166 |
-export:getLastErrorString \ |
20547 | 167 |
jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \ |
168 |
shell32.lib delayimp.lib -DELAYLOAD:shell32.dll \ |
|
169 |
advapi32.lib, \ |
|
25859 | 170 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 171 |
RC_FLAGS := $(RC_FLAGS) \ |
172 |
-D "JDK_FNAME=java.dll" \ |
|
173 |
-D "JDK_INTERNAL_NAME=java" \ |
|
174 |
-D "JDK_FTYPE=0x2L", \ |
|
175 |
REORDER := $(LIBJAVA_REORDER), \ |
|
27565 | 176 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava, \ |
20547 | 177 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
13164 | 178 |
|
27565 | 179 |
TARGETS += $(BUILD_LIBJAVA) |
20547 | 180 |
|
181 |
$(BUILD_LIBJAVA): $(BUILD_LIBVERIFY) |
|
182 |
||
183 |
$(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
184 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
185 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
186 |
|
20547 | 187 |
BUILD_LIBZIP_EXCLUDES := |
188 |
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
|
189 |
LIBZIP_EXCLUDES += zlib-1.2.8 |
20547 | 190 |
endif |
191 |
||
192 |
BUILD_LIBZIP_REORDER := |
|
193 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
194 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
|
21805 | 195 |
BUILD_LIBZIP_REORDER := $(JDK_TOPDIR)/make/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 196 |
endif |
197 |
endif |
|
198 |
||
199 |
ifeq ($(LIBZIP_CAN_USE_MMAP), true) |
|
200 |
BUILD_LIBZIP_MMAP := -DUSE_MMAP |
|
201 |
endif |
|
202 |
||
203 |
$(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \ |
|
204 |
LIBRARY := zip, \ |
|
205 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
206 |
OPTIMIZATION := LOW, \ |
|
25859 | 207 |
SRC := $(JDK_TOPDIR)/src/java.base/share/native/libzip, \ |
20547 | 208 |
EXCLUDES := $(LIBZIP_EXCLUDES), \ |
209 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
210 |
$(ZLIB_CPPFLAGS) \ |
|
25859 | 211 |
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \ |
27736
8c9bd4be4a86
8058631: Rename posix to unix in build system to match file name changes
ihse
parents:
27186
diff
changeset
|
212 |
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \ |
27565 | 213 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.base, \ |
27736
8c9bd4be4a86
8058631: Rename posix to unix in build system to match file name changes
ihse
parents:
27186
diff
changeset
|
214 |
CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \ |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
215 |
DISABLED_WARNINGS_gcc := parentheses, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
216 |
DISABLED_WARNINGS_clang := dangling-else, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
217 |
DISABLED_WARNINGS_microsoft := 4267, \ |
21805 | 218 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libzip/mapfile-vers, \ |
20547 | 219 |
REORDER := $(BUILD_LIBZIP_REORDER), \ |
220 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
221 |
$(call SET_SHARED_LIBRARY_ORIGIN) \ |
|
222 |
$(EXPORT_ZIP_FUNCS), \ |
|
223 |
LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \ |
|
27565 | 224 |
-export:ZIP_ReadEntry -export:ZIP_GetNextEntry \ |
225 |
-export:ZIP_InflateFully -export:ZIP_CRC32 \ |
|
226 |
jvm.lib $(WIN_JAVA_LIB), \ |
|
20547 | 227 |
LDFLAGS_SUFFIX_linux := -ljvm -ljava $(LIBZ), \ |
228 |
LDFLAGS_SUFFIX_solaris := -ljvm -ljava $(LIBZ) -lc, \ |
|
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
229 |
LDFLAGS_SUFFIX_aix := -ljvm -ljava $(LIBZ),\ |
20547 | 230 |
LDFLAGS_SUFFIX_macosx := $(LIBZ) -ljava -ljvm, \ |
25859 | 231 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 232 |
RC_FLAGS := $(RC_FLAGS) \ |
233 |
-D "JDK_FNAME=zip.dll" \ |
|
234 |
-D "JDK_INTERNAL_NAME=zip" \ |
|
235 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 236 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libzip, \ |
20547 | 237 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
238 |
||
239 |
||
240 |
$(BUILD_LIBZIP): $(BUILD_LIBJAVA) |
|
241 |
||
27565 | 242 |
TARGETS += $(BUILD_LIBZIP) |
20547 | 243 |
|
244 |
########################################################################################## |
|
245 |
||
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
246 |
LIBJLI_SRC_DIRS := $(call FindSrcDirsForLib, java.base, jli) |
22951
5fd21112b2b6
8034043: Native methods for preferences API should not be in libjava
alanb
parents:
22941
diff
changeset
|
247 |
|
25859 | 248 |
LIBJLI_CFLAGS := $(CFLAGS_JDKLIB) |
20547 | 249 |
|
250 |
ifeq ($(JVM_VARIANT_ZERO), true) |
|
251 |
ERGO_FAMILY := zero |
|
252 |
else |
|
253 |
ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86) |
|
254 |
ERGO_FAMILY := i586 |
|
255 |
else |
|
256 |
ERGO_FAMILY := $(OPENJDK_TARGET_CPU_ARCH) |
|
257 |
endif |
|
258 |
endif |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
259 |
LIBJLI_ALL_ERGO := $(wildcard $(addsuffix /ergo_*.c, $(LIBJLI_SRC_DIRS))) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
260 |
LIBJLI_EXCLUDE_ERGO := $(filter-out %/ergo_$(ERGO_FAMILY).c, $(LIBJLI_ALL_ERGO)) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
261 |
# If all specialized ergo files are excluded, use generic ergo |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
262 |
ifeq ($(LIBJLI_ALL_ERGO), $(LIBJLI_EXCLUDE_ERGO)) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
263 |
LIBJLI_CFLAGS += -DUSE_GENERIC_ERGO |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
264 |
endif |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
265 |
LIBJLI_EXCLUDE_FILES += $(notdir $(LIBJLI_EXCLUDE_ERGO)) |
20547 | 266 |
|
267 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
29742
b73f38796859
8074840: Resolve disabled warnings for libjli and libjli_static
mikael
parents:
29374
diff
changeset
|
268 |
LIBJLI_EXCLUDE_FILES += java_md_solinux.c ergo.c ergo_i586.c |
20547 | 269 |
|
270 |
BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c |
|
271 |
BUILD_LIBJLI_STATIC_java_md_macosx.c_CFLAGS := -x objective-c |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
272 |
|
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
273 |
LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" |
20547 | 274 |
endif |
275 |
||
276 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
277 |
# Staticically link with c runtime on windows. |
|
278 |
LIBJLI_CFLAGS := $(filter-out -MD, $(LIBJLI_CFLAGS)) |
|
279 |
LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE) |
|
28984
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
280 |
# Supply the name of the C runtime lib. |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
281 |
LIBJLI_CFLAGS += -DMSVCR_DLL_NAME='"$(notdir $(MSVCR_DLL))"' |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
282 |
ifneq ($(MSVCP_DLL), ) |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
283 |
LIBJLI_CFLAGS += -DMSVCP_DLL_NAME='"$(notdir $(MSVCP_DLL))"' |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
284 |
endif |
20547 | 285 |
else |
286 |
LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)/jli |
|
287 |
endif |
|
288 |
||
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
289 |
LIBJLI_CFLAGS += $(addprefix -I, $(LIBJLI_SRC_DIRS)) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
290 |
|
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
291 |
# Append defines depending on target platform |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
292 |
LIBJLI_CFLAGS += $(OPENJDK_TARGET_CPU_JLI_CFLAGS) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
293 |
|
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
294 |
ifneq ($(USE_EXTERNAL_LIBZ), true) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
295 |
LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
296 |
LIBJLI_EXTRA_FILES += \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
297 |
$(addprefix $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8/, \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
298 |
inflate.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
299 |
inftrees.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
300 |
inffast.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
301 |
zadler32.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
302 |
zcrc32.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
303 |
zutil.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
304 |
) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
305 |
endif |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
306 |
|
20547 | 307 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \ |
308 |
LIBRARY := jli, \ |
|
309 |
OUTPUT_DIR := $(LIBJLI_OUTPUT_DIR), \ |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
310 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
311 |
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
312 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
20547 | 313 |
OPTIMIZATION := HIGH, \ |
314 |
CFLAGS := $(LIBJLI_CFLAGS), \ |
|
29742
b73f38796859
8074840: Resolve disabled warnings for libjli and libjli_static
mikael
parents:
29374
diff
changeset
|
315 |
DISABLED_WARNINGS_solstudio := E_ASM_DISABLES_OPTIMIZATION, \ |
21805 | 316 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjli/mapfile-vers, \ |
20547 | 317 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
318 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
319 |
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ |
|
320 |
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ |
|
321 |
LDFLAGS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \ |
|
322 |
LDFLAGS_SUFFIX_solaris := $(LIBZ) $(LIBDL) -lc, \ |
|
21606 | 323 |
LDFLAGS_SUFFIX_linux := $(LIBZ) $(LIBDL) -lc -lpthread, \ |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
324 |
LDFLAGS_SUFFIX_aix := $(LIBZ) $(LIBDL),\ |
20547 | 325 |
LDFLAGS_SUFFIX_macosx := $(LIBZ), \ |
326 |
LDFLAGS_SUFFIX_windows := \ |
|
327 |
-export:JLI_Launch \ |
|
328 |
-export:JLI_ManifestIterate \ |
|
329 |
-export:JLI_SetTraceLauncher \ |
|
330 |
-export:JLI_ReportErrorMessage \ |
|
331 |
-export:JLI_ReportErrorMessageSys \ |
|
332 |
-export:JLI_ReportMessage \ |
|
333 |
-export:JLI_ReportExceptionDescription \ |
|
334 |
-export:JLI_MemAlloc \ |
|
335 |
-export:JLI_CmdToArgs \ |
|
336 |
-export:JLI_GetStdArgc \ |
|
337 |
-export:JLI_GetStdArgs \ |
|
338 |
advapi32.lib \ |
|
339 |
comctl32.lib \ |
|
340 |
user32.lib, \ |
|
25859 | 341 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 342 |
RC_FLAGS := $(RC_FLAGS) \ |
343 |
-D "JDK_FNAME=jli.dll" \ |
|
344 |
-D "JDK_INTERNAL_NAME=jli" \ |
|
345 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 346 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli, \ |
20547 | 347 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
348 |
||
27565 | 349 |
TARGETS += $(BUILD_LIBJLI) |
20547 | 350 |
|
351 |
# On windows, the static library has the same suffix as the import library created by |
|
352 |
# with the shared library, so the static library is given a different name. No harm |
|
353 |
# in doing it for all platform to reduce complexity. |
|
354 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
355 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \ |
|
356 |
STATIC_LIBRARY := jli_static, \ |
|
27565 | 357 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \ |
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
358 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
359 |
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
360 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
20547 | 361 |
OPTIMIZATION := HIGH, \ |
362 |
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \ |
|
363 |
ARFLAGS := $(ARFLAGS), \ |
|
27565 | 364 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \ |
20547 | 365 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
366 |
||
27565 | 367 |
TARGETS += $(BUILD_LIBJLI_STATIC) |
20547 | 368 |
|
369 |
else ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
370 |
# |
|
371 |
# On macosx they do partial (incremental) linking of libjli_static.a |
|
372 |
# code it here...rather than add support to NativeCompilation |
|
373 |
# as this is first time I see it |
|
374 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \ |
|
375 |
LIBRARY := jli_static, \ |
|
27565 | 376 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \ |
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
377 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
378 |
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
379 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
20547 | 380 |
OPTIMIZATION := HIGH, \ |
381 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \ |
|
382 |
LDFLAGS := -nostdlib -r, \ |
|
27565 | 383 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \ |
20547 | 384 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
385 |
||
27565 | 386 |
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a: $(BUILD_LIBJLI_STATIC) |
20547 | 387 |
$(call install-file) |
388 |
||
27565 | 389 |
TARGETS += $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
390 |
|
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
391 |
else ifeq ($(OPENJDK_TARGET_OS), aix) |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
392 |
# AIX also requires a static libjli because the compiler doesn't support '-rpath' |
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
393 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
394 |
STATIC_LIBRARY := jli_static, \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
395 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
396 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
397 |
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
398 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
399 |
OPTIMIZATION := HIGH, \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
400 |
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
401 |
ARFLAGS := $(ARFLAGS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
402 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static)) |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
403 |
|
27565 | 404 |
TARGETS += $(BUILD_LIBJLI_STATIC) |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
405 |
|
20547 | 406 |
endif |