author | iris |
Tue, 08 Sep 2015 10:25:11 -0700 | |
changeset 34000 | a5c49d5a7d7f |
parent 32267 | 4e96a9ee01b1 |
parent 33989 | 88dca824e58c |
child 34001 | 40bb086ea060 |
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 |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
122 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
20547 | 123 |
BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c |
124 |
BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c |
|
13164 | 125 |
endif |
126 |
||
127 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
20547 | 128 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
21805 | 129 |
LIBJAVA_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 130 |
endif |
13164 | 131 |
endif |
132 |
||
20547 | 133 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \ |
134 |
LIBRARY := java, \ |
|
135 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
136 |
SRC := $(LIBJAVA_SRC_DIRS), \ |
|
137 |
OPTIMIZATION := HIGH, \ |
|
138 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
139 |
$(LIBJAVA_CFLAGS), \ |
|
33984
2333676816eb
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
30784
diff
changeset
|
140 |
System.c_CFLAGS := $(VERSION_CFLAGS), \ |
2333676816eb
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
30784
diff
changeset
|
141 |
jdk_util.c_CFLAGS := $(VERSION_CFLAGS), \ |
21805 | 142 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers, \ |
20547 | 143 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
144 |
$(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
|
145 |
LDFLAGS_SUFFIX_unix := -ljvm -lverify, \ |
20547 | 146 |
LDFLAGS_SUFFIX_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \ |
147 |
LDFLAGS_SUFFIX_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \ |
|
22594 | 148 |
LDFLAGS_SUFFIX_aix := $(LIBDL) $(BUILD_LIBFDLIBM) -lm,\ |
27565 | 149 |
LDFLAGS_SUFFIX_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/ -lfdlibm \ |
20547 | 150 |
-framework CoreFoundation \ |
151 |
-framework Foundation \ |
|
152 |
-framework Security -framework SystemConfiguration, \ |
|
153 |
LDFLAGS_SUFFIX_windows := -export:winFileHandleOpen -export:handleLseek \ |
|
27184 | 154 |
-export:getLastErrorString \ |
20547 | 155 |
jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \ |
156 |
shell32.lib delayimp.lib -DELAYLOAD:shell32.dll \ |
|
31246
dfc58fd4feec
8066504: GetVersionEx in java.base/windows/native/libjava/java_props_md.c might not get correct Windows version 0
rriggs
parents:
30784
diff
changeset
|
157 |
advapi32.lib version.lib, \ |
25859 | 158 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 159 |
RC_FLAGS := $(RC_FLAGS) \ |
160 |
-D "JDK_FNAME=java.dll" \ |
|
161 |
-D "JDK_INTERNAL_NAME=java" \ |
|
162 |
-D "JDK_FTYPE=0x2L", \ |
|
163 |
REORDER := $(LIBJAVA_REORDER), \ |
|
27565 | 164 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava, \ |
20547 | 165 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
13164 | 166 |
|
27565 | 167 |
TARGETS += $(BUILD_LIBJAVA) |
20547 | 168 |
|
169 |
$(BUILD_LIBJAVA): $(BUILD_LIBVERIFY) |
|
170 |
||
171 |
$(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
172 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
173 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
174 |
|
20547 | 175 |
BUILD_LIBZIP_EXCLUDES := |
176 |
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
|
177 |
LIBZIP_EXCLUDES += zlib-1.2.8 |
20547 | 178 |
endif |
179 |
||
180 |
BUILD_LIBZIP_REORDER := |
|
181 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
182 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
|
21805 | 183 |
BUILD_LIBZIP_REORDER := $(JDK_TOPDIR)/make/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 184 |
endif |
185 |
endif |
|
186 |
||
187 |
ifeq ($(LIBZIP_CAN_USE_MMAP), true) |
|
188 |
BUILD_LIBZIP_MMAP := -DUSE_MMAP |
|
189 |
endif |
|
190 |
||
191 |
$(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \ |
|
192 |
LIBRARY := zip, \ |
|
193 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
194 |
OPTIMIZATION := LOW, \ |
|
25859 | 195 |
SRC := $(JDK_TOPDIR)/src/java.base/share/native/libzip, \ |
20547 | 196 |
EXCLUDES := $(LIBZIP_EXCLUDES), \ |
197 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
198 |
$(ZLIB_CPPFLAGS) \ |
|
25859 | 199 |
-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
|
200 |
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \ |
27565 | 201 |
-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
|
202 |
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
|
203 |
DISABLED_WARNINGS_gcc := parentheses, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
204 |
DISABLED_WARNINGS_clang := dangling-else, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
205 |
DISABLED_WARNINGS_microsoft := 4267, \ |
21805 | 206 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libzip/mapfile-vers, \ |
20547 | 207 |
REORDER := $(BUILD_LIBZIP_REORDER), \ |
208 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
209 |
$(call SET_SHARED_LIBRARY_ORIGIN) \ |
|
210 |
$(EXPORT_ZIP_FUNCS), \ |
|
211 |
LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \ |
|
27565 | 212 |
-export:ZIP_ReadEntry -export:ZIP_GetNextEntry \ |
213 |
-export:ZIP_InflateFully -export:ZIP_CRC32 \ |
|
214 |
jvm.lib $(WIN_JAVA_LIB), \ |
|
20547 | 215 |
LDFLAGS_SUFFIX_linux := -ljvm -ljava $(LIBZ), \ |
216 |
LDFLAGS_SUFFIX_solaris := -ljvm -ljava $(LIBZ) -lc, \ |
|
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
217 |
LDFLAGS_SUFFIX_aix := -ljvm -ljava $(LIBZ),\ |
20547 | 218 |
LDFLAGS_SUFFIX_macosx := $(LIBZ) -ljava -ljvm, \ |
25859 | 219 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 220 |
RC_FLAGS := $(RC_FLAGS) \ |
221 |
-D "JDK_FNAME=zip.dll" \ |
|
222 |
-D "JDK_INTERNAL_NAME=zip" \ |
|
223 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 224 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libzip, \ |
20547 | 225 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
226 |
||
227 |
||
228 |
$(BUILD_LIBZIP): $(BUILD_LIBJAVA) |
|
229 |
||
27565 | 230 |
TARGETS += $(BUILD_LIBZIP) |
20547 | 231 |
|
232 |
########################################################################################## |
|
233 |
||
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
234 |
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
|
235 |
|
25859 | 236 |
LIBJLI_CFLAGS := $(CFLAGS_JDKLIB) |
20547 | 237 |
|
238 |
ifeq ($(JVM_VARIANT_ZERO), true) |
|
239 |
ERGO_FAMILY := zero |
|
240 |
else |
|
241 |
ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86) |
|
242 |
ERGO_FAMILY := i586 |
|
243 |
else |
|
244 |
ERGO_FAMILY := $(OPENJDK_TARGET_CPU_ARCH) |
|
245 |
endif |
|
246 |
endif |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
247 |
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
|
248 |
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
|
249 |
# 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
|
250 |
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
|
251 |
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
|
252 |
endif |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
253 |
LIBJLI_EXCLUDE_FILES += $(notdir $(LIBJLI_EXCLUDE_ERGO)) |
20547 | 254 |
|
255 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
29742
b73f38796859
8074840: Resolve disabled warnings for libjli and libjli_static
mikael
parents:
29374
diff
changeset
|
256 |
LIBJLI_EXCLUDE_FILES += java_md_solinux.c ergo.c ergo_i586.c |
20547 | 257 |
|
258 |
BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c |
|
259 |
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
|
260 |
|
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
261 |
LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" |
20547 | 262 |
endif |
263 |
||
264 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
265 |
# Staticically link with c runtime on windows. |
|
266 |
LIBJLI_CFLAGS := $(filter-out -MD, $(LIBJLI_CFLAGS)) |
|
267 |
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
|
268 |
# 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
|
269 |
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
|
270 |
ifneq ($(MSVCP_DLL), ) |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
271 |
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
|
272 |
endif |
20547 | 273 |
else |
274 |
LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)/jli |
|
275 |
endif |
|
276 |
||
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
277 |
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
|
278 |
|
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
279 |
# 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
|
280 |
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
|
281 |
|
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
282 |
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
|
283 |
LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
284 |
LIBJLI_EXTRA_FILES += \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
285 |
$(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
|
286 |
inflate.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
287 |
inftrees.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
288 |
inffast.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
289 |
zadler32.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
290 |
zcrc32.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
291 |
zutil.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
292 |
) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
293 |
endif |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
294 |
|
20547 | 295 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \ |
296 |
LIBRARY := jli, \ |
|
297 |
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
|
298 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
299 |
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
|
300 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
20547 | 301 |
OPTIMIZATION := HIGH, \ |
302 |
CFLAGS := $(LIBJLI_CFLAGS), \ |
|
29742
b73f38796859
8074840: Resolve disabled warnings for libjli and libjli_static
mikael
parents:
29374
diff
changeset
|
303 |
DISABLED_WARNINGS_solstudio := E_ASM_DISABLES_OPTIMIZATION, \ |
21805 | 304 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjli/mapfile-vers, \ |
20547 | 305 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
306 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
307 |
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ |
|
308 |
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ |
|
309 |
LDFLAGS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \ |
|
310 |
LDFLAGS_SUFFIX_solaris := $(LIBZ) $(LIBDL) -lc, \ |
|
21606 | 311 |
LDFLAGS_SUFFIX_linux := $(LIBZ) $(LIBDL) -lc -lpthread, \ |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
312 |
LDFLAGS_SUFFIX_aix := $(LIBZ) $(LIBDL),\ |
20547 | 313 |
LDFLAGS_SUFFIX_macosx := $(LIBZ), \ |
314 |
LDFLAGS_SUFFIX_windows := \ |
|
315 |
-export:JLI_Launch \ |
|
316 |
-export:JLI_ManifestIterate \ |
|
317 |
-export:JLI_SetTraceLauncher \ |
|
318 |
-export:JLI_ReportErrorMessage \ |
|
319 |
-export:JLI_ReportErrorMessageSys \ |
|
320 |
-export:JLI_ReportMessage \ |
|
321 |
-export:JLI_ReportExceptionDescription \ |
|
322 |
-export:JLI_MemAlloc \ |
|
323 |
-export:JLI_CmdToArgs \ |
|
324 |
-export:JLI_GetStdArgc \ |
|
325 |
-export:JLI_GetStdArgs \ |
|
32267
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
326 |
-export:JLI_List_new \ |
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
327 |
-export:JLI_List_add \ |
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
328 |
-export:JLI_StringDup \ |
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
329 |
-export:JLI_MemFree \ |
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
330 |
-export:JLI_InitArgProcessing \ |
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
331 |
-export:JLI_PreprocessArg \ |
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
332 |
-export:JLI_GetAppArgIndex \ |
20547 | 333 |
advapi32.lib \ |
334 |
comctl32.lib \ |
|
335 |
user32.lib, \ |
|
25859 | 336 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 337 |
RC_FLAGS := $(RC_FLAGS) \ |
338 |
-D "JDK_FNAME=jli.dll" \ |
|
339 |
-D "JDK_INTERNAL_NAME=jli" \ |
|
340 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 341 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli, \ |
20547 | 342 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
343 |
||
27565 | 344 |
TARGETS += $(BUILD_LIBJLI) |
20547 | 345 |
|
346 |
# On windows, the static library has the same suffix as the import library created by |
|
347 |
# with the shared library, so the static library is given a different name. No harm |
|
348 |
# in doing it for all platform to reduce complexity. |
|
349 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
350 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \ |
|
351 |
STATIC_LIBRARY := jli_static, \ |
|
27565 | 352 |
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
|
353 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
354 |
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
|
355 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
20547 | 356 |
OPTIMIZATION := HIGH, \ |
357 |
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \ |
|
358 |
ARFLAGS := $(ARFLAGS), \ |
|
27565 | 359 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \ |
20547 | 360 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
361 |
||
27565 | 362 |
TARGETS += $(BUILD_LIBJLI_STATIC) |
20547 | 363 |
|
364 |
else ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
365 |
# |
|
366 |
# On macosx they do partial (incremental) linking of libjli_static.a |
|
367 |
# code it here...rather than add support to NativeCompilation |
|
368 |
# as this is first time I see it |
|
369 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \ |
|
370 |
LIBRARY := jli_static, \ |
|
27565 | 371 |
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
|
372 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
373 |
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
|
374 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
20547 | 375 |
OPTIMIZATION := HIGH, \ |
376 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \ |
|
377 |
LDFLAGS := -nostdlib -r, \ |
|
27565 | 378 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \ |
20547 | 379 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
380 |
||
27565 | 381 |
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a: $(BUILD_LIBJLI_STATIC) |
20547 | 382 |
$(call install-file) |
383 |
||
27565 | 384 |
TARGETS += $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
385 |
|
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
386 |
else ifeq ($(OPENJDK_TARGET_OS), aix) |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
387 |
# 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
|
388 |
$(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
|
389 |
STATIC_LIBRARY := jli_static, \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
390 |
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
|
391 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
392 |
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
|
393 |
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
|
394 |
OPTIMIZATION := HIGH, \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
395 |
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
|
396 |
ARFLAGS := $(ARFLAGS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
397 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static)) |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
398 |
|
27565 | 399 |
TARGETS += $(BUILD_LIBJLI_STATIC) |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
400 |
|
20547 | 401 |
endif |