author | sherman |
Thu, 31 Jan 2013 13:13:14 -0800 | |
changeset 15516 | c2241c14b970 |
parent 14815 | 41114a74463a |
child 16447 | 234db5e2ae5e |
permissions | -rw-r--r-- |
1 | 1 |
# |
12501
ea7feae692ae
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
9411
diff
changeset
|
2 |
# Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. |
1 | 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 |
|
7 |
# published by the Free Software Foundation. |
|
8 |
# |
|
9 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
# accompanied this code). |
|
14 |
# |
|
15 |
# You should have received a copy of the GNU General Public License version |
|
16 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
# |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5093
diff
changeset
|
19 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5093
diff
changeset
|
20 |
# or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5093
diff
changeset
|
21 |
# questions. |
6453 | 22 |
# |
1 | 23 |
# |
24 |
||
25 |
# Note: this makefile is invoked both from build.bat and from the J2SE |
|
26 |
# control workspace in exactly the same manner; the required |
|
27 |
# environment variables (Variant, WorkSpace, BootStrapDir, BuildUser, HOTSPOT_BUILD_VERSION) |
|
28 |
# are passed in as command line arguments. |
|
29 |
||
5093
5fe28adc52ef
6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents:
5087
diff
changeset
|
30 |
# Note: Running nmake or build.bat from the Windows command shell requires |
5fe28adc52ef
6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents:
5087
diff
changeset
|
31 |
# that "sh" be accessible on the PATH. An MKS install does this. |
5fe28adc52ef
6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents:
5087
diff
changeset
|
32 |
|
1 | 33 |
# SA components are built if BUILD_WIN_SA=1 is specified. |
34 |
# See notes in README. This produces files: |
|
35 |
# 1. sa-jdi.jar - This is built before building jvm.dll |
|
14815
41114a74463a
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
12503
diff
changeset
|
36 |
# 2. sawindbg.dll - Native library for SA - This is built after jvm.dll |
1 | 37 |
# - Also, .lib, .map, .pdb. |
38 |
# |
|
39 |
# Please refer to ./makefiles/sa.make |
|
40 |
||
41 |
# If we haven't set an ARCH yet use x86 |
|
42 |
# create.bat and build.bat will set it, if used. |
|
43 |
!ifndef ARCH |
|
44 |
ARCH=x86 |
|
45 |
!endif |
|
46 |
||
47 |
||
48 |
# Must be one of these values (if value comes in from env, can't trust it) |
|
49 |
!if "$(ARCH)" != "x86" |
|
50 |
!if "$(ARCH)" != "ia64" |
|
51 |
ARCH=x86 |
|
52 |
!endif |
|
53 |
!endif |
|
54 |
||
55 |
# At this point we should be certain that ARCH has a definition |
|
56 |
# now determine the BUILDARCH |
|
57 |
# |
|
58 |
||
59 |
# the default BUILDARCH |
|
60 |
BUILDARCH=i486 |
|
61 |
||
62 |
# Allow control workspace to force Itanium or AMD64 builds with LP64 |
|
63 |
ARCH_TEXT= |
|
64 |
!ifdef LP64 |
|
65 |
!if "$(LP64)" == "1" |
|
66 |
ARCH_TEXT=64-Bit |
|
67 |
!if "$(ARCH)" == "x86" |
|
68 |
BUILDARCH=amd64 |
|
69 |
!else |
|
70 |
BUILDARCH=ia64 |
|
71 |
!endif |
|
72 |
!endif |
|
73 |
!endif |
|
74 |
||
75 |
!if "$(BUILDARCH)" != "ia64" |
|
76 |
!ifndef CC_INTERP |
|
7119 | 77 |
!ifndef FORCE_TIERED |
1 | 78 |
FORCE_TIERED=1 |
79 |
!endif |
|
80 |
!endif |
|
7119 | 81 |
!endif |
1 | 82 |
|
83 |
!if "$(BUILDARCH)" == "amd64" |
|
84 |
Platform_arch=x86 |
|
85 |
Platform_arch_model=x86_64 |
|
86 |
!endif |
|
87 |
!if "$(BUILDARCH)" == "i486" |
|
88 |
Platform_arch=x86 |
|
89 |
Platform_arch_model=x86_32 |
|
90 |
!endif |
|
91 |
||
92 |
# Supply these from the command line or the environment |
|
93 |
# It doesn't make sense to default this one |
|
94 |
Variant= |
|
95 |
# It doesn't make sense to default this one |
|
96 |
WorkSpace= |
|
97 |
||
98 |
variantDir = windows_$(BUILDARCH)_$(Variant) |
|
99 |
||
100 |
realVariant=$(Variant) |
|
101 |
VARIANT_TEXT=Core |
|
102 |
!if "$(Variant)" == "compiler1" |
|
103 |
VARIANT_TEXT=Client |
|
104 |
!elseif "$(Variant)" == "compiler2" |
|
7119 | 105 |
!if "$(FORCE_TIERED)" == "1" |
1 | 106 |
VARIANT_TEXT=Server |
107 |
realVariant=tiered |
|
108 |
!else |
|
109 |
VARIANT_TEXT=Server |
|
110 |
!endif |
|
111 |
!elseif "$(Variant)" == "tiered" |
|
112 |
VARIANT_TEXT=Tiered |
|
113 |
!elseif "$(Variant)" == "kernel" |
|
114 |
VARIANT_TEXT=Kernel |
|
115 |
!endif |
|
116 |
||
117 |
######################################################################### |
|
14815
41114a74463a
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
12503
diff
changeset
|
118 |
# Parameters for VERSIONINFO resource for jvm.dll. |
1 | 119 |
# These can be overridden via the nmake.exe command line. |
120 |
# They are overridden by RE during the control builds. |
|
121 |
# |
|
122 |
!include "$(WorkSpace)/make/hotspot_version" |
|
123 |
||
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
124 |
# Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro |
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
125 |
# or make/hotspot_distro. |
1 | 126 |
!ifndef HOTSPOT_VM_DISTRO |
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
127 |
!if exists($(WorkSpace)\src\closed) |
9411 | 128 |
|
129 |
# if the build is for JDK6 or earlier version, it should include jdk6_hotspot_distro, |
|
130 |
# instead of hotspot_distro. |
|
131 |
JDK6_OR_EARLIER=0 |
|
132 |
!if "$(JDK_MAJOR_VERSION)" != "" && "$(JDK_MINOR_VERSION)" != "" && "$(JDK_MICRO_VERSION)" != "" |
|
133 |
!if $(JDK_MAJOR_VERSION) == 1 && $(JDK_MINOR_VERSION) < 7 |
|
134 |
JDK6_OR_EARLIER=1 |
|
135 |
!endif |
|
136 |
!else |
|
137 |
!if $(JDK_MAJOR_VER) == 1 && $(JDK_MINOR_VER) < 7 |
|
138 |
JDK6_OR_EARLIER=1 |
|
139 |
!endif |
|
140 |
!endif |
|
141 |
||
142 |
!if $(JDK6_OR_EARLIER) == 1 |
|
143 |
!include $(WorkSpace)\make\jdk6_hotspot_distro |
|
144 |
!else |
|
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
145 |
!include $(WorkSpace)\make\hotspot_distro |
9411 | 146 |
!endif |
1 | 147 |
!else |
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
148 |
!include $(WorkSpace)\make\openjdk_distro |
1 | 149 |
!endif |
150 |
!endif |
|
151 |
||
152 |
# Following the Web Start / Plugin model here.... |
|
153 |
# We can have update versions like "01a", but Windows requires |
|
154 |
# we use only integers in the file version field. So: |
|
155 |
# JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION |
|
6453 | 156 |
# |
1 | 157 |
JDK_UPDATE_VER=0 |
158 |
JDK_BUILD_NUMBER=0 |
|
159 |
||
160 |
HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(ARCH_TEXT) $(VARIANT_TEXT) VM |
|
161 |
||
162 |
# JDK ProductVersion: |
|
163 |
# 1.5.0_<wx>-b<yz> will have DLL version 5.0.wx*10.yz |
|
164 |
# Thus, 1.5.0_10-b04 will be 5.0.100.4 |
|
165 |
# 1.6.0-b01 will be 6.0.0.1 |
|
166 |
# 1.6.0_01a-b02 will be 6.0.11.2 |
|
167 |
# |
|
168 |
# JDK_* variables are defined in make/hotspot_version or on command line |
|
6453 | 169 |
# |
1 | 170 |
JDK_VER=$(JDK_MINOR_VER),$(JDK_MICRO_VER),$(JDK_UPDATE_VER),$(JDK_BUILD_NUMBER) |
171 |
JDK_DOTVER=$(JDK_MINOR_VER).$(JDK_MICRO_VER).$(JDK_UPDATE_VER).$(JDK_BUILD_NUMBER) |
|
172 |
!if "$(JRE_RELEASE_VERSION)" == "" |
|
173 |
JRE_RELEASE_VER=$(JDK_MAJOR_VER).$(JDK_MINOR_VER).$(JDK_MICRO_VER) |
|
174 |
!else |
|
175 |
JRE_RELEASE_VER=$(JRE_RELEASE_VERSION) |
|
176 |
!endif |
|
177 |
!if "$(JDK_MKTG_VERSION)" == "" |
|
178 |
JDK_MKTG_VERSION=$(JDK_MINOR_VER).$(JDK_MICRO_VER) |
|
179 |
!endif |
|
180 |
||
181 |
# Hotspot Express VM FileVersion: |
|
182 |
# 10.0-b<yz> will have DLL version 10.0.0.yz (need 4 numbers). |
|
6453 | 183 |
# |
1 | 184 |
# HS_* variables are defined in make/hotspot_version |
185 |
# |
|
186 |
HS_VER=$(HS_MAJOR_VER),$(HS_MINOR_VER),0,$(HS_BUILD_NUMBER) |
|
187 |
HS_DOTVER=$(HS_MAJOR_VER).$(HS_MINOR_VER).0.$(HS_BUILD_NUMBER) |
|
188 |
||
189 |
!if "$(HOTSPOT_RELEASE_VERSION)" == "" |
|
190 |
HOTSPOT_RELEASE_VERSION=$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER) |
|
191 |
!endif |
|
192 |
||
193 |
!if "$(HOTSPOT_BUILD_VERSION)" == "" |
|
194 |
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION) |
|
195 |
!else |
|
196 |
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION) |
|
197 |
!endif |
|
198 |
||
199 |
# End VERSIONINFO parameters |
|
200 |
||
201 |
||
202 |
# We don't support SA on ia64, and we can't |
|
6453 | 203 |
# build it if we are using a version of Vis Studio |
1 | 204 |
# older than .Net 2003. |
205 |
# SA_INCLUDE and SA_LIB are hold-overs from a previous |
|
206 |
# implementation in which we could build SA using |
|
207 |
# Debugging Tools For Windows, in which the .h/.lib files |
|
208 |
# and the .dlls are in different places than |
|
209 |
# they are for Vis Studio .Net 2003. |
|
210 |
# If that code ever needs to be resurrected, these vars |
|
211 |
# can be set here. They are used in makefiles/sa.make. |
|
212 |
||
213 |
checkSA:: |
|
214 |
||
215 |
!if "$(BUILD_WIN_SA)" != "1" |
|
216 |
checkSA:: |
|
217 |
@echo Not building SA: BUILD_WIN_SA != 1 |
|
218 |
||
219 |
!elseif "$(ARCH)" == "ia64" |
|
220 |
BUILD_WIN_SA = 0 |
|
221 |
checkSA:: |
|
222 |
@echo Not building SA: ARCH = ia64 |
|
223 |
||
224 |
!endif # ! "$(BUILD_WIN_SA)" != "1" |
|
225 |
||
226 |
######################################################################### |
|
227 |
||
228 |
defaultTarget: product |
|
229 |
||
230 |
# The product or release build is an optimized build, and is the default |
|
231 |
||
232 |
# note that since all the build targets depend on local.make that BUILDARCH |
|
233 |
# and Platform_arch and Platform_arch_model will get set in local.make |
|
234 |
# and there is no need to pass them thru here on the command line |
|
235 |
# |
|
236 |
product release optimized: checks $(variantDir) $(variantDir)\local.make sanity |
|
237 |
cd $(variantDir) |
|
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
238 |
nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=product ARCH=$(ARCH) |
1 | 239 |
|
240 |
# The debug or jvmg (all the same thing) is an optional build |
|
241 |
debug jvmg: checks $(variantDir) $(variantDir)\local.make sanity |
|
242 |
cd $(variantDir) |
|
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
243 |
nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=debug ARCH=$(ARCH) |
1 | 244 |
fastdebug: checks $(variantDir) $(variantDir)\local.make sanity |
245 |
cd $(variantDir) |
|
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
246 |
nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=fastdebug ARCH=$(ARCH) |
1 | 247 |
|
248 |
develop: checks $(variantDir) $(variantDir)\local.make sanity |
|
249 |
cd $(variantDir) |
|
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
250 |
nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=product DEVELOP=1 ARCH=$(ARCH) |
1 | 251 |
|
5087
72635506e447
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
1609
diff
changeset
|
252 |
# target to create just the directory structure |
72635506e447
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
1609
diff
changeset
|
253 |
tree: checks $(variantDir) $(variantDir)\local.make sanity |
72635506e447
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
1609
diff
changeset
|
254 |
mkdir $(variantDir)\product |
72635506e447
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
1609
diff
changeset
|
255 |
mkdir $(variantDir)\debug |
72635506e447
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
1609
diff
changeset
|
256 |
mkdir $(variantDir)\fastdebug |
72635506e447
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
1609
diff
changeset
|
257 |
|
1 | 258 |
sanity: |
259 |
@ echo; |
|
260 |
@ cd $(variantDir) |
|
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
261 |
@ nmake -nologo -f $(WorkSpace)\make\windows\makefiles\sanity.make |
1 | 262 |
@ cd .. |
263 |
@ echo; |
|
264 |
||
265 |
clean: checkVariant |
|
266 |
- rm -r -f $(variantDir) |
|
267 |
||
268 |
$(variantDir): |
|
269 |
mkdir $(variantDir) |
|
270 |
||
271 |
$(variantDir)\local.make: checks |
|
272 |
@ echo # Generated file > $@ |
|
273 |
@ echo Variant=$(realVariant) >> $@ |
|
274 |
@ echo WorkSpace=$(WorkSpace) >> $@ |
|
275 |
@ echo BootStrapDir=$(BootStrapDir) >> $@ |
|
9411 | 276 |
@ if "$(USERNAME)" NEQ "" echo BuildUser=$(USERNAME) >> $@ |
1 | 277 |
@ echo HS_VER=$(HS_VER) >> $@ |
278 |
@ echo HS_DOTVER=$(HS_DOTVER) >> $@ |
|
279 |
@ echo HS_COMPANY=$(COMPANY_NAME) >> $@ |
|
280 |
@ echo HS_FILEDESC=$(HS_FILEDESC) >> $@ |
|
281 |
@ echo HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) >> $@ |
|
282 |
@ echo HS_COPYRIGHT=$(HOTSPOT_VM_COPYRIGHT) >> $@ |
|
283 |
@ echo HS_NAME=$(PRODUCT_NAME) $(JDK_MKTG_VERSION) >> $@ |
|
284 |
@ echo HS_BUILD_VER=$(HS_BUILD_VER) >> $@ |
|
285 |
@ echo BUILD_WIN_SA=$(BUILD_WIN_SA) >> $@ |
|
286 |
@ echo SA_BUILD_VERSION=$(HS_BUILD_VER) >> $@ |
|
287 |
@ echo SA_INCLUDE=$(SA_INCLUDE) >> $@ |
|
288 |
@ echo SA_LIB=$(SA_LIB) >> $@ |
|
289 |
@ echo JDK_VER=$(JDK_VER) >> $@ |
|
290 |
@ echo JDK_DOTVER=$(JDK_DOTVER) >> $@ |
|
291 |
@ echo JRE_RELEASE_VER=$(JRE_RELEASE_VER) >> $@ |
|
292 |
@ echo BUILDARCH=$(BUILDARCH) >> $@ |
|
293 |
@ echo Platform_arch=$(Platform_arch) >> $@ |
|
294 |
@ echo Platform_arch_model=$(Platform_arch_model) >> $@ |
|
11955
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
9411
diff
changeset
|
295 |
@ echo CXX=$(CXX) >> $@ |
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
9411
diff
changeset
|
296 |
@ echo LD=$(LD) >> $@ |
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
9411
diff
changeset
|
297 |
@ echo MT=$(MT) >> $@ |
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
9411
diff
changeset
|
298 |
@ echo RC=$(RC) >> $@ |
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
299 |
@ sh $(WorkSpace)/make/windows/get_msc_ver.sh >> $@ |
12501
ea7feae692ae
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
9411
diff
changeset
|
300 |
@ if "$(ENABLE_FULL_DEBUG_SYMBOLS)" NEQ "" echo ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) >> $@ |
ea7feae692ae
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
9411
diff
changeset
|
301 |
@ if "$(ZIP_DEBUGINFO_FILES)" NEQ "" echo ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) >> $@ |
ea7feae692ae
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
9411
diff
changeset
|
302 |
@ if "$(RM)" NEQ "" echo RM=$(RM) >> $@ |
ea7feae692ae
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
9411
diff
changeset
|
303 |
@ if "$(ZIPEXE)" NEQ "" echo ZIPEXE=$(ZIPEXE) >> $@ |
1 | 304 |
|
305 |
checks: checkVariant checkWorkSpace checkSA |
|
306 |
||
307 |
checkVariant: |
|
308 |
@ if "$(Variant)"=="" echo Need to specify "Variant=[tiered|compiler2|compiler1|kernel|core]" && false |
|
309 |
@ if "$(Variant)" NEQ "tiered" if "$(Variant)" NEQ "compiler2" if "$(Variant)" NEQ "compiler1" if "$(Variant)" NEQ "kernel" if "$(Variant)" NEQ "core" \ |
|
310 |
echo Need to specify "Variant=[tiered|compiler2|compiler1|kernel|core]" && false |
|
311 |
||
312 |
checkWorkSpace: |
|
313 |
@ if "$(WorkSpace)"=="" echo Need to specify "WorkSpace=..." && false |
|
314 |
||
315 |
checkBuildID: |
|
316 |
@ if "$(BuildID)"=="" echo Need to specify "BuildID=..." && false |