source: trunk/openjdk/hotspot/make/os2/build.make

Last change on this file was 311, checked in by dmik, 14 years ago

Adjust OS/2 makefiles to b24 changes.

File size: 7.5 KB
Line 
1#
2# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
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.cmd 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_SA_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.
35#
36# Please refer to ./makefiles/sa.make
37
38# If we haven't set an ARCH yet use x86
39ifndef ARCH
40ARCH=x86
41endif
42
43# At this point we should be certain that ARCH has a definition
44# now determine the BUILDARCH
45#
46
47# the default BUILDARCH
48BUILDARCH=i486
49
50ARCH_TEXT=
51
52ifndef CC_INTERP
53ifndef FORCE_TIERED
54FORCE_TIERED=1
55endif
56endif
57
58ifeq ($(BUILDARCH),i486)
59Platform_arch=x86
60Platform_arch_model=x86_32
61endif
62
63variantDir = os2_$(BUILDARCH)_$(Variant)
64
65realVariant=$(Variant)
66VARIANT_TEXT=Core
67ifeq ($(Variant),compiler1)
68VARIANT_TEXT=Client
69else
70 ifeq ($(Variant),compiler2)
71 ifeq ($(FORCE_TIERED),1)
72VARIANT_TEXT=Server
73realVariant=tiered
74 else
75VARIANT_TEXT=Server
76 endif
77 else
78 ifeq ($(Variant),tiered)
79VARIANT_TEXT=Tiered
80 else
81 ifeq ($(Variant),kernel)
82VARIANT_TEXT=Kernel
83 endif
84 endif
85 endif
86endif
87
88#########################################################################
89# Parameters for VERSIONINFO resource for jvm[_g].dll.
90# These can be overridden via the nmake.exe command line.
91# They are overridden by RE during the control builds.
92#
93
94include $(WorkSpace)/make/hotspot_version
95
96# Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro.
97ifndef HOTSPOT_VM_DISTRO
98include $(WorkSpace)/make/openjdk_distro
99endif
100
101# Following the Web Start / Plugin model here....
102# We can have update versions like "01a", but Windows requires
103# we use only integers in the file version field. So:
104# JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION
105#
106JDK_UPDATE_VER=0
107JDK_BUILD_NUMBER=0
108
109HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(ARCH_TEXT) $(VARIANT_TEXT) VM
110
111# JDK ProductVersion:
112# 1.5.0_<wx>-b<yz> will have DLL version 5.0.wx*10.yz
113# Thus, 1.5.0_10-b04 will be 5.0.100.4
114# 1.6.0-b01 will be 6.0.0.1
115# 1.6.0_01a-b02 will be 6.0.11.2
116#
117# JDK_* variables are defined in make/hotspot_version or on command line
118#
119JDK_VER=$(JDK_MINOR_VER),$(JDK_MICRO_VER),$(JDK_UPDATE_VER),$(JDK_BUILD_NUMBER)
120JDK_DOTVER=$(JDK_MINOR_VER).$(JDK_MICRO_VER).$(JDK_UPDATE_VER).$(JDK_BUILD_NUMBER)
121ifeq ($(JRE_RELEASE_VERSION),)
122JRE_RELEASE_VER=$(JDK_MAJOR_VER).$(JDK_MINOR_VER).$(JDK_MICRO_VER)
123else
124JRE_RELEASE_VER=$(JRE_RELEASE_VERSION)
125endif
126ifeq ($(JDK_MKTG_VERSION),)
127JDK_MKTG_VERSION=$(JDK_MINOR_VER).$(JDK_MICRO_VER)
128endif
129
130# Hotspot Express VM FileVersion:
131# 10.0-b<yz> will have DLL version 10.0.0.yz (need 4 numbers).
132#
133# HS_* variables are defined in make/hotspot_version
134#
135HS_VER=$(HS_MAJOR_VER),$(HS_MINOR_VER),0,$(HS_BUILD_NUMBER)
136HS_DOTVER=$(HS_MAJOR_VER).$(HS_MINOR_VER).0.$(HS_BUILD_NUMBER)
137
138ifeq ($(HOTSPOT_RELEASE_VERSION),)
139HOTSPOT_RELEASE_VERSION=$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER)
140endif
141
142ifeq ($(HOTSPOT_BUILD_VERSION),)
143HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)
144else
145HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
146endif
147
148# End VERSIONINFO parameters
149
150checkSA::
151
152ifneq ($(BUILD_OS2_SA),1)
153checkSA::
154 @echo Not building SA: BUILD_OS2_SA != 1
155endif
156
157#########################################################################
158
159# With the jvm_g.dll now being named jvm.dll, we can't build both and place
160# the dll's in the same directory, so we only build one at a time,
161# re-directing the output to different output directories (done by user
162# of this makefile).
163#
164defaultTarget: product
165
166# The product or release build is an optimized build, and is the default
167
168# note that since all the build targets depend on local.make that BUILDARCH
169# and Platform_arch and Platform_arch_model will get set in local.make
170# and there is no need to pass them thru here on the command line
171#
172product release optimized: checks $(variantDir) $(variantDir)/local.make sanity
173 cd $(variantDir); \
174 $(MAKE) -f $(WorkSpace)/make/os2/makefiles/top.make BUILD_FLAVOR=product ARCH=$(ARCH)
175
176# The debug or jvmg (all the same thing) is an optional build
177debug jvmg: checks $(variantDir) $(variantDir)/local.make sanity
178 cd $(variantDir); \
179 $(MAKE) -f $(WorkSpace)/make/os2/makefiles/top.make BUILD_FLAVOR=debug ARCH=$(ARCH)
180fastdebug: checks $(variantDir) $(variantDir)/local.make sanity
181 cd $(variantDir); \
182 $(MAKE) -f $(WorkSpace)/make/os2/makefiles/top.make BUILD_FLAVOR=fastdebug ARCH=$(ARCH)
183
184develop: checks $(variantDir) $(variantDir)/local.make sanity
185 cd $(variantDir); \
186 $(MAKE) -f $(WorkSpace)/make/os2/makefiles/top.make BUILD_FLAVOR=product DEVELOP=1 ARCH=$(ARCH)
187
188sanity:
189 @ echo; \
190 cd $(variantDir); \
191 $(MAKE) -f $(WorkSpace)/make/os2/makefiles/sanity.make; \
192 cd ..; \
193 echo;
194
195clean: checkVariant
196 - rm -r -f $(variantDir)
197
198$(variantDir):
199 mkdir -p $(variantDir)
200
201$(variantDir)/local.make: checks
202 @ echo \# Generated file > $@
203 @ echo Variant=$(realVariant) >> $@
204 @ echo WorkSpace=$(WorkSpace) >> $@
205 @ echo BootStrapDir=$(BootStrapDir) >> $@
206 @ $(if $(USERNAME),echo BuildUser=$(USERNAME) >> $@)
207 @ echo HS_VER=$(HS_VER) >> $@
208 @ echo HS_DOTVER=$(HS_DOTVER) >> $@
209 @ echo HS_COMPANY=$(COMPANY_NAME) >> $@
210 @ echo HS_FILEDESC=$(HS_FILEDESC) >> $@
211 @ echo HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) >> $@
212 @ echo HS_COPYRIGHT=$(HOTSPOT_VM_COPYRIGHT) >> $@
213 @ echo HS_NAME=$(PRODUCT_NAME) $(JDK_MKTG_VERSION) >> $@
214 @ echo HS_BUILD_VER=$(HS_BUILD_VER) >> $@
215 @ echo BUILD_OS2_SA=$(BUILD_OS2_SA) >> $@
216 @ echo SA_BUILD_VERSION=$(HS_BUILD_VER) >> $@
217 @ echo SA_INCLUDE=$(SA_INCLUDE) >> $@
218 @ echo SA_LIB=$(SA_LIB) >> $@
219 @ echo JDK_VER=$(JDK_VER) >> $@
220 @ echo JDK_DOTVER=$(JDK_DOTVER) >> $@
221 @ echo JRE_RELEASE_VER=$(JRE_RELEASE_VER) >> $@
222 @ echo BUILDARCH=$(BUILDARCH) >> $@
223 @ echo Platform_arch=$(Platform_arch) >> $@
224 @ echo Platform_arch_model=$(Platform_arch_model) >> $@
225
226checks: checkVariant checkWorkSpace checkSA
227
228checkVariant:
229 @ $(if $(filter tiered compiler2 compiler1 kernel core,$(Variant)),,\
230 echo ERROR: Need to specify "Variant=[tiered|compiler2|compiler1|kernel|core]" && false)
231
232checkWorkSpace:
233 @ $(if $(WorkSpace),,echo ERROR: Need to specify "WorkSpace=..." && false)
234
235checkBuildID:
236 @ $(if $(BuildID),,echo ERROR: Need to specify "BuildID=..." && false)
Note: See TracBrowser for help on using the repository browser.