Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/make/windows/makefiles/defs.make
32285 views
#1# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.2# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3#4# This code is free software; you can redistribute it and/or modify it5# under the terms of the GNU General Public License version 2 only, as6# published by the Free Software Foundation.7#8# This code is distributed in the hope that it will be useful, but WITHOUT9# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11# version 2 for more details (a copy is included in the LICENSE file that12# accompanied this code).13#14# You should have received a copy of the GNU General Public License version15# 2 along with this work; if not, write to the Free Software Foundation,16# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17#18# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19# or visit www.oracle.com if you need additional information or have any20# questions.21#22#2324# The common definitions for hotspot windows builds.25# Include the top level defs.make under make directory instead of this one.26# This file is included into make/defs.make.27# On windows it is only used to construct parameters for28# make/windows/build.make when make/Makefile is used to build VM.2930SLASH_JAVA ?= J:31PATH_SEP = ;3233# Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name34ifeq ($(ARCH_DATA_MODEL),32)35ARCH_DATA_MODEL=3236PLATFORM=windows-i58637VM_PLATFORM=windows_i48638HS_ARCH=x8639MAKE_ARGS += ARCH=x8640MAKE_ARGS += BUILDARCH=i48641MAKE_ARGS += Platform_arch=x8642MAKE_ARGS += Platform_arch_model=x86_3243endif4445ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) x86),)46ARCH_DATA_MODEL=3247PLATFORM=windows-i58648VM_PLATFORM=windows_i48649HS_ARCH=x8650MAKE_ARGS += ARCH=x8651MAKE_ARGS += BUILDARCH=i48652MAKE_ARGS += Platform_arch=x8653MAKE_ARGS += Platform_arch_model=x86_3254endif5556ifneq ($(ARCH_DATA_MODEL),32)57ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) ia64),)58ARCH_DATA_MODEL=6459PLATFORM=windows-ia6460VM_PLATFORM=windows_ia6461HS_ARCH=ia6462MAKE_ARGS += LP64=163MAKE_ARGS += ARCH=ia6464MAKE_ARGS += BUILDARCH=ia6465MAKE_ARGS += Platform_arch=ia6466MAKE_ARGS += Platform_arch_model=ia6467endif6869# http://support.microsoft.com/kb/888731 : this can be either70# AMD64 for AMD, or EM64T for Intel chips.71ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) AMD64),)72ARCH_DATA_MODEL=6473PLATFORM=windows-amd6474VM_PLATFORM=windows_amd6475HS_ARCH=x8676MAKE_ARGS += LP64=177MAKE_ARGS += ARCH=x8678MAKE_ARGS += BUILDARCH=amd6479MAKE_ARGS += Platform_arch=x8680MAKE_ARGS += Platform_arch_model=x86_6481endif8283ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) EM64T),)84ARCH_DATA_MODEL=6485PLATFORM=windows-amd6486VM_PLATFORM=windows_amd6487HS_ARCH=x8688MAKE_ARGS += LP64=189MAKE_ARGS += ARCH=x8690MAKE_ARGS += BUILDARCH=amd6491MAKE_ARGS += Platform_arch=x8692MAKE_ARGS += Platform_arch_model=x86_6493endif9495# NB later OS versions than 2003 may report "Intel64"96ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) Intel64),)97ARCH_DATA_MODEL=6498PLATFORM=windows-amd6499VM_PLATFORM=windows_amd64100HS_ARCH=x86101MAKE_ARGS += LP64=1102MAKE_ARGS += ARCH=x86103MAKE_ARGS += BUILDARCH=amd64104MAKE_ARGS += Platform_arch=x86105MAKE_ARGS += Platform_arch_model=x86_64106endif107endif108109# Full Debug Symbols has been enabled on Windows since JDK1.4.1 so110# there is no need for an "earlier than JDK7 check".111# The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product112# builds is enabled with debug info files ZIP'ed to save space. For113# BUILD_FLAVOR != product builds, FDS is always enabled, after all a114# debug build without debug info isn't very useful.115# The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.116#117# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be118# disabled for a BUILD_FLAVOR == product build.119#120# Note: Use of a different variable name for the FDS override option121# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS122# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass123# in options via environment variables, use of distinct variables124# prevents strange behaviours. For example, in a BUILD_FLAVOR !=125# product build, the FULL_DEBUG_SYMBOLS environment variable will be126# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If127# the same variable name is used, then different values can be picked128# up by different parts of the build. Just to be clear, we only need129# two variable names because the incoming option value can be130# overridden in some situations, e.g., a BUILD_FLAVOR != product131# build.132133# Due to the multiple sub-make processes that occur this logic gets134# executed multiple times. We reduce the noise by at least checking that135# BUILD_FLAVOR has been set.136ifneq ($(BUILD_FLAVOR),)137ifeq ($(BUILD_FLAVOR), product)138FULL_DEBUG_SYMBOLS ?= 1139ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)140else141# debug variants always get Full Debug Symbols (if available)142ENABLE_FULL_DEBUG_SYMBOLS = 1143endif144_JUNK_ := $(shell \145echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")146MAKE_ARGS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)147148ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)149ZIP_DEBUGINFO_FILES ?= 1150else151ZIP_DEBUGINFO_FILES=0152endif153MAKE_ARGS += ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)154endif155156MAKE_ARGS += RM="$(RM)"157MAKE_ARGS += ZIPEXE=$(ZIPEXE)158159MAKE_ARGS += COMPANY_NAME="$(COMPANY_NAME)"160MAKE_ARGS += VENDOR_URL=$(VENDOR_URL)161MAKE_ARGS += VENDOR_URL_BUG=$(VENDOR_URL_BUG)162MAKE_ARGS += VENDOR_URL_VM_BUG=$(VENDOR_URL_VM_BUG)163ifneq ($(VERSION_CFLAGS),)164# transform syntax from -DProp='"Value"' to /D "Prop=\"Value\"" for Windows build165MAKE_ARGS += VERSION_CFLAGS="$(subst -D,/D \",$(subst ',,$(subst '$() $(),\"$() $(),$(subst ",\\\",$(VERSION_CFLAGS)))))\""166endif167168# On 32 bit windows we build server and client, on 64 bit just server.169ifeq ($(JVM_VARIANTS),)170ifeq ($(ARCH_DATA_MODEL), 32)171JVM_VARIANTS:=client,server172JVM_VARIANT_CLIENT:=true173JVM_VARIANT_SERVER:=true174else175JVM_VARIANTS:=server176JVM_VARIANT_SERVER:=true177endif178endif179180JDK_INCLUDE_SUBDIR=win32181182# Library suffix183LIBRARY_SUFFIX=dll184185# HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined186# and added to MAKE_ARGS list in $(GAMMADIR)/make/defs.make.187188# next parameters are defined in $(GAMMADIR)/make/defs.make.189MAKE_ARGS += JDK_MKTG_VERSION=$(JDK_MKTG_VERSION)190MAKE_ARGS += JDK_MAJOR_VER=$(JDK_MAJOR_VERSION)191MAKE_ARGS += JDK_MINOR_VER=$(JDK_MINOR_VERSION)192MAKE_ARGS += JDK_MICRO_VER=$(JDK_MICRO_VERSION)193194ifdef COOKED_JDK_UPDATE_VERSION195MAKE_ARGS += JDK_UPDATE_VER=$(COOKED_JDK_UPDATE_VERSION)196endif197198# COOKED_BUILD_NUMBER should only be set if we have a numeric199# build number. It must not be zero padded.200ifdef COOKED_BUILD_NUMBER201MAKE_ARGS += JDK_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)202endif203204NMAKE= MAKEFLAGS= MFLAGS= EXTRA_CFLAGS="$(EXTRA_CFLAGS)" nmake -NOLOGO205ifndef SYSTEM_UNAME206SYSTEM_UNAME := $(shell uname)207export SYSTEM_UNAME208endif209210# Check for CYGWIN211ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))212USING_CYGWIN=true213else214USING_CYGWIN=false215endif216# Check for MinGW217ifneq (,$(findstring MINGW,$(SYSTEM_UNAME)))218USING_MINGW=true219endif220221# Windows wants particular paths due to nmake (must be after macros defined)222# It is important that gnumake invokes nmake with C:\\...\\ formated223# strings so that nmake gets C:\...\ style strings.224# Check for CYGWIN225ifeq ($(USING_CYGWIN), true)226ABS_OUTPUTDIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(OUTPUTDIR)"))227ABS_BOOTDIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(BOOTDIR)"))228ABS_GAMMADIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(GAMMADIR)"))229ABS_OS_MAKEFILE := $(shell /bin/cygpath -m -a "$(HS_MAKE_DIR)/$(OSNAME)")/build.make230else ifeq ($(USING_MINGW), true)231ABS_OUTPUTDIR := $(shell $(CD) $(OUTPUTDIR);$(PWD))232ABS_BOOTDIR := $(shell $(CD) $(BOOTDIR);$(PWD))233ABS_GAMMADIR := $(shell $(CD) $(GAMMADIR);$(PWD))234ABS_OS_MAKEFILE := $(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make235else236ABS_OUTPUTDIR := $(subst /,\\,$(shell $(CD) $(OUTPUTDIR);$(PWD)))237ABS_BOOTDIR := $(subst /,\\,$(shell $(CD) $(BOOTDIR);$(PWD)))238ABS_GAMMADIR := $(subst /,\\,$(shell $(CD) $(GAMMADIR);$(PWD)))239ABS_OS_MAKEFILE := $(subst /,\\,$(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make)240endif241242# Disable building SA on windows until we are sure243# we want to release it. If we build it here,244# the SDK makefiles will copy it over and put it into245# the created image.246BUILD_WIN_SA = 1247ifneq ($(ALT_BUILD_WIN_SA),)248BUILD_WIN_SA = $(ALT_BUILD_WIN_SA)249endif250251ifeq ($(BUILD_WIN_SA), 1)252ifeq ($(ARCH),ia64)253BUILD_WIN_SA = 0254endif255endif256257EXPORT_SERVER_DIR = $(EXPORT_JRE_BIN_DIR)/server258EXPORT_CLIENT_DIR = $(EXPORT_JRE_BIN_DIR)/client259260ifeq ($(JVM_VARIANT_SERVER),true)261EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt262EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.$(LIBRARY_SUFFIX)263ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)264ifeq ($(ZIP_DEBUGINFO_FILES),1)265EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.diz266else267EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.pdb268EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.map269endif270endif271endif272ifeq ($(JVM_VARIANT_CLIENT),true)273EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt274EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.$(LIBRARY_SUFFIX)275ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)276ifeq ($(ZIP_DEBUGINFO_FILES),1)277EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.diz278else279EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.pdb280EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.map281endif282endif283endif284285EXPORT_LIST += $(EXPORT_LIB_DIR)/jvm.lib286287ifeq ($(BUILD_WIN_SA), 1)288EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.$(LIBRARY_SUFFIX)289ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)290ifeq ($(ZIP_DEBUGINFO_FILES),1)291EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.diz292else293EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.pdb294EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.map295endif296endif297EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar298# Must pass this down to nmake.299MAKE_ARGS += BUILD_WIN_SA=1300endif301302# Propagate compiler and tools paths from configure to nmake.303# Need to make sure they contain \\ and not /.304ifneq ($(SPEC),)305ifeq ($(USING_CYGWIN), true)306MAKE_ARGS += CXX="$(subst /,\\,$(shell /bin/cygpath -s -m -a $(CXX)))"307MAKE_ARGS += LD="$(subst /,\\,$(shell /bin/cygpath -s -m -a $(LD)))"308MAKE_ARGS += RC="$(subst /,\\,$(shell /bin/cygpath -s -m -a $(RC)))"309MAKE_ARGS += MT="$(subst /,\\,$(shell /bin/cygpath -s -m -a $(MT)))"310else311MAKE_ARGS += CXX="$(subst /,\\,$(CXX))"312MAKE_ARGS += LD="$(subst /,\\,$(LD))"313MAKE_ARGS += RC="$(subst /,\\,$(RC))"314MAKE_ARGS += MT="$(subst /,\\,$(MT))"315endif316endif317318MAKE_ARGS += ENABLE_JFR=$(ENABLE_JFR)319320321322