author | asaha |
Sat, 07 Dec 2013 16:15:08 -0800 | |
changeset 22336 | a5de9b85e983 |
parent 22332 | jdk/makefiles/CompileNativeLibraries.gmk@fba4c66089bb |
parent 21805 | jdk/makefiles/CompileNativeLibraries.gmk@c7d7946239de |
child 22607 | ba232b417248 |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
16476
e269be167fae
8001334: Remove use of JVM_* functions from java.io code
dxu
parents:
15676
diff
changeset
|
2 |
# Copyright (c) 2011, 2013, 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 |
|
20547 | 26 |
LIBATTACH_EXCLUDE_FILES := |
27 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
|
28 |
LIBATTACH_EXCLUDE_FILES += SolarisVirtualMachine.c |
|
29 |
endif |
|
30 |
ifneq ($(OPENJDK_TARGET_OS), linux) |
|
31 |
LIBATTACH_EXCLUDE_FILES += LinuxVirtualMachine.c |
|
32 |
endif |
|
33 |
ifneq ($(OPENJDK_TARGET_OS), macosx) |
|
34 |
LIBATTACH_EXCLUDE_FILES += BsdVirtualMachine.c |
|
17673
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
17448
diff
changeset
|
35 |
endif |
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
17448
diff
changeset
|
36 |
|
20547 | 37 |
$(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \ |
38 |
LIBRARY := attach, \ |
|
39 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
40 |
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/tools/attach, \ |
|
41 |
EXCLUDE_FILES := $(LIBATTACH_EXCLUDE_FILES), \ |
|
42 |
LANG := C, \ |
|
43 |
OPTIMIZATION := LOW, \ |
|
44 |
CFLAGS := $(CFLAGS_JDKLIB), \ |
|
45 |
CFLAGS_windows := /Gy, \ |
|
21805 | 46 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \ |
20547 | 47 |
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ |
48 |
RC_FLAGS := $(RC_FLAGS) \ |
|
49 |
-D "JDK_FNAME=attach.dll" \ |
|
50 |
-D "JDK_INTERNAL_NAME=attach" \ |
|
51 |
-D "JDK_FTYPE=0x2L", \ |
|
52 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
53 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
54 |
LDFLAGS_solaris := -ldoor, \ |
|
21805 | 55 |
LDFLAGS_windows := /ORDER:@$(JDK_TOPDIR)/make/mapfiles/libattach/reorder-windows-$(OPENJDK_TARGET_CPU), \ |
20547 | 56 |
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \ |
57 |
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib psapi.lib, \ |
|
58 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libattach, \ |
|
59 |
DEBUG_SYMBOLS := true)) |
|
60 |
||
61 |
$(BUILD_LIBATTACH): $(BUILD_LIBJAVA) |
|
62 |
||
63 |
BUILD_LIBRARIES += $(BUILD_LIBATTACH) |
|
64 |
||
65 |
########################################################################################## |
|
66 |
||
67 |
$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \ |
|
68 |
LIBRARY := dt_socket, \ |
|
69 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
70 |
SRC := $(JDK_TOPDIR)/src/share/transport/socket \ |
|
71 |
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket, \ |
|
72 |
LANG := C, \ |
|
73 |
OPTIMIZATION := LOW, \ |
|
74 |
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \ |
|
75 |
-I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \ |
|
76 |
-I$(JDK_TOPDIR)/src/share/transport/socket \ |
|
77 |
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket \ |
|
78 |
-I$(JDK_TOPDIR)/src/share/back/export \ |
|
79 |
-I$(JDK_TOPDIR)/src/share/back, \ |
|
21805 | 80 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libdt_socket/mapfile-vers, \ |
20547 | 81 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
82 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
83 |
LDFLAGS_SUFFIX_linux := -lpthread, \ |
|
84 |
LDFLAGS_SUFFIX_solaris := -lnsl -lsocket -lc, \ |
|
85 |
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX) -export:jdwpTransport_OnLoad ws2_32.lib, \ |
|
86 |
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ |
|
87 |
RC_FLAGS := $(RC_FLAGS) \ |
|
88 |
-D "JDK_FNAME=dt_socket.dll" \ |
|
89 |
-D "JDK_INTERNAL_NAME=dt_socket" \ |
|
90 |
-D "JDK_FTYPE=0x2L", \ |
|
91 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdt_socket, \ |
|
92 |
DEBUG_SYMBOLS := true)) |
|
93 |
||
94 |
$(BUILD_LIBDT_SOCKET): $(BUILD_LIBJAVA) |
|
95 |
||
96 |
BUILD_LIBRARIES += $(BUILD_LIBDT_SOCKET) |
|
97 |
||
98 |
########################################################################################## |
|
99 |
||
100 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
101 |
||
102 |
$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SHMEM, \ |
|
103 |
LIBRARY := dt_shmem, \ |
|
104 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
105 |
SRC := $(JDK_TOPDIR)/src/share/native/com/sun/tools/jdi \ |
|
106 |
$(JDK_TOPDIR)/src/share/transport/shmem \ |
|
107 |
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/shmem, \ |
|
108 |
LANG := C, \ |
|
109 |
OPTIMIZATION := LOW, \ |
|
110 |
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \ |
|
111 |
-I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \ |
|
112 |
-I$(JDK_TOPDIR)/src/share/transport/shmem \ |
|
113 |
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/shmem \ |
|
114 |
-I$(JDK_TOPDIR)/src/share/back/export, \ |
|
115 |
LDFLAGS := $(LDFLAGS_JDKLIB), \ |
|
116 |
LDFLAGS_windows := -export:jdwpTransport_OnLoad, \ |
|
117 |
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \ |
|
118 |
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ |
|
119 |
RC_FLAGS := $(RC_FLAGS) \ |
|
120 |
-D "JDK_FNAME=dt_shmem.dll" \ |
|
121 |
-D "JDK_INTERNAL_NAME=dt_shmem" \ |
|
122 |
-D "JDK_FTYPE=0x2L", \ |
|
123 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdt_shmem, \ |
|
124 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
125 |
||
126 |
BUILD_LIBRARIES += $(BUILD_LIBDT_SHMEM) |
|
127 |
||
128 |
endif # OPENJDK_TARGET_OS |
|
129 |
||
130 |
########################################################################################## |
|
20890 | 131 |
|
20547 | 132 |
# JDWP_LOGGING causes log messages to be compiled into the library. |
133 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \ |
|
134 |
LIBRARY := jdwp, \ |
|
135 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
136 |
SRC := $(JDK_TOPDIR)/src/share/back $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back, \ |
|
137 |
LANG := C, \ |
|
138 |
OPTIMIZATION := LOW, \ |
|
139 |
CFLAGS := $(CFLAGS_JDKLIB) -DJDWP_LOGGING \ |
|
140 |
-I$(JDK_TOPDIR)/src/share/transport/export \ |
|
141 |
-I$(JDK_TOPDIR)/src/share/back/export \ |
|
142 |
-I$(JDK_TOPDIR)/src/share/npt \ |
|
143 |
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \ |
|
144 |
-I$(JDK_TOPDIR)/src/share/back \ |
|
145 |
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back \ |
|
146 |
-I$(JDK_OUTPUTDIR)/gensrc_jdwp_headers, \ |
|
21805 | 147 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjdwp/mapfile-vers, \ |
20547 | 148 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
149 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
150 |
LDFLAGS_SUFFIX_linux := $(LIBDL), \ |
|
151 |
LDFLAGS_SUFFIX_solaris := $(LIBDL) -lc, \ |
|
152 |
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX), \ |
|
153 |
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ |
|
154 |
RC_FLAGS := $(RC_FLAGS) \ |
|
155 |
-D "JDK_FNAME=jdwp.dll" \ |
|
156 |
-D "JDK_INTERNAL_NAME=jdwp" \ |
|
157 |
-D "JDK_FTYPE=0x2L", \ |
|
158 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjdwp, \ |
|
159 |
DEBUG_SYMBOLS := true)) |
|
160 |
||
161 |
$(BUILD_LIBJDWP): $(BUILD_LIBJAVA) |
|
162 |
||
163 |
BUILD_LIBRARIES += $(BUILD_LIBJDWP) |
|
164 |
||
165 |
########################################################################################## |
|
166 |
||
167 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJSDT, \ |
|
168 |
LIBRARY := jsdt, \ |
|
169 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
170 |
SRC := $(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace \ |
|
171 |
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/tracing/dtrace, \ |
|
172 |
LANG := C, \ |
|
173 |
OPTIMIZATION := LOW, \ |
|
174 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
175 |
-I$(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace, \ |
|
21805 | 176 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjsdt/mapfile-vers, \ |
20547 | 177 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
178 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
179 |
LDFLAGS_SUFFIX_linux := $(LIBDL), \ |
|
180 |
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX) $(LIBDL), \ |
|
181 |
LDFLAGS_SUFFIX_macosx := $(LIBDL), \ |
|
182 |
LDFLAGS_SUFFIX_solaris := -lc, \ |
|
183 |
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ |
|
184 |
RC_FLAGS := $(RC_FLAGS) \ |
|
185 |
-D "JDK_FNAME=jsdt.dll" \ |
|
186 |
-D "JDK_INTERNAL_NAME=jsdt" \ |
|
187 |
-D "JDK_FTYPE=0x2L", \ |
|
188 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsdt, \ |
|
189 |
DEBUG_SYMBOLS := true)) |
|
190 |
||
191 |
$(BUILD_LIBJSDT): $(BUILD_LIBJAVA) |
|
192 |
||
193 |
BUILD_LIBRARIES += $(BUILD_LIBJSDT) |
|
194 |
||
195 |
########################################################################################## |
|
196 |
||
197 |
LIBINSTRUMENT_SRC := $(JDK_TOPDIR)/src/share/instrument \ |
|
198 |
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io \ |
|
199 |
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/instrument |
|
200 |
||
201 |
LIBINSTRUMENT_FILES := \ |
|
202 |
EncodingSupport.c \ |
|
203 |
EncodingSupport_md.c \ |
|
204 |
FileSystemSupport_md.c \ |
|
205 |
InstrumentationImplNativeMethods.c \ |
|
206 |
InvocationAdapter.c \ |
|
207 |
JarFacade.c \ |
|
208 |
JPLISAgent.c \ |
|
209 |
JPLISAssert.c \ |
|
210 |
JavaExceptions.c \ |
|
211 |
PathCharsValidator.c \ |
|
212 |
Reentrancy.c \ |
|
213 |
Utilities.c \ |
|
214 |
canonicalize_md.c |
|
215 |
||
216 |
LIBINSTRUMENT_DIR := $(JDK_OUTPUTDIR)/objs/libinstrument |
|
217 |
LIBINSTRUMENT_CFLAGS := $(CFLAGS_JDKLIB) \ |
|
218 |
-I$(JDK_TOPDIR)/src/share/instrument \ |
|
219 |
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/instrument \ |
|
220 |
-I$(JDK_TOPDIR)/src/share/bin |
|
221 |
||
222 |
LIBINSTRUMENT_LDFLAGS := |
|
223 |
LIBINSTRUMENT_LDFLAGS_SUFFIX := |
|
224 |
||
225 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
226 |
LIBINSTRUMENT_LDFLAGS += $(JDK_OUTPUTDIR)/objs/jli_static.lib $(WIN_JAVA_LIB) \ |
|
227 |
-export:Agent_OnAttach advapi32.lib |
|
228 |
# Statically link the C runtime so that there are not dependencies on modules |
|
229 |
# not on the search patch when invoked from the Windows system directory |
|
230 |
# (or elsewhere). |
|
231 |
LIBINSTRUMENT_CFLAGS := $(filter-out -MD, $(LIBINSTRUMENT_CFLAGS)) |
|
232 |
# equivalent of strcasecmp is stricmp on Windows |
|
233 |
LIBINSTRUMENT_CFLAGS += -Dstrcasecmp=stricmp |
|
234 |
endif |
|
235 |
||
236 |
$(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \ |
|
237 |
LIBRARY := instrument, \ |
|
238 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
239 |
SRC := $(LIBINSTRUMENT_SRC), \ |
|
240 |
INCLUDE_FILES := $(LIBINSTRUMENT_FILES), \ |
|
241 |
LANG := C, \ |
|
242 |
OPTIMIZATION := LOW, \ |
|
243 |
CFLAGS := $(LIBINSTRUMENT_CFLAGS), \ |
|
244 |
CFLAGS_debug := -DJPLIS_LOGGING, \ |
|
245 |
CFLAGS_release := -DNO_JPLIS_LOGGING, \ |
|
21805 | 246 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libinstrument/mapfile-vers, \ |
20547 | 247 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
248 |
$(call SET_SHARED_LIBRARY_ORIGIN) \ |
|
249 |
$(LIBINSTRUMENT_LDFLAGS), \ |
|
250 |
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \ |
|
251 |
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \ |
|
252 |
LDFLAGS_macosx := -Xlinker -all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \ |
|
253 |
-framework Cocoa -framework Security -framework ApplicationServices, \ |
|
254 |
LDFLAGS_SUFFIX := $(LIBINSTRUMENT_LDFLAGS_SUFFIX), \ |
|
255 |
LDFLAGS_SUFFIX_macosx := -liconv $(LIBZ), \ |
|
256 |
LDFLAGS_SUFFIX_solaris := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL) -lc, \ |
|
257 |
LDFLAGS_SUFFIX_linux := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL), \ |
|
258 |
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ |
|
259 |
RC_FLAGS := $(RC_FLAGS) \ |
|
260 |
-D "JDK_FNAME=instrument.dll" \ |
|
261 |
-D "JDK_INTERNAL_NAME=instrument" \ |
|
262 |
-D "JDK_FTYPE=0x2L", \ |
|
263 |
OBJECT_DIR := $(LIBINSTRUMENT_DIR), \ |
|
264 |
DEBUG_SYMBOLS := true)) |
|
265 |
||
266 |
ifneq (, $(findstring $(OPENJDK_TARGET_OS), macosx windows)) |
|
267 |
$(BUILD_LIBINSTRUMENT): $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX) |
|
268 |
else |
|
269 |
$(BUILD_LIBINSTRUMENT): $(INSTALL_LIBRARIES_HERE)/jli/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) |
|
270 |
endif |
|
271 |
$(BUILD_LIBINSTRUMENT): $(BUILD_LIBJAVA) |
|
272 |
||
273 |
BUILD_LIBRARIES += $(BUILD_LIBINSTRUMENT) |
|
274 |
||
275 |
########################################################################################## |
|
276 |
||
277 |
BUILD_LIBMANAGEMENT_SRC := $(JDK_TOPDIR)/src/share/native/sun/management \ |
|
21633
6cc4c9a56216
8025985: com.sun.management.OSMBeanFactory should not be public
mchung
parents:
20896
diff
changeset
|
278 |
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/management |
20547 | 279 |
|
280 |
BUILD_LIBMANAGEMENT_EXCLUDES := |
|
281 |
||
282 |
BUILD_LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/management |
|
283 |
||
284 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
|
285 |
BUILD_LIBMANAGEMENT_EXCLUDES += SolarisOperatingSystem.c |
|
286 |
endif |
|
287 |
||
288 |
ifneq ($(OPENJDK_TARGET_OS), linux) |
|
289 |
BUILD_LIBMANAGEMENT_EXCLUDES += LinuxOperatingSystem.c |
|
290 |
endif |
|
291 |
||
292 |
ifneq ($(OPENJDK_TARGET_OS), macosx) |
|
293 |
BUILD_LIBMANAGEMENT_EXCLUDES += MacosxOperatingSystem.c |
|
294 |
endif |
|
295 |
||
296 |
LIBMANAGEMENT_OPTIMIZATION := HIGH |
|
297 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), ) |
|
298 |
ifeq ($(ENABLE_DEBUG_SYMBOLS), true) |
|
299 |
LIBMANAGEMENT_OPTIMIZATION := LOW |
|
300 |
endif |
|
301 |
endif |
|
302 |
||
303 |
$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \ |
|
304 |
LIBRARY := management, \ |
|
305 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
306 |
SRC := $(BUILD_LIBMANAGEMENT_SRC), \ |
|
307 |
EXCLUDE_FILES := $(BUILD_LIBMANAGEMENT_EXCLUDES), \ |
|
308 |
LANG := C, \ |
|
309 |
OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \ |
|
310 |
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBMANAGEMENT_CFLAGS), \ |
|
21805 | 311 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmanagement/mapfile-vers, \ |
20547 | 312 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
313 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
314 |
LDFLAGS_solaris := -lkstat, \ |
|
315 |
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \ |
|
316 |
LDFLAGS_SUFFIX_windows := jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib, \ |
|
317 |
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ |
|
318 |
RC_FLAGS := $(RC_FLAGS) \ |
|
319 |
-D "JDK_FNAME=management.dll" \ |
|
320 |
-D "JDK_INTERNAL_NAME=management" \ |
|
321 |
-D "JDK_FTYPE=0x2L", \ |
|
322 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmanagement, \ |
|
323 |
DEBUG_SYMBOLS := true)) |
|
324 |
||
325 |
$(BUILD_LIBMANAGEMENT): $(BUILD_LIBJAVA) |
|
326 |
||
327 |
BUILD_LIBRARIES += $(BUILD_LIBMANAGEMENT) |
|
328 |
||
329 |
########################################################################################## |
|
330 |
||
331 |
BUILD_LIBHPROF_SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/hprof $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/demo/jvmti/hprof |
|
332 |
BUILD_LIBHPROF_CFLAGS := -I$(JDK_TOPDIR)/src/share/demo/jvmti/hprof \ |
|
333 |
-I$(JDK_TOPDIR)/src/share/npt \ |
|
334 |
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \ |
|
335 |
-I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo |
|
336 |
||
337 |
BUILD_LIBHPROF_LDFLAGS := |
|
338 |
||
339 |
LIBHPROF_OPTIMIZATION := HIGHEST |
|
340 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), ) |
|
341 |
ifeq ($(ENABLE_DEBUG_SYMBOLS), true) |
|
342 |
LIBHPROF_OPTIMIZATION := LOW |
|
343 |
endif |
|
344 |
endif |
|
345 |
||
346 |
$(eval $(call SetupNativeCompilation,BUILD_LIBHPROF, \ |
|
347 |
LIBRARY := hprof, \ |
|
348 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
349 |
SRC := $(BUILD_LIBHPROF_SRC), \ |
|
350 |
LANG := C, \ |
|
351 |
OPTIMIZATION := $(LIBHPROF_OPTIMIZATION), \ |
|
352 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
353 |
$(BUILD_LIBHPROF_CFLAGS), \ |
|
354 |
CFLAGS_debug := -DHPROF_LOGGING, \ |
|
21805 | 355 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libhprof/mapfile-vers, \ |
20547 | 356 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
357 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
358 |
LDFLAGS_windows := wsock32.lib winmm.lib advapi32.lib, \ |
|
359 |
LDFLAGS_SUFFIX_linux := $(LIBDL), \ |
|
360 |
LDFLAGS_SUFFIX_macosx := $(LIBDL), \ |
|
361 |
LDFLAGS_SUFFIX_solaris := -lsocket -lnsl $(LIBDL) -lc, \ |
|
362 |
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ |
|
363 |
RC_FLAGS := $(RC_FLAGS) \ |
|
364 |
-D "JDK_FNAME=hprof.dll" \ |
|
365 |
-D "JDK_INTERNAL_NAME=hprof" \ |
|
366 |
-D "JDK_FTYPE=0x2L", \ |
|
367 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libhprof_jvmti, \ |
|
368 |
DEBUG_SYMBOLS := true)) |
|
369 |
||
370 |
BUILD_LIBRARIES += $(BUILD_LIBHPROF) |
|
371 |
||
372 |
########################################################################################## |
|
373 |
||
374 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA_CRW_DEMO, \ |
|
375 |
LIBRARY := java_crw_demo, \ |
|
376 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
377 |
SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \ |
|
378 |
LANG := C, \ |
|
379 |
OPTIMIZATION := LOW, \ |
|
380 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
381 |
-I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \ |
|
21805 | 382 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava_crw_demo/mapfile-vers, \ |
20547 | 383 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
384 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
385 |
LDFLAGS_SUFFIX_solaris := -lc, \ |
|
386 |
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ |
|
387 |
RC_FLAGS := $(RC_FLAGS) \ |
|
388 |
-D "JDK_FNAME=java_crw_demo.dll" \ |
|
389 |
-D "JDK_INTERNAL_NAME=java_crw_demo" \ |
|
390 |
-D "JDK_FTYPE=0x2L", \ |
|
391 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjava_crw_demo, \ |
|
392 |
DEBUG_SYMBOLS := true)) |
|
393 |
||
394 |
BUILD_LIBRARIES += $(BUILD_LIBJAVA_CRW_DEMO) |
|
395 |
||
396 |
########################################################################################## |
|
397 |
||
398 |
ifndef OPENJDK |
|
399 |
ifeq ($(ENABLE_JFR), true) |
|
400 |
||
401 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJFR, \ |
|
402 |
LIBRARY := jfr, \ |
|
403 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
404 |
SRC := $(JDK_TOPDIR)/src/closed/share/native/oracle/jfr, \ |
|
405 |
LANG := C, \ |
|
406 |
OPTIMIZATION := LOW, \ |
|
407 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
408 |
-I$(JDK_TOPDIR)/src/closed/share/javavm/export, \ |
|
21805 | 409 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjfr/mapfile-vers, \ |
20547 | 410 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
411 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
412 |
LDFLAGS_SUFFIX_solaris := -lc, \ |
|
413 |
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ |
|
414 |
RC_FLAGS := $(RC_FLAGS) \ |
|
415 |
-D "JDK_FNAME=jfr.dll" \ |
|
416 |
-D "JDK_INTERNAL_NAME=jfr" \ |
|
417 |
-D "JDK_FTYPE=0x2L", \ |
|
418 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjfr, \ |
|
419 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
|
420 |
||
421 |
BUILD_LIBRARIES += $(BUILD_LIBJFR) |
|
12892 | 422 |
|
20547 | 423 |
endif |
424 |
endif |