author | rfield |
Tue, 20 Nov 2012 09:58:55 -0800 | |
changeset 14554 | 4e29b285c723 |
parent 14091 | e5c8662f325d |
permissions | -rw-r--r-- |
2 | 1 |
# |
12307
b34445ac110f
7157296: FDS: ENABLE_FULL_DEBUG_SYMBOLS flag should only affect OPT builds
dcubed
parents:
12047
diff
changeset
|
2 |
# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
# |
|
5 |
# This code is free software; you can redistribute it and/or modify it |
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
2 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
# |
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
# accompanied this code). |
|
16 |
# |
|
17 |
# You should have received a copy of the GNU General Public License version |
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
# |
|
5506 | 21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
# or visit www.oracle.com if you need additional information or have any |
|
23 |
# questions. |
|
2 | 24 |
# |
25 |
||
26 |
# |
|
27 |
# Generic makefile for building shared libraries. |
|
28 |
# |
|
29 |
||
30 |
# WARNING: This file is shared with other workspaces. |
|
31 |
# So when it includes other files, it must use JDK_TOPDIR. |
|
32 |
# |
|
33 |
||
34 |
include $(JDK_TOPDIR)/make/common/Classes.gmk |
|
35 |
||
36 |
# |
|
37 |
# It is important to define these *after* including Classes.gmk |
|
38 |
# in order to override the values defined inthat makefile. |
|
39 |
# |
|
40 |
||
41 |
ifeq ($(LIBRARY), fdlibm) |
|
42 |
ifeq ($(PLATFORM),windows) |
|
43 |
ACTUAL_LIBRARY_NAME = $(LIB_PREFIX)$(LIBRARY).$(FDDLIBM_SUFFIX) |
|
44 |
ACTUAL_LIBRARY_DIR = $(OBJDIR) |
|
45 |
else # PLATFORM |
|
46 |
ACTUAL_LIBRARY_NAME = $(LIB_PREFIX)$(LIBRARY).$(ARCH).$(FDDLIBM_SUFFIX) |
|
47 |
ACTUAL_LIBRARY_DIR = $(OBJDIR) |
|
48 |
endif #PLATFORM |
|
49 |
else # LIBRARY |
|
50 |
ACTUAL_LIBRARY_NAME = $(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX) |
|
51 |
ACTUAL_LIBRARY_DIR = $(LIB_LOCATION) |
|
52 |
endif |
|
53 |
ACTUAL_LIBRARY = $(ACTUAL_LIBRARY_DIR)/$(ACTUAL_LIBRARY_NAME) |
|
54 |
||
55 |
library:: $(ACTUAL_LIBRARY) |
|
56 |
||
57 |
FILES_o = $(patsubst %.c, %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_c)))) |
|
58 |
FILES_o += $(patsubst %.s, %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_s)))) |
|
59 |
FILES_o += $(patsubst %.cpp, %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_cpp)))) |
|
60 |
||
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10798
diff
changeset
|
61 |
ifeq ($(PLATFORM), macosx) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10798
diff
changeset
|
62 |
FILES_o += $(patsubst %.m, %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_objc)))) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10798
diff
changeset
|
63 |
FILES_o += $(patsubst %.mm, %.$(OBJECT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_objcpp)))) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10798
diff
changeset
|
64 |
|
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10798
diff
changeset
|
65 |
INCREMENTAL_BUILD=false |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10798
diff
changeset
|
66 |
|
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10798
diff
changeset
|
67 |
endif # PLATFORM |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10798
diff
changeset
|
68 |
|
2 | 69 |
ifeq ($(INCREMENTAL_BUILD),true) |
70 |
FILES_d = $(patsubst %.c, %.$(DEPEND_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_c)))) |
|
71 |
FILES_d += $(patsubst %.cpp, %.$(DEPEND_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_cpp)))) |
|
72 |
endif # INCREMENTAL_BUILD |
|
73 |
||
74 |
ifeq ($(PLATFORM),solaris) |
|
75 |
# List of all lint files, one for each .c file (only for C) |
|
76 |
FILES_ln = $(patsubst %.c, %.$(LINT_SUFFIX), $(addprefix $(OBJDIR)/, $(notdir $(FILES_c)))) |
|
77 |
endif |
|
78 |
||
79 |
# |
|
80 |
# C++ libraries must be linked with CC. |
|
81 |
# |
|
82 |
ifdef CPLUSPLUSLIBRARY |
|
83 |
LINKER=$(LINK.cc) |
|
84 |
else |
|
85 |
LINKER=$(LINK.c) |
|
86 |
endif |
|
87 |
||
88 |
$(ACTUAL_LIBRARY):: $(INIT) $(TEMPDIR) $(LIBDIR) $(BINDIR) $(EXTDIR) classheaders |
|
8993
9076d969ffdf
7025066: Build systems changes to support SE Embedded Integration
dholmes
parents:
8583
diff
changeset
|
89 |
@$(ECHO) Building lib:$(ACTUAL_LIBRARY) |
2 | 90 |
# |
91 |
# COMPILE_APPROACH: Different approaches to compile up the native object |
|
92 |
# files as quickly as possible. |
|
93 |
# The setting of parallel works best on Unix, batch on Windows. |
|
94 |
# |
|
95 |
||
96 |
COMPILE_FILES_o = $(OBJDIR)/.files_compiled |
|
97 |
$(COMPILE_FILES_o): $(FILES_d) $(FILES_o) |
|
98 |
@$(ECHO) "$<" >> $@ |
|
99 |
clean:: |
|
100 |
$(RM) $(COMPILE_FILES_o) |
|
101 |
||
102 |
# |
|
103 |
# COMPILE_APPROACH=parallel: Will trigger compilations (just compilations) to |
|
104 |
# happen in parallel. Greatly decreases Unix build time, even on single CPU |
|
105 |
# machines, more so on multiple CPU machines. Default is 2 compiles |
|
106 |
# at a time, but can be adjusted with ALT_PARALLEL_COMPILE_JOBS. |
|
107 |
# Note that each .d file will also be dependent on it's .o file, see |
|
108 |
# Rules.gmk. |
|
109 |
# Note this does not depend on Rules.gmk to work like batch (below) |
|
110 |
# and this technique doesn't seem to help Windows build time nor does |
|
111 |
# it work very well, it's possible the Windows Visual Studio compilers |
|
112 |
# don't work well in a parallel situation, this needs investigation. |
|
113 |
# |
|
114 |
||
115 |
ifeq ($(COMPILE_APPROACH),parallel) |
|
116 |
||
117 |
.PHONY: library_parallel_compile |
|
118 |
||
119 |
library_parallel_compile: |
|
120 |
@$(ECHO) "Begin parallel compiles: $(shell $(PWD))" |
|
121 |
@$(MAKE) -j $(PARALLEL_COMPILE_JOBS) $(COMPILE_FILES_o) |
|
122 |
@$(ECHO) "Done with parallel compiles: $(shell $(PWD))" |
|
123 |
||
124 |
$(ACTUAL_LIBRARY):: library_parallel_compile |
|
125 |
||
126 |
endif |
|
127 |
||
128 |
# |
|
129 |
# COMPILE_APPROACH=batch: Will trigger compilations (just compilations) to |
|
130 |
# happen in batch mode. Greatly decreases Windows build time. |
|
131 |
# See logic in Rules.gmk for how compiles happen, the $(MAKE) in |
|
132 |
# library_batch_compile below triggers the actions in Rules.gmk. |
|
133 |
# Note that each .d file will also be dependent on it's .o file, see |
|
134 |
# Rules.gmk. |
|
135 |
# |
|
136 |
ifeq ($(COMPILE_APPROACH),batch) |
|
137 |
||
138 |
.PHONY: library_batch_compile |
|
139 |
||
140 |
library_batch_compile: |
|
141 |
@$(ECHO) "Begin BATCH compiles: $(shell $(PWD))" |
|
142 |
$(MAKE) $(COMPILE_FILES_o) |
|
143 |
$(MAKE) batch_compile |
|
144 |
@$(ECHO) "Done with BATCH compiles: $(shell $(PWD))" |
|
145 |
$(MAKE) COMPILE_APPROACH=normal $(COMPILE_FILES_o) |
|
146 |
||
147 |
$(ACTUAL_LIBRARY):: library_batch_compile |
|
148 |
||
149 |
endif |
|
150 |
||
151 |
ifeq ($(PLATFORM), windows) |
|
152 |
||
153 |
# |
|
154 |
# Library building rules. |
|
155 |
# |
|
156 |
||
157 |
$(LIBRARY).lib:: $(OBJDIR) |
|
158 |
||
159 |
ifeq ($(LIBRARY), fdlibm) |
|
160 |
$(ACTUAL_LIBRARY):: $(OBJDIR)/$(LIBRARY).lib |
|
161 |
||
162 |
$(OBJDIR)/$(LIBRARY).lib:: $(OBJDIR)/$(LIBRARY).lcf |
|
163 |
@$(prep-target) |
|
164 |
$(LIBEXE) -NODEFAULTLIB:MSVCRT -out:$@ -nologo \ |
|
165 |
@$(OBJDIR)/$(LIBRARY).lcf $(OTHER_LCF) $(LDLIBS_COMMON) |
|
166 |
else # LIBRARY |
|
167 |
# build it into $(OBJDIR) so that the other generated files get put |
|
168 |
# there, then copy just the DLL (and MAP file) to the requested directory. |
|
169 |
# |
|
12307
b34445ac110f
7157296: FDS: ENABLE_FULL_DEBUG_SYMBOLS flag should only affect OPT builds
dcubed
parents:
12047
diff
changeset
|
170 |
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
b34445ac110f
7157296: FDS: ENABLE_FULL_DEBUG_SYMBOLS flag should only affect OPT builds
dcubed
parents:
12047
diff
changeset
|
171 |
MAP_OPTION="-map:$(OBJDIR)/$(LIBRARY).map" |
b34445ac110f
7157296: FDS: ENABLE_FULL_DEBUG_SYMBOLS flag should only affect OPT builds
dcubed
parents:
12047
diff
changeset
|
172 |
endif |
b34445ac110f
7157296: FDS: ENABLE_FULL_DEBUG_SYMBOLS flag should only affect OPT builds
dcubed
parents:
12047
diff
changeset
|
173 |
|
2 | 174 |
$(ACTUAL_LIBRARY):: $(OBJDIR)/$(LIBRARY).lcf |
175 |
@$(prep-target) |
|
176 |
@$(MKDIR) -p $(OBJDIR) |
|
177 |
$(LINK) -dll -out:$(OBJDIR)/$(@F) \ |
|
12307
b34445ac110f
7157296: FDS: ENABLE_FULL_DEBUG_SYMBOLS flag should only affect OPT builds
dcubed
parents:
12047
diff
changeset
|
178 |
$(MAP_OPTION) \ |
2 | 179 |
$(LFLAGS) @$(OBJDIR)/$(LIBRARY).lcf \ |
10798
413b731e1818
7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents:
9050
diff
changeset
|
180 |
$(OTHER_LCF) $(LDLIBS) |
2 | 181 |
$(CP) $(OBJDIR)/$(@F) $@ |
8008
753c38f4af83
6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents:
7668
diff
changeset
|
182 |
@$(call binary_file_verification,$@) |
12307
b34445ac110f
7157296: FDS: ENABLE_FULL_DEBUG_SYMBOLS flag should only affect OPT builds
dcubed
parents:
12047
diff
changeset
|
183 |
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
12427 | 184 |
ifeq ($(ZIP_DEBUGINFO_FILES),1) |
185 |
(set -e ; \ |
|
186 |
$(CD) $(OBJDIR) ; \ |
|
187 |
$(ZIPEXE) -q $(LIBRARY).diz $(LIBRARY).map $(LIBRARY).pdb ; \ |
|
188 |
) |
|
189 |
$(CP) $(OBJDIR)/$(LIBRARY).diz $(@D) |
|
190 |
$(RM) $(OBJDIR)/$(LIBRARY).map $(OBJDIR)/$(LIBRARY).pdb |
|
191 |
else |
|
2 | 192 |
$(CP) $(OBJDIR)/$(LIBRARY).map $(@D) |
193 |
$(CP) $(OBJDIR)/$(LIBRARY).pdb $(@D) |
|
12427 | 194 |
endif |
12307
b34445ac110f
7157296: FDS: ENABLE_FULL_DEBUG_SYMBOLS flag should only affect OPT builds
dcubed
parents:
12047
diff
changeset
|
195 |
endif |
2 | 196 |
|
197 |
endif # LIBRARY |
|
198 |
||
199 |
$(OBJDIR)/$(LIBRARY).lcf: $(OBJDIR)/$(LIBRARY).res $(COMPILE_FILES_o) $(FILES_m) |
|
200 |
@$(prep-target) |
|
201 |
@$(MKDIR) -p $(TEMPDIR) |
|
13678
5c8001201f98
7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents:
12853
diff
changeset
|
202 |
@$(ECHO) $(sort $(FILES_o)) > $@ |
2 | 203 |
ifndef LOCAL_RESOURCE_FILE |
204 |
@$(ECHO) $(OBJDIR)/$(LIBRARY).res >> $@ |
|
205 |
endif |
|
206 |
@$(ECHO) Created $@ |
|
207 |
||
3111
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
1776
diff
changeset
|
208 |
# JDK name required here |
14091 | 209 |
RC_FLAGS += -D "JDK_FNAME=$(LIBRARY).dll" \ |
210 |
-D "JDK_INTERNAL_NAME=$(LIBRARY)" \ |
|
211 |
-D "JDK_FTYPE=0x2L" |
|
2 | 212 |
|
213 |
$(OBJDIR)/$(LIBRARY).res: $(VERSIONINFO_RESOURCE) |
|
214 |
ifndef LOCAL_RESOURCE_FILE |
|
215 |
@$(prep-target) |
|
216 |
$(RC) $(RC_FLAGS) $(CC_OBJECT_OUTPUT_FLAG)$(@) $(VERSIONINFO_RESOURCE) |
|
217 |
endif |
|
218 |
||
219 |
# |
|
220 |
# Install a .lib file if required. |
|
221 |
# |
|
222 |
ifeq ($(INSTALL_DOT_LIB), true) |
|
223 |
$(ACTUAL_LIBRARY):: $(LIBDIR)/$(LIBRARY).lib |
|
224 |
||
225 |
clean:: |
|
226 |
-$(RM) $(LIBDIR)/$(LIBRARY).lib |
|
227 |
||
228 |
$(LIBDIR)/$(LIBRARY).lib:: $(OBJDIR)/$(LIBRARY).lib |
|
229 |
$(install-file) |
|
230 |
||
231 |
$(LIBDIR)/$(LIBRARY).dll:: $(OBJDIR)/$(LIBRARY).dll |
|
232 |
$(install-file) |
|
233 |
||
234 |
endif # INSTALL_DOT_LIB |
|
235 |
||
236 |
else # PLATFORM |
|
237 |
||
238 |
# |
|
239 |
# On Solaris, use mcs to write the version into the comment section of |
|
240 |
# the shared library. On other platforms set this to false at the |
|
241 |
# make command line. |
|
242 |
# |
|
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10798
diff
changeset
|
243 |
|
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10798
diff
changeset
|
244 |
ifneq ($(PLATFORM), macosx) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10798
diff
changeset
|
245 |
ARFLAGS = -r |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10798
diff
changeset
|
246 |
endif |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
10798
diff
changeset
|
247 |
|
12853
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
248 |
ifeq ($(PLATFORM), solaris) |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
249 |
ifeq ($(LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS),1) |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
250 |
$(ACTUAL_LIBRARY):: $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
251 |
endif |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
252 |
endif |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
253 |
|
2 | 254 |
$(ACTUAL_LIBRARY):: $(COMPILE_FILES_o) $(FILES_m) $(FILES_reorder) |
255 |
@$(prep-target) |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
2
diff
changeset
|
256 |
@$(ECHO) "STATS: LIBRARY=$(LIBRARY), PRODUCT=$(PRODUCT), OPTIMIZATION_LEVEL=$(OPTIMIZATION_LEVEL)" |
2 | 257 |
@$(ECHO) "Rebuilding $@ because of $?" |
258 |
ifeq ($(LIBRARY), fdlibm) |
|
13678
5c8001201f98
7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents:
12853
diff
changeset
|
259 |
$(AR) $(ARFLAGS) $@ $(sort $(FILES_o)) |
2 | 260 |
else # LIBRARY |
13678
5c8001201f98
7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents:
12853
diff
changeset
|
261 |
$(LINKER) $(SHARED_LIBRARY_FLAG) -o $@ $(sort $(FILES_o)) $(LDLIBS) |
8008
753c38f4af83
6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents:
7668
diff
changeset
|
262 |
@$(call binary_file_verification,$@) |
2 | 263 |
ifeq ($(WRITE_LIBVERSION),true) |
264 |
$(MCS) -d -a "$(FULL_VERSION)" $@ |
|
265 |
endif # WRITE_LIBVERSION |
|
12427 | 266 |
ifneq ($(PLATFORM), macosx) |
267 |
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
|
268 |
ifeq ($(LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS),1) |
|
12853
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
269 |
ifeq ($(PLATFORM), solaris) |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
270 |
# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set. |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
271 |
# Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
272 |
# empty section headers until a fixed $(OBJCOPY) is available. |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
273 |
# An empty section header has sh_addr == 0 and sh_size == 0. |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
274 |
# This problem has only been seen on Solaris X64, but we call this tool |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
275 |
# on all Solaris builds just in case. |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
276 |
# |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
277 |
# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections. |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
278 |
# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available. |
12427 | 279 |
(set -e ; \ |
280 |
$(CD) $(@D) ; \ |
|
12853
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
281 |
$(FIX_EMPTY_SEC_HDR_FLAGS) $(@F) ; \ |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
282 |
$(OBJCOPY) --only-keep-debug $(@F) $(LIB_PREFIX)$(LIBRARY).debuginfo ; \ |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
283 |
$(ADD_GNU_DEBUGLINK) $(LIB_PREFIX)$(LIBRARY).debuginfo $(@F) ; \ |
12427 | 284 |
) |
12853
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
285 |
else # PLATFORM != solaris |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
286 |
(set -e ; \ |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
287 |
$(CD) $(@D) ; \ |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
288 |
$(OBJCOPY) --only-keep-debug $(@F) $(LIB_PREFIX)$(LIBRARY).debuginfo ; \ |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
289 |
$(OBJCOPY) --add-gnu-debuglink=$(LIB_PREFIX)$(LIBRARY).debuginfo $(@F) ; \ |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
290 |
) |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
291 |
endif # PLATFORM == solaris |
12427 | 292 |
ifeq ($(STRIP_POLICY),all_strip) |
293 |
$(STRIP) $@ |
|
294 |
else |
|
295 |
ifeq ($(STRIP_POLICY),min_strip) |
|
296 |
ifeq ($(PLATFORM), solaris) |
|
297 |
$(STRIP) -x $@ |
|
298 |
else |
|
299 |
# assume Linux |
|
300 |
$(STRIP) -g $@ |
|
301 |
endif |
|
302 |
# implied else here is no stripping at all |
|
303 |
endif |
|
304 |
endif |
|
305 |
ifeq ($(ZIP_DEBUGINFO_FILES),1) |
|
306 |
(set -e ; \ |
|
307 |
$(CD) $(@D) ; \ |
|
12853
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
308 |
$(ZIPEXE) -q $(LIB_PREFIX)$(LIBRARY).diz $(LIB_PREFIX)$(LIBRARY).debuginfo ; \ |
7bdaa5aefd3d
7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents:
12427
diff
changeset
|
309 |
$(RM) $(LIB_PREFIX)$(LIBRARY).debuginfo ; \ |
12427 | 310 |
) |
311 |
endif |
|
312 |
endif # LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS |
|
313 |
endif # ENABLE_FULL_DEBUG_SYMBOLS |
|
314 |
endif # PLATFORM-!macosx |
|
2 | 315 |
endif # LIBRARY |
316 |
||
317 |
endif # PLATFORM |
|
318 |
||
319 |
# |
|
320 |
# Cross check all linted files against each other |
|
321 |
# |
|
322 |
ifeq ($(PLATFORM),solaris) |
|
323 |
lint.errors : $(FILES_ln) |
|
324 |
$(LINT.c) $(FILES_ln) $(LDLIBS) |
|
325 |
endif |
|
326 |
||
327 |
# |
|
328 |
# Class libraries with JNI native methods get a include to the package. |
|
329 |
# |
|
330 |
ifdef PACKAGE |
|
331 |
vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR) |
|
332 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR) |
|
333 |
OTHER_INCLUDES += -I$(SHARE_SRC)/native/common -I$(PLATFORM_SRC)/native/common |
|
334 |
OTHER_INCLUDES += -I$(SHARE_SRC)/native/$(PKGDIR) \ |
|
335 |
-I$(PLATFORM_SRC)/native/$(PKGDIR) |
|
336 |
endif |
|
337 |
||
338 |
# |
|
339 |
# Clean/clobber rules |
|
340 |
# |
|
341 |
clean:: |
|
342 |
$(RM) -r $(ACTUAL_LIBRARY) |
|
343 |
||
344 |
clobber:: clean |
|
345 |
||
346 |
# |
|
347 |
# INCREMENTAL_BUILD means that this workspace will be built over and over |
|
348 |
# possibly incrementally. This means tracking the object file dependencies |
|
349 |
# on include files so that sources get re-compiled when the include files |
|
350 |
# change. When building from scratch and doing a one time build (like |
|
351 |
# release engineering or nightly builds) set INCREMENTAL_BUILD=false. |
|
352 |
# |
|
353 |
||
354 |
ifeq ($(INCREMENTAL_BUILD),true) |
|
355 |
||
356 |
# |
|
357 |
# Workaround: gnumake sometimes says files is empty when it shouldn't |
|
358 |
# was: files := $(foreach file, $(wildcard $(OBJDIR)/*.$(DEPEND_SUFFIX)), $(file)) |
|
359 |
# |
|
360 |
files := $(shell $(LS) $(OBJDIR)/*.$(DEPEND_SUFFIX) 2>/dev/null) |
|
361 |
||
362 |
# |
|
363 |
# Only include these files if we have any. |
|
364 |
# |
|
365 |
ifneq ($(strip $(files)),) |
|
366 |
||
367 |
include $(files) |
|
368 |
||
369 |
endif # files |
|
370 |
||
371 |
endif # INCREMENTAL_BUILD |
|
372 |
||
373 |
# |
|
374 |
# Default dependencies |
|
375 |
# |
|
376 |
||
377 |
all: build |
|
378 |
||
379 |
build: library |
|
380 |
||
381 |
debug: |
|
382 |
$(MAKE) VARIANT=DBG build |
|
383 |
||
384 |
fastdebug: |
|
385 |
$(MAKE) VARIANT=DBG FASTDEBUG=true build |
|
386 |
||
387 |
openjdk: |
|
388 |
$(MAKE) OPENJDK=true build |
|
389 |
||
4665
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3111
diff
changeset
|
390 |
FORCE: |
d14dc3d9e1fa
6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents:
3111
diff
changeset
|
391 |
|
2 | 392 |
.PHONY: all build debug fastdebug |
393 |