2362N/A# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A# This code is free software; you can redistribute it
and/or modify it
0N/A# under the terms of the GNU General Public License version 2 only, as
0N/A# published by the Free Software Foundation.
0N/A# This code is distributed in the hope that it will be useful, but WITHOUT
0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A# version 2 for more details (a copy is included in the LICENSE file that
0N/A# accompanied this code).
0N/A# You should have received a copy of the GNU General Public License version
0N/A# 2 along with this work; if not, write to the Free Software Foundation,
0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2362N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
0N/A# Note: this makefile is invoked both from
build.bat and from the J2SE
0N/A# control workspace in exactly the same manner; the required
0N/A# environment variables (Variant, WorkSpace, BootStrapDir, BuildUser, HOTSPOT_BUILD_VERSION)
0N/A# are passed in as command line arguments.
0N/A# Note: Running nmake or
build.bat from the Windows command shell requires
0N/A# that "sh" be accessible on the PATH. An MKS install does this.
# SA components are built if BUILD_WIN_SA=1 is specified.
# See notes in README. This produces files:
# 2. sawindbg[_g].dll - Native library for SA - This is built after
jvm.dll# - Also, .lib, .map, .pdb.
# If we haven't set an ARCH yet use x86
# Must be one of these values (if value comes in from env, can't trust it)
# At this point we should be certain that ARCH has a definition
# now determine the BUILDARCH
# Allow control workspace to force Itanium or AMD64 builds with LP64
!if "$(BUILDARCH)" != "amd64"
!if "$(BUILDARCH)" != "ia64"
!if "$(BUILDARCH)" == "amd64"
Platform_arch_model=x86_64
!if "$(BUILDARCH)" == "i486"
Platform_arch_model=x86_32
# Supply these from the command line or the environment
# It doesn't make sense to default this one
# It doesn't make sense to default this one
variantDir = windows_$(BUILDARCH)_$(Variant)
!if "$(Variant)" == "compiler1"
!elseif "$(Variant)" == "compiler2"
!elseif "$(Variant)" == "tiered"
!elseif "$(Variant)" == "kernel"
#########################################################################
# Parameters for VERSIONINFO resource for jvm[_g].dll.
# These can be overridden via the
nmake.exe command line.
# They are overridden by RE during the control builds.
!ifndef HOTSPOT_VM_DISTRO
!if exists($(WorkSpace)\src\closed)
!include $(WorkSpace)\make\hotspot_distro
!include $(WorkSpace)\make\openjdk_distro
# Following the Web Start / Plugin model here....
# We can have update versions like "01a", but Windows requires
# we use only integers in the file version field. So:
# JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION
HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(ARCH_TEXT) $(VARIANT_TEXT) VM
# Thus, 1.5.0_10-b04 will be 5.0.100.4
# 1.6.0-b01 will be 6.0.0.1
# 1.6.0_01a-b02 will be 6.0.11.2
JDK_VER=$(JDK_MINOR_VER),$(JDK_MICRO_VER),$(JDK_UPDATE_VER),$(JDK_BUILD_NUMBER)
JDK_DOTVER=$(JDK_MINOR_VER).$(JDK_MICRO_VER).$(JDK_UPDATE_VER).$(JDK_BUILD_NUMBER)
!if "$(JRE_RELEASE_VERSION)" == ""
JRE_RELEASE_VER=$(JDK_MAJOR_VER).$(JDK_MINOR_VER).$(JDK_MICRO_VER)
JRE_RELEASE_VER=$(JRE_RELEASE_VERSION)
!if "$(JDK_MKTG_VERSION)" == ""
JDK_MKTG_VERSION=$(JDK_MINOR_VER).$(JDK_MICRO_VER)
# Hotspot Express VM FileVersion:
# 10.0-b<yz> will have DLL version
10.0.0.yz (need 4 numbers).
HS_VER=$(HS_MAJOR_VER),$(HS_MINOR_VER),0,$(HS_BUILD_NUMBER)
HS_DOTVER=$(HS_MAJOR_VER).$(HS_MINOR_VER).0.$(HS_BUILD_NUMBER)
!if "$(HOTSPOT_RELEASE_VERSION)" == ""
HOTSPOT_RELEASE_VERSION=$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER)
!if "$(HOTSPOT_BUILD_VERSION)" == ""
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)
HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
# End VERSIONINFO parameters
# We don't support SA on ia64, and we can't
# build it if we are using a version of Vis Studio
# SA_INCLUDE and SA_LIB are hold-overs from a previous
# implementation in which we could build SA using
# Debugging Tools For Windows, in which the .h/.lib files
# and the .dlls are in different places than
# they are for Vis Studio .Net 2003.
# If that code ever needs to be resurrected, these vars
!if "$(BUILD_WIN_SA)" != "1"
@echo Not building SA: BUILD_WIN_SA != 1
!elseif "$(ARCH)" == "ia64"
@echo Not building SA: ARCH = ia64
!endif # ! "$(BUILD_WIN_SA)" != "1"
#########################################################################
# the dll's in the same directory, so we only build one at a time,
# re-directing the output to different output directories (done by user
# The product or release build is an optimized build, and is the default
# note that since all the build targets depend on
local.make that BUILDARCH
# and Platform_arch and Platform_arch_model will get set in
local.make# and there is no need to pass them thru here on the command line
product release optimized: checks $(variantDir) $(variantDir)\
local.make sanity
nmake -nologo -f $(WorkSpace)\make\windows\makefiles\
top.make BUILD_FLAVOR=product ARCH=$(ARCH)
# The debug or jvmg (all the same thing) is an optional build
debug jvmg: checks $(variantDir) $(variantDir)\
local.make sanity
nmake -nologo -f $(WorkSpace)\make\windows\makefiles\
top.make BUILD_FLAVOR=debug ARCH=$(ARCH)
fastdebug: checks $(variantDir) $(variantDir)\
local.make sanity
nmake -nologo -f $(WorkSpace)\make\windows\makefiles\
top.make BUILD_FLAVOR=fastdebug ARCH=$(ARCH)
develop: checks $(variantDir) $(variantDir)\
local.make sanity
nmake -nologo -f $(WorkSpace)\make\windows\makefiles\
top.make BUILD_FLAVOR=product DEVELOP=1 ARCH=$(ARCH)
# target to create just the directory structure
tree: checks $(variantDir) $(variantDir)\
local.make sanity
mkdir $(variantDir)\product
mkdir $(variantDir)\debug
mkdir $(variantDir)\fastdebug
@ nmake -nologo -f $(WorkSpace)\make\windows\makefiles\
sanity.make @ echo # Generated file > $@
@ echo Variant=$(realVariant) >> $@
@ echo WorkSpace=$(WorkSpace) >> $@
@ echo BootStrapDir=$(BootStrapDir) >> $@
@ if "$(USERNAME)" NEQ "" echo BuildUser=$(USERNAME) >> $@
@ echo HS_VER=$(HS_VER) >> $@
@ echo HS_DOTVER=$(HS_DOTVER) >> $@
@ echo HS_COMPANY=$(COMPANY_NAME) >> $@
@ echo HS_FILEDESC=$(HS_FILEDESC) >> $@
@ echo HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) >> $@
@ echo HS_COPYRIGHT=$(HOTSPOT_VM_COPYRIGHT) >> $@
@ echo HS_NAME=$(PRODUCT_NAME) $(JDK_MKTG_VERSION) >> $@
@ echo HS_BUILD_VER=$(HS_BUILD_VER) >> $@
@ echo BUILD_WIN_SA=$(BUILD_WIN_SA) >> $@
@ echo SA_BUILD_VERSION=$(HS_BUILD_VER) >> $@
@ echo SA_INCLUDE=$(SA_INCLUDE) >> $@
@ echo SA_LIB=$(SA_LIB) >> $@
@ echo JDK_VER=$(JDK_VER) >> $@
@ echo JDK_DOTVER=$(JDK_DOTVER) >> $@
@ echo JRE_RELEASE_VER=$(JRE_RELEASE_VER) >> $@
@ echo BUILDARCH=$(BUILDARCH) >> $@
@ echo Platform_arch=$(Platform_arch) >> $@
@ echo Platform_arch_model=$(Platform_arch_model) >> $@
checks: checkVariant checkWorkSpace checkSA
@ if "$(Variant)"=="" echo Need to specify "Variant=[tiered|compiler2|compiler1|kernel|core]" && false
@ if "$(Variant)" NEQ "tiered" if "$(Variant)" NEQ "compiler2" if "$(Variant)" NEQ "compiler1" if "$(Variant)" NEQ "kernel" if "$(Variant)" NEQ "core" \
echo Need to specify "Variant=[tiered|compiler2|compiler1|kernel|core]" && false
@ if "$(WorkSpace)"=="" echo Need to specify "WorkSpace=..." && false
@ if "$(BuildID)"=="" echo Need to specify "BuildID=..." && false