3364N/A# Copyright (c) 1998, 2012, Oracle
and/or its affiliates. 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.
1472N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
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.
1328N/A# Note: Running nmake or
build.bat from the Windows command shell requires
1328N/A# that "sh" be accessible on the PATH. An MKS install does this.
0N/A# SA components are built if BUILD_WIN_SA=1 is specified.
0N/A# See notes in README. This produces files:
0N/A# 2. sawindbg[_g].dll - Native library for SA - This is built after
jvm.dll 0N/A# - Also, .lib, .map, .pdb.
0N/A# If we haven't set an ARCH yet use x86
0N/A# Must be one of these values (if value comes in from env, can't trust it)
0N/A!if "$(ARCH)" != "x86"
0N/A!if "$(ARCH)" != "ia64"
0N/A# At this point we should be certain that ARCH has a definition
0N/A# now determine the BUILDARCH
0N/A# the default BUILDARCH
0N/A# Allow control workspace to force Itanium or AMD64 builds with LP64
0N/A!if "$(ARCH)" == "x86"
0N/A!if "$(BUILDARCH)" != "ia64"
0N/A!if "$(BUILDARCH)" == "amd64"
0N/APlatform_arch_model=x86_64
0N/A!if "$(BUILDARCH)" == "i486"
0N/APlatform_arch_model=x86_32
0N/A# Supply these from the command line or the environment
0N/A# It doesn't make sense to default this one
0N/A# It doesn't make sense to default this one
0N/AvariantDir = windows_$(BUILDARCH)_$(Variant)
0N/ArealVariant=$(Variant)
0N/A!if "$(Variant)" == "compiler1"
0N/A!elseif "$(Variant)" == "compiler2"
1838N/A!if "$(FORCE_TIERED)" == "1"
0N/A!elseif "$(Variant)" == "tiered"
0N/A#########################################################################
0N/A# Parameters for VERSIONINFO resource for jvm[_g].dll.
0N/A# They are overridden by RE during the control builds.
0N/A!ifndef HOTSPOT_VM_DISTRO
91N/A!if exists($(WorkSpace)\src\closed)
2407N/A# if the build is for JDK6 or earlier version, it should include jdk6_hotspot_distro,
2407N/A# instead of hotspot_distro.
2407N/A!if "$(JDK_MAJOR_VERSION)" != "" && "$(JDK_MINOR_VERSION)" != "" && "$(JDK_MICRO_VERSION)" != ""
2407N/A!if $(JDK_MAJOR_VERSION) == 1 && $(JDK_MINOR_VERSION) < 7
2407N/A!if $(JDK_MAJOR_VER) == 1 && $(JDK_MINOR_VER) < 7
2407N/A!include $(WorkSpace)\make\jdk6_hotspot_distro
91N/A!include $(WorkSpace)\make\hotspot_distro
91N/A!include $(WorkSpace)\make\openjdk_distro
0N/A# Following the Web Start / Plugin model here....
0N/A# We can have update versions like "01a", but Windows requires
0N/A# we use only integers in the file version field. So:
0N/A# JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION
0N/AHS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(ARCH_TEXT) $(VARIANT_TEXT) VM
0N/A# JDK ProductVersion:
0N/A# Thus, 1.5.0_10-b04 will be 5.0.100.4
0N/A# 1.6.0-b01 will be 6.0.0.1
0N/A# 1.6.0_01a-b02 will be 6.0.11.2
0N/AJDK_VER=$(JDK_MINOR_VER),$(JDK_MICRO_VER),$(JDK_UPDATE_VER),$(JDK_BUILD_NUMBER)
0N/AJDK_DOTVER=$(JDK_MINOR_VER).$(JDK_MICRO_VER).$(JDK_UPDATE_VER).$(JDK_BUILD_NUMBER)
0N/A!if "$(JRE_RELEASE_VERSION)" == ""
0N/AJRE_RELEASE_VER=$(JDK_MAJOR_VER).$(JDK_MINOR_VER).$(JDK_MICRO_VER)
0N/AJRE_RELEASE_VER=$(JRE_RELEASE_VERSION)
0N/A!if "$(JDK_MKTG_VERSION)" == ""
0N/AJDK_MKTG_VERSION=$(JDK_MINOR_VER).$(JDK_MICRO_VER)
0N/A# Hotspot Express VM FileVersion:
0N/A# 10.0-b<yz> will have DLL version
10.0.0.yz (need 4 numbers).
0N/AHS_VER=$(HS_MAJOR_VER),$(HS_MINOR_VER),0,$(HS_BUILD_NUMBER)
0N/AHS_DOTVER=$(HS_MAJOR_VER).$(HS_MINOR_VER).0.$(HS_BUILD_NUMBER)
0N/A!if "$(HOTSPOT_RELEASE_VERSION)" == ""
0N/AHOTSPOT_RELEASE_VERSION=$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER)
0N/A!if "$(HOTSPOT_BUILD_VERSION)" == ""
0N/AHS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)
0N/AHS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
0N/A# End VERSIONINFO parameters
4349N/A# if hotspot-only build
and/or OPENJDK isn't passed down, need to set OPENJDK
4349N/A!if !exists($(WorkSpace)\src\closed)
0N/A# We don't support SA on ia64, and we can't
1703N/A# build it if we are using a version of Vis Studio
0N/A# older than .Net 2003.
0N/A# SA_INCLUDE and SA_LIB are hold-overs from a previous
0N/A# implementation in which we could build SA using
0N/A# Debugging Tools For Windows, in which the .h/.lib files
0N/A# and the .dlls are in different places than
0N/A# they are for Vis Studio .Net 2003.
0N/A# If that code ever needs to be resurrected, these vars
0N/A!if "$(BUILD_WIN_SA)" != "1"
0N/A @echo Not building SA: BUILD_WIN_SA != 1
0N/A!elseif "$(ARCH)" == "ia64"
0N/A @echo Not building SA: ARCH = ia64
0N/A!endif # ! "$(BUILD_WIN_SA)" != "1"
0N/A#########################################################################
0N/A# the dll's in the same directory, so we only build one at a time,
0N/A# re-directing the output to different output directories (done by user
0N/AdefaultTarget: product
0N/A# The product or release build is an optimized build, and is the default
0N/A# note that since all the build targets depend on
local.make that BUILDARCH
0N/A# and Platform_arch and Platform_arch_model will get set in
local.make 0N/A# and there is no need to pass them thru here on the command line
0N/Aproduct release optimized: checks $(variantDir) $(variantDir)\
local.make sanity
91N/A nmake -nologo -f $(WorkSpace)\make\windows\makefiles\
top.make BUILD_FLAVOR=product ARCH=$(ARCH)
0N/A# The debug or jvmg (all the same thing) is an optional build
91N/A nmake -nologo -f $(WorkSpace)\make\windows\makefiles\
top.make BUILD_FLAVOR=debug ARCH=$(ARCH)
91N/A nmake -nologo -f $(WorkSpace)\make\windows\makefiles\
top.make BUILD_FLAVOR=fastdebug ARCH=$(ARCH)
91N/A nmake -nologo -f $(WorkSpace)\make\windows\makefiles\
top.make BUILD_FLAVOR=product DEVELOP=1 ARCH=$(ARCH)
1322N/A# target to create just the directory structure
1322N/A mkdir $(variantDir)\product
1322N/A mkdir $(variantDir)\fastdebug
0N/A - rm -r -f $(variantDir)
0N/A @ echo # Generated file > $@
0N/A @ echo Variant=$(realVariant) >> $@
0N/A @ echo WorkSpace=$(WorkSpace) >> $@
0N/A @ echo BootStrapDir=$(BootStrapDir) >> $@
2407N/A @ if "$(USERNAME)" NEQ "" echo BuildUser=$(USERNAME) >> $@
0N/A @ echo HS_VER=$(HS_VER) >> $@
0N/A @ echo HS_DOTVER=$(HS_DOTVER) >> $@
0N/A @ echo HS_COMPANY=$(COMPANY_NAME) >> $@
0N/A @ echo HS_FILEDESC=$(HS_FILEDESC) >> $@
0N/A @ echo HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) >> $@
4349N/A @ if "$(OPENJDK)" NEQ "" echo OPENJDK=$(OPENJDK) >> $@
0N/A @ echo HS_COPYRIGHT=$(HOTSPOT_VM_COPYRIGHT) >> $@
0N/A @ echo HS_NAME=$(PRODUCT_NAME) $(JDK_MKTG_VERSION) >> $@
0N/A @ echo HS_BUILD_VER=$(HS_BUILD_VER) >> $@
0N/A @ echo BUILD_WIN_SA=$(BUILD_WIN_SA) >> $@
0N/A @ echo SA_BUILD_VERSION=$(HS_BUILD_VER) >> $@
0N/A @ echo SA_INCLUDE=$(SA_INCLUDE) >> $@
0N/A @ echo SA_LIB=$(SA_LIB) >> $@
0N/A @ echo JDK_VER=$(JDK_VER) >> $@
0N/A @ echo JDK_DOTVER=$(JDK_DOTVER) >> $@
0N/A @ echo JRE_RELEASE_VER=$(JRE_RELEASE_VER) >> $@
0N/A @ echo BUILDARCH=$(BUILDARCH) >> $@
0N/A @ echo Platform_arch=$(Platform_arch) >> $@
0N/A @ echo Platform_arch_model=$(Platform_arch_model) >> $@
3364N/A @ if "$(ENABLE_FULL_DEBUG_SYMBOLS)" NEQ "" echo ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) >> $@
3364N/A @ if "$(ZIP_DEBUGINFO_FILES)" NEQ "" echo ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) >> $@
3364N/A @ if "$(RM)" NEQ "" echo RM=$(RM) >> $@
3364N/A @ if "$(ZIPEXE)" NEQ "" echo ZIPEXE=$(ZIPEXE) >> $@
0N/Achecks: checkVariant checkWorkSpace checkSA
4341N/A @ if "$(Variant)"=="" echo Need to specify "Variant=[tiered|compiler2|compiler1|core]" && false
4341N/A @ if "$(Variant)" NEQ "tiered" if "$(Variant)" NEQ "compiler2" if "$(Variant)" NEQ "compiler1" if "$(Variant)" NEQ "core" \
4341N/A echo Need to specify "Variant=[tiered|compiler2|compiler1|core]" && false
0N/A @ if "$(WorkSpace)"=="" echo Need to specify "WorkSpace=..." && false
0N/A @ if "$(BuildID)"=="" echo Need to specify "BuildID=..." && false