author | rupashka |
Wed, 03 Mar 2010 20:08:55 +0300 | |
changeset 4967 | da853cd502c8 |
parent 1609 | 5eacab926e22 |
child 5087 | 72635506e447 |
permissions | -rw-r--r-- |
1 | 1 |
# |
670 | 2 |
# Copyright 1998-2008 Sun Microsystems, Inc. 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 |
# |
|
19 |
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
20 |
# CA 95054 USA or visit www.sun.com if you need additional information or |
|
21 |
# have any questions. |
|
22 |
# |
|
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 |
||
30 |
# SA components are built if BUILD_WIN_SA=1 is specified. |
|
31 |
# See notes in README. This produces files: |
|
32 |
# 1. sa-jdi.jar - This is built before building jvm.dll |
|
33 |
# 2. sawindbg[_g].dll - Native library for SA - This is built after jvm.dll |
|
34 |
# - Also, .lib, .map, .pdb. |
|
35 |
# |
|
36 |
# Please refer to ./makefiles/sa.make |
|
37 |
||
38 |
# If we haven't set an ARCH yet use x86 |
|
39 |
# create.bat and build.bat will set it, if used. |
|
40 |
!ifndef ARCH |
|
41 |
ARCH=x86 |
|
42 |
!endif |
|
43 |
||
44 |
||
45 |
# Must be one of these values (if value comes in from env, can't trust it) |
|
46 |
!if "$(ARCH)" != "x86" |
|
47 |
!if "$(ARCH)" != "ia64" |
|
48 |
ARCH=x86 |
|
49 |
!endif |
|
50 |
!endif |
|
51 |
||
52 |
# At this point we should be certain that ARCH has a definition |
|
53 |
# now determine the BUILDARCH |
|
54 |
# |
|
55 |
||
56 |
# the default BUILDARCH |
|
57 |
BUILDARCH=i486 |
|
58 |
||
59 |
# Allow control workspace to force Itanium or AMD64 builds with LP64 |
|
60 |
ARCH_TEXT= |
|
61 |
!ifdef LP64 |
|
62 |
!if "$(LP64)" == "1" |
|
63 |
ARCH_TEXT=64-Bit |
|
64 |
!if "$(ARCH)" == "x86" |
|
65 |
BUILDARCH=amd64 |
|
66 |
!else |
|
67 |
BUILDARCH=ia64 |
|
68 |
!endif |
|
69 |
!endif |
|
70 |
!endif |
|
71 |
||
72 |
!if "$(BUILDARCH)" != "amd64" |
|
73 |
!if "$(BUILDARCH)" != "ia64" |
|
74 |
!ifndef CC_INTERP |
|
75 |
FORCE_TIERED=1 |
|
76 |
!endif |
|
77 |
!endif |
|
78 |
!endif |
|
79 |
||
80 |
!if "$(BUILDARCH)" == "amd64" |
|
81 |
Platform_arch=x86 |
|
82 |
Platform_arch_model=x86_64 |
|
83 |
!endif |
|
84 |
!if "$(BUILDARCH)" == "i486" |
|
85 |
Platform_arch=x86 |
|
86 |
Platform_arch_model=x86_32 |
|
87 |
!endif |
|
88 |
||
89 |
# Supply these from the command line or the environment |
|
90 |
# It doesn't make sense to default this one |
|
91 |
Variant= |
|
92 |
# It doesn't make sense to default this one |
|
93 |
WorkSpace= |
|
94 |
||
95 |
variantDir = windows_$(BUILDARCH)_$(Variant) |
|
96 |
||
97 |
realVariant=$(Variant) |
|
98 |
VARIANT_TEXT=Core |
|
99 |
!if "$(Variant)" == "compiler1" |
|
100 |
VARIANT_TEXT=Client |
|
101 |
!elseif "$(Variant)" == "compiler2" |
|
102 |
!ifdef FORCE_TIERED |
|
103 |
VARIANT_TEXT=Server |
|
104 |
realVariant=tiered |
|
105 |
!else |
|
106 |
VARIANT_TEXT=Server |
|
107 |
!endif |
|
108 |
!elseif "$(Variant)" == "tiered" |
|
109 |
VARIANT_TEXT=Tiered |
|
110 |
!elseif "$(Variant)" == "kernel" |
|
111 |
VARIANT_TEXT=Kernel |
|
112 |
!endif |
|
113 |
||
114 |
######################################################################### |
|
115 |
# Parameters for VERSIONINFO resource for jvm[_g].dll. |
|
116 |
# These can be overridden via the nmake.exe command line. |
|
117 |
# They are overridden by RE during the control builds. |
|
118 |
# |
|
119 |
!include "$(WorkSpace)/make/hotspot_version" |
|
120 |
||
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
121 |
# 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
|
122 |
# or make/hotspot_distro. |
1 | 123 |
!ifndef HOTSPOT_VM_DISTRO |
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
124 |
!if exists($(WorkSpace)\src\closed) |
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
125 |
!include $(WorkSpace)\make\hotspot_distro |
1 | 126 |
!else |
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
127 |
!include $(WorkSpace)\make\openjdk_distro |
1 | 128 |
!endif |
129 |
!endif |
|
130 |
||
131 |
# Following the Web Start / Plugin model here.... |
|
132 |
# We can have update versions like "01a", but Windows requires |
|
133 |
# we use only integers in the file version field. So: |
|
134 |
# JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION |
|
135 |
# |
|
136 |
JDK_UPDATE_VER=0 |
|
137 |
JDK_BUILD_NUMBER=0 |
|
138 |
||
139 |
HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(ARCH_TEXT) $(VARIANT_TEXT) VM |
|
140 |
||
141 |
# JDK ProductVersion: |
|
142 |
# 1.5.0_<wx>-b<yz> will have DLL version 5.0.wx*10.yz |
|
143 |
# Thus, 1.5.0_10-b04 will be 5.0.100.4 |
|
144 |
# 1.6.0-b01 will be 6.0.0.1 |
|
145 |
# 1.6.0_01a-b02 will be 6.0.11.2 |
|
146 |
# |
|
147 |
# JDK_* variables are defined in make/hotspot_version or on command line |
|
148 |
# |
|
149 |
JDK_VER=$(JDK_MINOR_VER),$(JDK_MICRO_VER),$(JDK_UPDATE_VER),$(JDK_BUILD_NUMBER) |
|
150 |
JDK_DOTVER=$(JDK_MINOR_VER).$(JDK_MICRO_VER).$(JDK_UPDATE_VER).$(JDK_BUILD_NUMBER) |
|
151 |
!if "$(JRE_RELEASE_VERSION)" == "" |
|
152 |
JRE_RELEASE_VER=$(JDK_MAJOR_VER).$(JDK_MINOR_VER).$(JDK_MICRO_VER) |
|
153 |
!else |
|
154 |
JRE_RELEASE_VER=$(JRE_RELEASE_VERSION) |
|
155 |
!endif |
|
156 |
!if "$(JDK_MKTG_VERSION)" == "" |
|
157 |
JDK_MKTG_VERSION=$(JDK_MINOR_VER).$(JDK_MICRO_VER) |
|
158 |
!endif |
|
159 |
||
160 |
# Hotspot Express VM FileVersion: |
|
161 |
# 10.0-b<yz> will have DLL version 10.0.0.yz (need 4 numbers). |
|
162 |
# |
|
163 |
# HS_* variables are defined in make/hotspot_version |
|
164 |
# |
|
165 |
HS_VER=$(HS_MAJOR_VER),$(HS_MINOR_VER),0,$(HS_BUILD_NUMBER) |
|
166 |
HS_DOTVER=$(HS_MAJOR_VER).$(HS_MINOR_VER).0.$(HS_BUILD_NUMBER) |
|
167 |
||
168 |
!if "$(HOTSPOT_RELEASE_VERSION)" == "" |
|
169 |
HOTSPOT_RELEASE_VERSION=$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER) |
|
170 |
!endif |
|
171 |
||
172 |
!if "$(HOTSPOT_BUILD_VERSION)" == "" |
|
173 |
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION) |
|
174 |
!else |
|
175 |
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION) |
|
176 |
!endif |
|
177 |
||
178 |
# End VERSIONINFO parameters |
|
179 |
||
180 |
||
181 |
# We don't support SA on ia64, and we can't |
|
182 |
# build it if we are using a version of Vis Studio |
|
183 |
# older than .Net 2003. |
|
184 |
# SA_INCLUDE and SA_LIB are hold-overs from a previous |
|
185 |
# implementation in which we could build SA using |
|
186 |
# Debugging Tools For Windows, in which the .h/.lib files |
|
187 |
# and the .dlls are in different places than |
|
188 |
# they are for Vis Studio .Net 2003. |
|
189 |
# If that code ever needs to be resurrected, these vars |
|
190 |
# can be set here. They are used in makefiles/sa.make. |
|
191 |
||
192 |
checkSA:: |
|
193 |
||
194 |
!if "$(BUILD_WIN_SA)" != "1" |
|
195 |
checkSA:: |
|
196 |
@echo Not building SA: BUILD_WIN_SA != 1 |
|
197 |
||
198 |
!elseif "$(ARCH)" == "ia64" |
|
199 |
BUILD_WIN_SA = 0 |
|
200 |
checkSA:: |
|
201 |
@echo Not building SA: ARCH = ia64 |
|
202 |
||
203 |
!endif # ! "$(BUILD_WIN_SA)" != "1" |
|
204 |
||
205 |
######################################################################### |
|
206 |
||
207 |
# With the jvm_g.dll now being named jvm.dll, we can't build both and place |
|
208 |
# the dll's in the same directory, so we only build one at a time, |
|
209 |
# re-directing the output to different output directories (done by user |
|
210 |
# of this makefile). |
|
211 |
# |
|
212 |
defaultTarget: product |
|
213 |
||
214 |
# The product or release build is an optimized build, and is the default |
|
215 |
||
216 |
# note that since all the build targets depend on local.make that BUILDARCH |
|
217 |
# and Platform_arch and Platform_arch_model will get set in local.make |
|
218 |
# and there is no need to pass them thru here on the command line |
|
219 |
# |
|
220 |
product release optimized: checks $(variantDir) $(variantDir)\local.make sanity |
|
221 |
cd $(variantDir) |
|
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
222 |
nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=product ARCH=$(ARCH) |
1 | 223 |
|
224 |
# The debug or jvmg (all the same thing) is an optional build |
|
225 |
debug jvmg: checks $(variantDir) $(variantDir)\local.make sanity |
|
226 |
cd $(variantDir) |
|
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
227 |
nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=debug ARCH=$(ARCH) |
1 | 228 |
fastdebug: checks $(variantDir) $(variantDir)\local.make sanity |
229 |
cd $(variantDir) |
|
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
230 |
nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=fastdebug ARCH=$(ARCH) |
1 | 231 |
|
232 |
develop: checks $(variantDir) $(variantDir)\local.make sanity |
|
233 |
cd $(variantDir) |
|
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
234 |
nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=product DEVELOP=1 ARCH=$(ARCH) |
1 | 235 |
|
236 |
sanity: |
|
237 |
@ echo; |
|
238 |
@ cd $(variantDir) |
|
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
239 |
@ nmake -nologo -f $(WorkSpace)\make\windows\makefiles\sanity.make |
1 | 240 |
@ cd .. |
241 |
@ echo; |
|
242 |
||
243 |
clean: checkVariant |
|
244 |
- rm -r -f $(variantDir) |
|
245 |
||
246 |
$(variantDir): |
|
247 |
mkdir $(variantDir) |
|
248 |
||
249 |
$(variantDir)\local.make: checks |
|
250 |
@ echo # Generated file > $@ |
|
251 |
@ echo Variant=$(realVariant) >> $@ |
|
252 |
@ echo WorkSpace=$(WorkSpace) >> $@ |
|
253 |
@ echo BootStrapDir=$(BootStrapDir) >> $@ |
|
254 |
@ if "$(USERNAME)" NEQ "" echo BuildUser=$(USERNAME) >> $@ |
|
255 |
@ echo HS_VER=$(HS_VER) >> $@ |
|
256 |
@ echo HS_DOTVER=$(HS_DOTVER) >> $@ |
|
257 |
@ echo HS_COMPANY=$(COMPANY_NAME) >> $@ |
|
258 |
@ echo HS_FILEDESC=$(HS_FILEDESC) >> $@ |
|
259 |
@ echo HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) >> $@ |
|
260 |
@ echo HS_COPYRIGHT=$(HOTSPOT_VM_COPYRIGHT) >> $@ |
|
261 |
@ echo HS_NAME=$(PRODUCT_NAME) $(JDK_MKTG_VERSION) >> $@ |
|
262 |
@ echo HS_BUILD_VER=$(HS_BUILD_VER) >> $@ |
|
263 |
@ echo BUILD_WIN_SA=$(BUILD_WIN_SA) >> $@ |
|
264 |
@ echo SA_BUILD_VERSION=$(HS_BUILD_VER) >> $@ |
|
265 |
@ echo SA_INCLUDE=$(SA_INCLUDE) >> $@ |
|
266 |
@ echo SA_LIB=$(SA_LIB) >> $@ |
|
267 |
@ echo JDK_VER=$(JDK_VER) >> $@ |
|
268 |
@ echo JDK_DOTVER=$(JDK_DOTVER) >> $@ |
|
269 |
@ echo JRE_RELEASE_VER=$(JRE_RELEASE_VER) >> $@ |
|
270 |
@ echo BUILDARCH=$(BUILDARCH) >> $@ |
|
271 |
@ echo Platform_arch=$(Platform_arch) >> $@ |
|
272 |
@ echo Platform_arch_model=$(Platform_arch_model) >> $@ |
|
338
5cf9f61d76f4
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
1
diff
changeset
|
273 |
@ sh $(WorkSpace)/make/windows/get_msc_ver.sh >> $@ |
1 | 274 |
|
275 |
checks: checkVariant checkWorkSpace checkSA |
|
276 |
||
277 |
checkVariant: |
|
278 |
@ if "$(Variant)"=="" echo Need to specify "Variant=[tiered|compiler2|compiler1|kernel|core]" && false |
|
279 |
@ if "$(Variant)" NEQ "tiered" if "$(Variant)" NEQ "compiler2" if "$(Variant)" NEQ "compiler1" if "$(Variant)" NEQ "kernel" if "$(Variant)" NEQ "core" \ |
|
280 |
echo Need to specify "Variant=[tiered|compiler2|compiler1|kernel|core]" && false |
|
281 |
||
282 |
checkWorkSpace: |
|
283 |
@ if "$(WorkSpace)"=="" echo Need to specify "WorkSpace=..." && false |
|
284 |
||
285 |
checkBuildID: |
|
286 |
@ if "$(BuildID)"=="" echo Need to specify "BuildID=..." && false |