author | ihse |
Mon, 22 Feb 2016 11:23:03 +0100 | |
changeset 36110 | 91a3a6df36ec |
parent 35706 | c6bc87214e4c |
child 36118 | b59ca256a01a |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
36110
91a3a6df36ec
8150203: Incremental update from build-infra project
ihse
parents:
35706
diff
changeset
|
2 |
# Copyright (c) 2011, 2016, 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 |
|
35262
6ffcba13c973
8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents:
34014
diff
changeset
|
28 |
# Hook to include the corresponding custom file, if present. |
6ffcba13c973
8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents:
34014
diff
changeset
|
29 |
$(eval $(call IncludeCustomExtension, jdk, lib/CoreLibraries.gmk)) |
6ffcba13c973
8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents:
34014
diff
changeset
|
30 |
|
6ffcba13c973
8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents:
34014
diff
changeset
|
31 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
32 |
########################################################################################## |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
33 |
# 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
|
34 |
# product on its own. |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
35 |
|
20547 | 36 |
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH |
13164 | 37 |
|
38 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
|
20547 | 39 |
BUILD_LIBFDLIBM_OPTIMIZATION := NONE |
12892 | 40 |
endif |
41 |
||
25859 | 42 |
LIBFDLIBM_SRC := $(JDK_TOPDIR)/src/java.base/share/native/libfdlibm |
43 |
LIBFDLIBM_CFLAGS := -I$(LIBFDLIBM_SRC) |
|
44 |
||
20547 | 45 |
ifneq ($(OPENJDK_TARGET_OS), macosx) |
46 |
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM, \ |
|
47 |
STATIC_LIBRARY := fdlibm, \ |
|
27565 | 48 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \ |
25859 | 49 |
SRC := $(LIBFDLIBM_SRC), \ |
20547 | 50 |
OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \ |
25859 | 51 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \ |
20547 | 52 |
CFLAGS_windows_debug := -DLOGGING, \ |
22594 | 53 |
CFLAGS_aix := -qfloat=nomaf, \ |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
54 |
DISABLED_WARNINGS_gcc := sign-compare, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
55 |
DISABLED_WARNINGS_microsoft := 4146 4244 4018, \ |
20547 | 56 |
ARFLAGS := $(ARFLAGS), \ |
27565 | 57 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \ |
35276 | 58 |
)) |
13164 | 59 |
|
12892 | 60 |
else |
14855
d104ff4d4bb9
8005178: build-infra: Dependency on libfdlibm on mac is broken
erikj
parents:
14789
diff
changeset
|
61 |
|
20890 | 62 |
# On macosx the old build does partial (incremental) linking of fdlibm instead of |
63 |
# a plain static library. |
|
20547 | 64 |
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC, \ |
65 |
LIBRARY := fdlibm, \ |
|
27565 | 66 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \ |
25859 | 67 |
SRC := $(LIBFDLIBM_SRC), \ |
68 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \ |
|
20547 | 69 |
LDFLAGS := -nostdlib -r -arch x86_64, \ |
27565 | 70 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \ |
35276 | 71 |
)) |
20547 | 72 |
|
27565 | 73 |
BUILD_LIBFDLIBM := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX) |
20547 | 74 |
$(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC) |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
16513
diff
changeset
|
75 |
$(call install-file) |
12892 | 76 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
77 |
endif |
20890 | 78 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
79 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
80 |
|
13164 | 81 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
20547 | 82 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
21805 | 83 |
BUILD_LIBVERIFY_REORDER := $(JDK_TOPDIR)/make/mapfiles/libverify/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 84 |
endif |
13164 | 85 |
endif |
86 |
||
20547 | 87 |
LIBVERIFY_OPTIMIZATION := HIGH |
88 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), ) |
|
35276 | 89 |
ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true) |
20547 | 90 |
LIBVERIFY_OPTIMIZATION := LOW |
91 |
endif |
|
13702 | 92 |
endif |
93 |
||
20547 | 94 |
$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \ |
95 |
LIBRARY := verify, \ |
|
96 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
25859 | 97 |
SRC := $(JDK_TOPDIR)/src/java.base/share/native/libverify, \ |
20547 | 98 |
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \ |
99 |
CFLAGS := $(CFLAGS_JDKLIB), \ |
|
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
100 |
DISABLED_WARNINGS_microsoft := 4244 4267, \ |
21805 | 101 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libverify/mapfile-vers, \ |
20547 | 102 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
103 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
33406 | 104 |
LIBS_unix := -ljvm -lc, \ |
105 |
LIBS_windows := jvm.lib, \ |
|
25859 | 106 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 107 |
RC_FLAGS := $(RC_FLAGS) \ |
108 |
-D "JDK_FNAME=verify.dll" \ |
|
109 |
-D "JDK_INTERNAL_NAME=verify" \ |
|
110 |
-D "JDK_FTYPE=0x2L", \ |
|
111 |
REORDER := $(BUILD_LIBVERIFY_REORDER), \ |
|
27565 | 112 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify, \ |
35276 | 113 |
)) |
13164 | 114 |
|
27565 | 115 |
TARGETS += $(BUILD_LIBVERIFY) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
116 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
117 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
118 |
|
25859 | 119 |
LIBJAVA_SRC_DIRS := $(call FindSrcDirsForLib, java.base, java) |
20547 | 120 |
|
25859 | 121 |
LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \ |
122 |
-I$(JDK_TOPDIR)/src/java.base/share/native/libfdlibm \ |
|
27565 | 123 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \ |
20547 | 124 |
-DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"' |
13164 | 125 |
|
35262
6ffcba13c973
8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents:
34014
diff
changeset
|
126 |
# Make it possible to override this variable |
6ffcba13c973
8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents:
34014
diff
changeset
|
127 |
LIBJAVA_MAPFILE ?= $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers |
6ffcba13c973
8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents:
34014
diff
changeset
|
128 |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
129 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
20547 | 130 |
BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c |
131 |
BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c |
|
13164 | 132 |
endif |
133 |
||
134 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
20547 | 135 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
21805 | 136 |
LIBJAVA_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 137 |
endif |
13164 | 138 |
endif |
139 |
||
33522
8d13fc52c3c4
8140630: java/nio/Buffer/Basic.java crashes vm on linux-x64 using latest devkit to build
bpb
parents:
33406
diff
changeset
|
140 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
8d13fc52c3c4
8140630: java/nio/Buffer/Basic.java crashes vm on linux-x64 using latest devkit to build
bpb
parents:
33406
diff
changeset
|
141 |
ifeq ($(OPENJDK_TARGET_CPU), x86_64) |
8d13fc52c3c4
8140630: java/nio/Buffer/Basic.java crashes vm on linux-x64 using latest devkit to build
bpb
parents:
33406
diff
changeset
|
142 |
BUILD_LIBJAVA_Bits.c_CFLAGS := $(C_O_FLAG_NORM) |
8d13fc52c3c4
8140630: java/nio/Buffer/Basic.java crashes vm on linux-x64 using latest devkit to build
bpb
parents:
33406
diff
changeset
|
143 |
endif |
8d13fc52c3c4
8140630: java/nio/Buffer/Basic.java crashes vm on linux-x64 using latest devkit to build
bpb
parents:
33406
diff
changeset
|
144 |
endif |
8d13fc52c3c4
8140630: java/nio/Buffer/Basic.java crashes vm on linux-x64 using latest devkit to build
bpb
parents:
33406
diff
changeset
|
145 |
|
20547 | 146 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \ |
147 |
LIBRARY := java, \ |
|
148 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
149 |
SRC := $(LIBJAVA_SRC_DIRS), \ |
|
150 |
OPTIMIZATION := HIGH, \ |
|
151 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
152 |
$(LIBJAVA_CFLAGS), \ |
|
33984
2333676816eb
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
30784
diff
changeset
|
153 |
System.c_CFLAGS := $(VERSION_CFLAGS), \ |
2333676816eb
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
30784
diff
changeset
|
154 |
jdk_util.c_CFLAGS := $(VERSION_CFLAGS), \ |
32408
97230ec16697
8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents:
32267
diff
changeset
|
155 |
DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \ |
35262
6ffcba13c973
8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents:
34014
diff
changeset
|
156 |
MAPFILE := $(LIBJAVA_MAPFILE), \ |
20547 | 157 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
158 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
33406 | 159 |
LDFLAGS_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/, \ |
160 |
LDFLAGS_windows := -export:winFileHandleOpen -export:handleLseek \ |
|
161 |
-export:getLastErrorString \ |
|
162 |
-export:getErrorString -delayload:shell32.dll, \ |
|
163 |
LIBS_unix := -ljvm -lverify, \ |
|
164 |
LIBS_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \ |
|
165 |
LIBS_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \ |
|
36110
91a3a6df36ec
8150203: Incremental update from build-infra project
ihse
parents:
35706
diff
changeset
|
166 |
LIBS_aix := $(LIBDL) $(BUILD_LIBFDLIBM) $(LIBM),\ |
33406 | 167 |
LIBS_macosx := -lfdlibm \ |
20547 | 168 |
-framework CoreFoundation \ |
169 |
-framework Foundation \ |
|
170 |
-framework Security -framework SystemConfiguration, \ |
|
33406 | 171 |
LIBS_windows := jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \ |
172 |
shell32.lib delayimp.lib \ |
|
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
|
173 |
advapi32.lib version.lib, \ |
25859 | 174 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 175 |
RC_FLAGS := $(RC_FLAGS) \ |
176 |
-D "JDK_FNAME=java.dll" \ |
|
177 |
-D "JDK_INTERNAL_NAME=java" \ |
|
178 |
-D "JDK_FTYPE=0x2L", \ |
|
179 |
REORDER := $(LIBJAVA_REORDER), \ |
|
27565 | 180 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava, \ |
35276 | 181 |
)) |
13164 | 182 |
|
27565 | 183 |
TARGETS += $(BUILD_LIBJAVA) |
20547 | 184 |
|
185 |
$(BUILD_LIBJAVA): $(BUILD_LIBVERIFY) |
|
186 |
||
187 |
$(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
188 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
189 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
190 |
|
20547 | 191 |
BUILD_LIBZIP_EXCLUDES := |
192 |
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
|
193 |
LIBZIP_EXCLUDES += zlib-1.2.8 |
20547 | 194 |
endif |
195 |
||
196 |
BUILD_LIBZIP_REORDER := |
|
197 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
198 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
|
21805 | 199 |
BUILD_LIBZIP_REORDER := $(JDK_TOPDIR)/make/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 200 |
endif |
201 |
endif |
|
202 |
||
203 |
ifeq ($(LIBZIP_CAN_USE_MMAP), true) |
|
204 |
BUILD_LIBZIP_MMAP := -DUSE_MMAP |
|
205 |
endif |
|
206 |
||
207 |
$(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \ |
|
208 |
LIBRARY := zip, \ |
|
209 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
210 |
OPTIMIZATION := LOW, \ |
|
25859 | 211 |
SRC := $(JDK_TOPDIR)/src/java.base/share/native/libzip, \ |
20547 | 212 |
EXCLUDES := $(LIBZIP_EXCLUDES), \ |
213 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
214 |
$(ZLIB_CPPFLAGS) \ |
|
25859 | 215 |
-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
|
216 |
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \ |
27565 | 217 |
-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
|
218 |
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
|
219 |
DISABLED_WARNINGS_gcc := parentheses, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
220 |
DISABLED_WARNINGS_clang := dangling-else, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
221 |
DISABLED_WARNINGS_microsoft := 4267, \ |
21805 | 222 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libzip/mapfile-vers, \ |
20547 | 223 |
REORDER := $(BUILD_LIBZIP_REORDER), \ |
224 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
33406 | 225 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
20547 | 226 |
LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \ |
27565 | 227 |
-export:ZIP_ReadEntry -export:ZIP_GetNextEntry \ |
36110
91a3a6df36ec
8150203: Incremental update from build-infra project
ihse
parents:
35706
diff
changeset
|
228 |
-export:ZIP_InflateFully, \ |
33406 | 229 |
LIBS_unix := -ljvm -ljava $(LIBZ), \ |
230 |
LIBS_solaris := -lc, \ |
|
231 |
LIBS_windows := jvm.lib $(WIN_JAVA_LIB), \ |
|
25859 | 232 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 233 |
RC_FLAGS := $(RC_FLAGS) \ |
234 |
-D "JDK_FNAME=zip.dll" \ |
|
235 |
-D "JDK_INTERNAL_NAME=zip" \ |
|
236 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 237 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libzip, \ |
35276 | 238 |
)) |
20547 | 239 |
|
240 |
$(BUILD_LIBZIP): $(BUILD_LIBJAVA) |
|
241 |
||
27565 | 242 |
TARGETS += $(BUILD_LIBZIP) |
20547 | 243 |
|
244 |
########################################################################################## |
|
245 |
||
32654
23ae9cdf149e
8136690: AIX: libjimage should be linked with the C++ compiler
simonis
parents:
32758
diff
changeset
|
246 |
ifeq ($(OPENJDK_TARGET_OS), aix) |
23ae9cdf149e
8136690: AIX: libjimage should be linked with the C++ compiler
simonis
parents:
32758
diff
changeset
|
247 |
LIBJIMAGE_TOOLCHAIN := TOOLCHAIN_LINK_CXX |
23ae9cdf149e
8136690: AIX: libjimage should be linked with the C++ compiler
simonis
parents:
32758
diff
changeset
|
248 |
endif # OPENJDK_TARGET_OS aix |
23ae9cdf149e
8136690: AIX: libjimage should be linked with the C++ compiler
simonis
parents:
32758
diff
changeset
|
249 |
|
35706 | 250 |
JIMAGELIB_CPPFLAGS := \ |
251 |
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \ |
|
252 |
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \ |
|
253 |
-I$(JDK_TOPDIR)/src/java.base/share/native/libjimage \ |
|
254 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \ |
|
255 |
# |
|
256 |
||
32641
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
257 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJIMAGE, \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
258 |
LIBRARY := jimage, \ |
32654
23ae9cdf149e
8136690: AIX: libjimage should be linked with the C++ compiler
simonis
parents:
32758
diff
changeset
|
259 |
TOOLCHAIN := $(LIBJIMAGE_TOOLCHAIN), \ |
32641
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
260 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
261 |
OPTIMIZATION := LOW, \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
262 |
SRC := $(JDK_TOPDIR)/src/java.base/share/native/libjimage \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
263 |
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjimage, \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
264 |
EXCLUDES := $(LIBJIMAGE_EXCLUDES), \ |
35706 | 265 |
CFLAGS := $(CFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \ |
266 |
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \ |
|
32641
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
267 |
CFLAGS_unix := -UDEBUG, \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
268 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
269 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
33406 | 270 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
32641
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
271 |
LDFLAGS_windows := -export:JIMAGE_Open -export:JIMAGE_Close \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
272 |
-export:JIMAGE_PackageToModule \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
273 |
-export:JIMAGE_FindResource -export:JIMAGE_GetResource \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
274 |
-export:JIMAGE_ResourceIterator, \ |
33406 | 275 |
LIBS_unix := -ljvm -ldl $(LIBCXX), \ |
276 |
LIBS_solaris := -lc, \ |
|
277 |
LIBS_macosx := -lc++, \ |
|
278 |
LIBS_windows := jvm.lib, \ |
|
32641
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
279 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
280 |
RC_FLAGS := $(RC_FLAGS) \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
281 |
-D "JDK_FNAME=jimage.dll" \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
282 |
-D "JDK_INTERNAL_NAME=jimage" \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
283 |
-D "JDK_FTYPE=0x2L", \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
284 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjimage, \ |
35276 | 285 |
)) |
32641
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
286 |
|
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
287 |
$(BUILD_LIBJIMAGE): $(BUILD_LIBJAVA) |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
288 |
|
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
289 |
TARGETS += $(BUILD_LIBJIMAGE) |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
290 |
|
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
291 |
########################################################################################## |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
292 |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
293 |
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
|
294 |
|
25859 | 295 |
LIBJLI_CFLAGS := $(CFLAGS_JDKLIB) |
20547 | 296 |
|
297 |
ifeq ($(JVM_VARIANT_ZERO), true) |
|
298 |
ERGO_FAMILY := zero |
|
299 |
else |
|
300 |
ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86) |
|
301 |
ERGO_FAMILY := i586 |
|
302 |
else |
|
303 |
ERGO_FAMILY := $(OPENJDK_TARGET_CPU_ARCH) |
|
304 |
endif |
|
305 |
endif |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
306 |
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
|
307 |
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
|
308 |
# 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
|
309 |
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
|
310 |
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
|
311 |
endif |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
312 |
LIBJLI_EXCLUDE_FILES += $(notdir $(LIBJLI_EXCLUDE_ERGO)) |
20547 | 313 |
|
314 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
29742
b73f38796859
8074840: Resolve disabled warnings for libjli and libjli_static
mikael
parents:
29374
diff
changeset
|
315 |
LIBJLI_EXCLUDE_FILES += java_md_solinux.c ergo.c ergo_i586.c |
20547 | 316 |
|
317 |
BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c |
|
318 |
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
|
319 |
|
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
320 |
LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" |
20547 | 321 |
endif |
322 |
||
323 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
324 |
# Staticically link with c runtime on windows. |
|
325 |
LIBJLI_CFLAGS := $(filter-out -MD, $(LIBJLI_CFLAGS)) |
|
326 |
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
|
327 |
# 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
|
328 |
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
|
329 |
ifneq ($(MSVCP_DLL), ) |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
330 |
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
|
331 |
endif |
20547 | 332 |
else |
333 |
LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)/jli |
|
334 |
endif |
|
335 |
||
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
336 |
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
|
337 |
|
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
338 |
# 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
|
339 |
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
|
340 |
|
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
341 |
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
|
342 |
LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
343 |
LIBJLI_EXTRA_FILES += \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
344 |
$(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
|
345 |
inflate.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
346 |
inftrees.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
347 |
inffast.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
348 |
zadler32.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
349 |
zcrc32.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
350 |
zutil.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
351 |
) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
352 |
endif |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
353 |
|
20547 | 354 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \ |
355 |
LIBRARY := jli, \ |
|
356 |
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
|
357 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
358 |
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
|
359 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
20547 | 360 |
OPTIMIZATION := HIGH, \ |
361 |
CFLAGS := $(LIBJLI_CFLAGS), \ |
|
32408
97230ec16697
8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents:
32267
diff
changeset
|
362 |
DISABLED_WARNINGS_solstudio := \ |
97230ec16697
8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents:
32267
diff
changeset
|
363 |
E_ASM_DISABLES_OPTIMIZATION \ |
97230ec16697
8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents:
32267
diff
changeset
|
364 |
E_STATEMENT_NOT_REACHED, \ |
21805 | 365 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjli/mapfile-vers, \ |
20547 | 366 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
367 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
368 |
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ |
|
369 |
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ |
|
33406 | 370 |
LDFLAGS_windows := \ |
20547 | 371 |
-export:JLI_Launch \ |
372 |
-export:JLI_ManifestIterate \ |
|
373 |
-export:JLI_SetTraceLauncher \ |
|
374 |
-export:JLI_ReportErrorMessage \ |
|
375 |
-export:JLI_ReportErrorMessageSys \ |
|
376 |
-export:JLI_ReportMessage \ |
|
377 |
-export:JLI_ReportExceptionDescription \ |
|
378 |
-export:JLI_MemAlloc \ |
|
379 |
-export:JLI_CmdToArgs \ |
|
380 |
-export:JLI_GetStdArgc \ |
|
381 |
-export:JLI_GetStdArgs \ |
|
32267
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
382 |
-export:JLI_List_new \ |
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
383 |
-export:JLI_List_add \ |
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
384 |
-export:JLI_StringDup \ |
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
385 |
-export:JLI_MemFree \ |
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
386 |
-export:JLI_InitArgProcessing \ |
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
387 |
-export:JLI_PreprocessArg \ |
33406 | 388 |
-export:JLI_GetAppArgIndex, \ |
389 |
LIBS_unix := $(LIBZ), \ |
|
390 |
LIBS_linux := $(LIBDL) -lc -lpthread, \ |
|
391 |
LIBS_solaris := $(LIBDL) -lc, \ |
|
392 |
LIBS_aix := $(LIBDL),\ |
|
393 |
LIBS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \ |
|
394 |
LIBS_windows := advapi32.lib comctl32.lib user32.lib, \ |
|
25859 | 395 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 396 |
RC_FLAGS := $(RC_FLAGS) \ |
397 |
-D "JDK_FNAME=jli.dll" \ |
|
398 |
-D "JDK_INTERNAL_NAME=jli" \ |
|
399 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 400 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli, \ |
35276 | 401 |
)) |
20547 | 402 |
|
27565 | 403 |
TARGETS += $(BUILD_LIBJLI) |
20547 | 404 |
|
405 |
# On windows, the static library has the same suffix as the import library created by |
|
406 |
# with the shared library, so the static library is given a different name. No harm |
|
407 |
# in doing it for all platform to reduce complexity. |
|
408 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
409 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \ |
|
410 |
STATIC_LIBRARY := jli_static, \ |
|
27565 | 411 |
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
|
412 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
413 |
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
|
414 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
20547 | 415 |
OPTIMIZATION := HIGH, \ |
416 |
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \ |
|
417 |
ARFLAGS := $(ARFLAGS), \ |
|
27565 | 418 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \ |
35276 | 419 |
)) |
20547 | 420 |
|
27565 | 421 |
TARGETS += $(BUILD_LIBJLI_STATIC) |
20547 | 422 |
|
423 |
else ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
424 |
# |
|
425 |
# On macosx they do partial (incremental) linking of libjli_static.a |
|
426 |
# code it here...rather than add support to NativeCompilation |
|
427 |
# as this is first time I see it |
|
428 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \ |
|
429 |
LIBRARY := jli_static, \ |
|
27565 | 430 |
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
|
431 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
432 |
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
|
433 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
20547 | 434 |
OPTIMIZATION := HIGH, \ |
435 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \ |
|
436 |
LDFLAGS := -nostdlib -r, \ |
|
27565 | 437 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \ |
35276 | 438 |
)) |
20547 | 439 |
|
33653
c1ee09fe3274
8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents:
32846
diff
changeset
|
440 |
ifeq ($(STATIC_BUILD), true) |
c1ee09fe3274
8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents:
32846
diff
changeset
|
441 |
TARGETS += $(BUILD_LIBJLI_STATIC) |
c1ee09fe3274
8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents:
32846
diff
changeset
|
442 |
else |
c1ee09fe3274
8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents:
32846
diff
changeset
|
443 |
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a: $(BUILD_LIBJLI_STATIC) |
20547 | 444 |
$(call install-file) |
445 |
||
33653
c1ee09fe3274
8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents:
32846
diff
changeset
|
446 |
TARGETS += $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a |
c1ee09fe3274
8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents:
32846
diff
changeset
|
447 |
endif |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
448 |
|
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
449 |
else ifeq ($(OPENJDK_TARGET_OS), aix) |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
450 |
# 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
|
451 |
$(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
|
452 |
STATIC_LIBRARY := jli_static, \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
453 |
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
|
454 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
455 |
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
|
456 |
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
|
457 |
OPTIMIZATION := HIGH, \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
458 |
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
|
459 |
ARFLAGS := $(ARFLAGS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
460 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static)) |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
461 |
|
27565 | 462 |
TARGETS += $(BUILD_LIBJLI_STATIC) |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
463 |
|
20547 | 464 |
endif |