2007-12-01 00:00:00 +00:00
|
|
|
#
|
2015-06-12 06:31:01 +00:00
|
|
|
# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
|
2007-12-01 00:00:00 +00:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# This code is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License version 2 only, as
|
|
|
|
# published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
# version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
# accompanied this code).
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License version
|
|
|
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
2010-05-28 02:08:38 +00:00
|
|
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
# or visit www.oracle.com if you need additional information or have any
|
|
|
|
# questions.
|
2013-04-12 22:53:30 +00:00
|
|
|
#
|
2007-12-01 00:00:00 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# The common definitions for hotspot windows builds.
|
|
|
|
# Include the top level defs.make under make directory instead of this one.
|
|
|
|
# This file is included into make/defs.make.
|
2008-11-12 06:01:08 +00:00
|
|
|
# On windows it is only used to construct parameters for
|
2008-04-09 18:22:48 +00:00
|
|
|
# make/windows/build.make when make/Makefile is used to build VM.
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
SLASH_JAVA ?= J:
|
|
|
|
PATH_SEP = ;
|
|
|
|
|
2015-11-09 09:59:59 +00:00
|
|
|
MAKE_ARGS += WARNINGS_AS_ERRORS=$(WARNINGS_AS_ERRORS)
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
# Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
|
2010-06-29 23:33:41 +00:00
|
|
|
ifeq ($(ARCH_DATA_MODEL),32)
|
2007-12-01 00:00:00 +00:00
|
|
|
ARCH_DATA_MODEL=32
|
|
|
|
PLATFORM=windows-i586
|
|
|
|
VM_PLATFORM=windows_i486
|
|
|
|
HS_ARCH=x86
|
|
|
|
MAKE_ARGS += ARCH=x86
|
|
|
|
MAKE_ARGS += BUILDARCH=i486
|
|
|
|
MAKE_ARGS += Platform_arch=x86
|
|
|
|
MAKE_ARGS += Platform_arch_model=x86_32
|
|
|
|
endif
|
|
|
|
|
2010-06-29 23:33:41 +00:00
|
|
|
ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) x86),)
|
|
|
|
ARCH_DATA_MODEL=32
|
|
|
|
PLATFORM=windows-i586
|
|
|
|
VM_PLATFORM=windows_i486
|
2007-12-01 00:00:00 +00:00
|
|
|
HS_ARCH=x86
|
|
|
|
MAKE_ARGS += ARCH=x86
|
2010-06-29 23:33:41 +00:00
|
|
|
MAKE_ARGS += BUILDARCH=i486
|
2007-12-01 00:00:00 +00:00
|
|
|
MAKE_ARGS += Platform_arch=x86
|
2010-06-29 23:33:41 +00:00
|
|
|
MAKE_ARGS += Platform_arch_model=x86_32
|
2007-12-01 00:00:00 +00:00
|
|
|
endif
|
|
|
|
|
2010-06-29 23:33:41 +00:00
|
|
|
ifneq ($(ARCH_DATA_MODEL),32)
|
|
|
|
ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) ia64),)
|
|
|
|
ARCH_DATA_MODEL=64
|
|
|
|
PLATFORM=windows-ia64
|
|
|
|
VM_PLATFORM=windows_ia64
|
|
|
|
HS_ARCH=ia64
|
|
|
|
MAKE_ARGS += LP64=1
|
|
|
|
MAKE_ARGS += ARCH=ia64
|
|
|
|
MAKE_ARGS += BUILDARCH=ia64
|
|
|
|
MAKE_ARGS += Platform_arch=ia64
|
|
|
|
MAKE_ARGS += Platform_arch_model=ia64
|
|
|
|
endif
|
|
|
|
|
|
|
|
# http://support.microsoft.com/kb/888731 : this can be either
|
|
|
|
# AMD64 for AMD, or EM64T for Intel chips.
|
|
|
|
ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) AMD64),)
|
|
|
|
ARCH_DATA_MODEL=64
|
|
|
|
PLATFORM=windows-amd64
|
|
|
|
VM_PLATFORM=windows_amd64
|
|
|
|
HS_ARCH=x86
|
|
|
|
MAKE_ARGS += LP64=1
|
|
|
|
MAKE_ARGS += ARCH=x86
|
|
|
|
MAKE_ARGS += BUILDARCH=amd64
|
|
|
|
MAKE_ARGS += Platform_arch=x86
|
|
|
|
MAKE_ARGS += Platform_arch_model=x86_64
|
|
|
|
endif
|
|
|
|
|
2010-06-16 16:42:20 +00:00
|
|
|
ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) EM64T),)
|
2010-06-29 23:33:41 +00:00
|
|
|
ARCH_DATA_MODEL=64
|
|
|
|
PLATFORM=windows-amd64
|
|
|
|
VM_PLATFORM=windows_amd64
|
|
|
|
HS_ARCH=x86
|
|
|
|
MAKE_ARGS += LP64=1
|
|
|
|
MAKE_ARGS += ARCH=x86
|
|
|
|
MAKE_ARGS += BUILDARCH=amd64
|
|
|
|
MAKE_ARGS += Platform_arch=x86
|
|
|
|
MAKE_ARGS += Platform_arch_model=x86_64
|
|
|
|
endif
|
2010-06-16 16:42:20 +00:00
|
|
|
|
2010-05-11 21:35:43 +00:00
|
|
|
# NB later OS versions than 2003 may report "Intel64"
|
2010-06-29 23:33:41 +00:00
|
|
|
ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) Intel64),)
|
|
|
|
ARCH_DATA_MODEL=64
|
|
|
|
PLATFORM=windows-amd64
|
|
|
|
VM_PLATFORM=windows_amd64
|
|
|
|
HS_ARCH=x86
|
|
|
|
MAKE_ARGS += LP64=1
|
|
|
|
MAKE_ARGS += ARCH=x86
|
|
|
|
MAKE_ARGS += BUILDARCH=amd64
|
|
|
|
MAKE_ARGS += Platform_arch=x86
|
|
|
|
MAKE_ARGS += Platform_arch_model=x86_64
|
|
|
|
endif
|
2010-05-11 21:35:43 +00:00
|
|
|
endif
|
|
|
|
|
2012-03-23 18:50:33 +00:00
|
|
|
# Full Debug Symbols has been enabled on Windows since JDK1.4.1 so
|
|
|
|
# there is no need for an "earlier than JDK7 check".
|
2012-04-03 16:48:34 +00:00
|
|
|
# The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
|
|
|
|
# builds is enabled with debug info files ZIP'ed to save space. For
|
|
|
|
# BUILD_FLAVOR != product builds, FDS is always enabled, after all a
|
|
|
|
# debug build without debug info isn't very useful.
|
|
|
|
# The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
|
|
|
|
#
|
|
|
|
# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
|
|
|
|
# disabled for a BUILD_FLAVOR == product build.
|
|
|
|
#
|
|
|
|
# Note: Use of a different variable name for the FDS override option
|
|
|
|
# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
|
|
|
|
# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
|
|
|
|
# in options via environment variables, use of distinct variables
|
|
|
|
# prevents strange behaviours. For example, in a BUILD_FLAVOR !=
|
|
|
|
# product build, the FULL_DEBUG_SYMBOLS environment variable will be
|
|
|
|
# 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
|
|
|
|
# the same variable name is used, then different values can be picked
|
|
|
|
# up by different parts of the build. Just to be clear, we only need
|
|
|
|
# two variable names because the incoming option value can be
|
|
|
|
# overridden in some situations, e.g., a BUILD_FLAVOR != product
|
|
|
|
# build.
|
2012-03-23 18:50:33 +00:00
|
|
|
|
2012-11-06 00:33:44 +00:00
|
|
|
# Due to the multiple sub-make processes that occur this logic gets
|
|
|
|
# executed multiple times. We reduce the noise by at least checking that
|
|
|
|
# BUILD_FLAVOR has been set.
|
|
|
|
ifneq ($(BUILD_FLAVOR),)
|
|
|
|
ifeq ($(BUILD_FLAVOR), product)
|
|
|
|
FULL_DEBUG_SYMBOLS ?= 1
|
|
|
|
ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
|
|
|
|
else
|
|
|
|
# debug variants always get Full Debug Symbols (if available)
|
|
|
|
ENABLE_FULL_DEBUG_SYMBOLS = 1
|
|
|
|
endif
|
|
|
|
_JUNK_ := $(shell \
|
|
|
|
echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
|
|
|
|
MAKE_ARGS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)
|
|
|
|
|
|
|
|
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
|
|
|
ZIP_DEBUGINFO_FILES ?= 1
|
|
|
|
else
|
|
|
|
ZIP_DEBUGINFO_FILES=0
|
|
|
|
endif
|
|
|
|
MAKE_ARGS += ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)
|
2012-03-23 18:50:33 +00:00
|
|
|
endif
|
2012-11-06 00:33:44 +00:00
|
|
|
|
2012-03-23 18:50:33 +00:00
|
|
|
MAKE_ARGS += RM="$(RM)"
|
|
|
|
MAKE_ARGS += ZIPEXE=$(ZIPEXE)
|
2014-07-14 18:24:08 +00:00
|
|
|
MAKE_ARGS += CP="${CP}"
|
|
|
|
MAKE_ARGS += MV="${MV}"
|
|
|
|
|
2012-03-23 18:50:33 +00:00
|
|
|
|
2013-01-25 15:04:08 +00:00
|
|
|
# On 32 bit windows we build server and client, on 64 bit just server.
|
2012-03-19 09:09:24 +00:00
|
|
|
ifeq ($(JVM_VARIANTS),)
|
|
|
|
ifeq ($(ARCH_DATA_MODEL), 32)
|
2012-10-10 18:35:58 +00:00
|
|
|
JVM_VARIANTS:=client,server
|
2012-03-19 09:09:24 +00:00
|
|
|
JVM_VARIANT_CLIENT:=true
|
|
|
|
JVM_VARIANT_SERVER:=true
|
|
|
|
else
|
|
|
|
JVM_VARIANTS:=server
|
|
|
|
JVM_VARIANT_SERVER:=true
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
JDK_INCLUDE_SUBDIR=win32
|
|
|
|
|
2011-09-25 23:03:29 +00:00
|
|
|
# Library suffix
|
|
|
|
LIBRARY_SUFFIX=dll
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
# next parameters are defined in $(GAMMADIR)/make/defs.make.
|
2015-06-12 06:31:01 +00:00
|
|
|
MAKE_ARGS += VERSION_SHORT=$(VERSION_SHORT)
|
|
|
|
MAKE_ARGS += VERSION_MAJOR=$(VERSION_MAJOR)
|
|
|
|
MAKE_ARGS += VERSION_MINOR=$(VERSION_MINOR)
|
|
|
|
MAKE_ARGS += VERSION_SECURITY=$(VERSION_SECURITY)
|
2015-06-19 17:34:38 +00:00
|
|
|
MAKE_ARGS += VERSION_PATCH=$(VERSION_PATCH)
|
2015-06-12 06:31:01 +00:00
|
|
|
MAKE_ARGS += VERSION_BUILD=$(VERSION_BUILD)
|
2015-11-04 19:00:29 +00:00
|
|
|
MAKE_ARGS += DEBUG_LEVEL=$(DEBUG_LEVEL)
|
2015-06-12 06:31:01 +00:00
|
|
|
|
|
|
|
# JDK_DOTVER and JDK_VER are needed in Windows RC files
|
|
|
|
COMMA:=,
|
|
|
|
MAKE_ARGS += JDK_DOTVER=$(VERSION_NUMBER_FOUR_POSITIONS)
|
|
|
|
MAKE_ARGS += JDK_VER=$(subst .,$(COMMA),$(VERSION_NUMBER_FOUR_POSITIONS))
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2013-05-03 10:26:15 +00:00
|
|
|
NMAKE= MAKEFLAGS= MFLAGS= EXTRA_CFLAGS="$(EXTRA_CFLAGS)" nmake -NOLOGO
|
2012-08-04 01:34:28 +00:00
|
|
|
ifndef SYSTEM_UNAME
|
|
|
|
SYSTEM_UNAME := $(shell uname)
|
|
|
|
export SYSTEM_UNAME
|
|
|
|
endif
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
# Check for CYGWIN
|
2012-08-04 01:34:28 +00:00
|
|
|
ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
|
2007-12-01 00:00:00 +00:00
|
|
|
USING_CYGWIN=true
|
|
|
|
else
|
|
|
|
USING_CYGWIN=false
|
|
|
|
endif
|
2012-08-04 01:34:28 +00:00
|
|
|
# Check for MinGW
|
|
|
|
ifneq (,$(findstring MINGW,$(SYSTEM_UNAME)))
|
|
|
|
USING_MINGW=true
|
|
|
|
endif
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
# Windows wants particular paths due to nmake (must be after macros defined)
|
|
|
|
# It is important that gnumake invokes nmake with C:\\...\\ formated
|
|
|
|
# strings so that nmake gets C:\...\ style strings.
|
|
|
|
# Check for CYGWIN
|
|
|
|
ifeq ($(USING_CYGWIN), true)
|
|
|
|
ABS_OUTPUTDIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(OUTPUTDIR)"))
|
|
|
|
ABS_BOOTDIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(BOOTDIR)"))
|
|
|
|
ABS_GAMMADIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(GAMMADIR)"))
|
2008-07-30 18:54:00 +00:00
|
|
|
ABS_OS_MAKEFILE := $(shell /bin/cygpath -m -a "$(HS_MAKE_DIR)/$(OSNAME)")/build.make
|
2012-08-04 01:34:28 +00:00
|
|
|
else ifeq ($(USING_MINGW), true)
|
|
|
|
ABS_OUTPUTDIR := $(shell $(CD) $(OUTPUTDIR);$(PWD))
|
|
|
|
ABS_BOOTDIR := $(shell $(CD) $(BOOTDIR);$(PWD))
|
|
|
|
ABS_GAMMADIR := $(shell $(CD) $(GAMMADIR);$(PWD))
|
|
|
|
ABS_OS_MAKEFILE := $(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make
|
|
|
|
else
|
|
|
|
ABS_OUTPUTDIR := $(subst /,\\,$(shell $(CD) $(OUTPUTDIR);$(PWD)))
|
|
|
|
ABS_BOOTDIR := $(subst /,\\,$(shell $(CD) $(BOOTDIR);$(PWD)))
|
|
|
|
ABS_GAMMADIR := $(subst /,\\,$(shell $(CD) $(GAMMADIR);$(PWD)))
|
|
|
|
ABS_OS_MAKEFILE := $(subst /,\\,$(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make)
|
2007-12-01 00:00:00 +00:00
|
|
|
endif
|
|
|
|
|
2015-03-25 08:37:59 +00:00
|
|
|
EXPORT_SERVER_DIR = $(EXPORT_BIN_DIR)/server
|
|
|
|
EXPORT_CLIENT_DIR = $(EXPORT_BIN_DIR)/client
|
2011-08-06 15:28:08 +00:00
|
|
|
|
2012-03-19 09:09:24 +00:00
|
|
|
ifeq ($(JVM_VARIANT_SERVER),true)
|
|
|
|
EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
|
|
|
|
EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.$(LIBRARY_SUFFIX)
|
2012-04-24 22:20:40 +00:00
|
|
|
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
|
|
|
ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
|
|
|
EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.diz
|
|
|
|
else
|
|
|
|
EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.pdb
|
|
|
|
EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.map
|
|
|
|
endif
|
2012-03-23 18:50:33 +00:00
|
|
|
endif
|
2012-03-19 09:09:24 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(JVM_VARIANT_CLIENT),true)
|
2007-12-01 00:00:00 +00:00
|
|
|
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
|
2011-09-25 23:03:29 +00:00
|
|
|
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.$(LIBRARY_SUFFIX)
|
2012-03-23 18:50:33 +00:00
|
|
|
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
|
|
|
ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
|
|
|
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.diz
|
|
|
|
else
|
|
|
|
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.pdb
|
|
|
|
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.map
|
|
|
|
endif
|
|
|
|
endif
|
2012-03-19 09:09:24 +00:00
|
|
|
endif
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2014-04-01 03:49:00 +00:00
|
|
|
EXPORT_LIST += $(EXPORT_LIB_DIR)/jvm.lib
|
|
|
|
|
2013-04-12 22:53:30 +00:00
|
|
|
# Propagate compiler and tools paths from configure to nmake.
|
2012-02-22 08:24:35 +00:00
|
|
|
# Need to make sure they contain \\ and not /.
|
|
|
|
ifneq ($(SPEC),)
|
|
|
|
ifeq ($(USING_CYGWIN), true)
|
|
|
|
MAKE_ARGS += CXX="$(subst /,\\,$(shell /bin/cygpath -s -m -a $(CXX)))"
|
|
|
|
MAKE_ARGS += LD="$(subst /,\\,$(shell /bin/cygpath -s -m -a $(LD)))"
|
|
|
|
MAKE_ARGS += RC="$(subst /,\\,$(shell /bin/cygpath -s -m -a $(RC)))"
|
|
|
|
MAKE_ARGS += MT="$(subst /,\\,$(shell /bin/cygpath -s -m -a $(MT)))"
|
|
|
|
else
|
|
|
|
MAKE_ARGS += CXX="$(subst /,\\,$(CXX))"
|
|
|
|
MAKE_ARGS += LD="$(subst /,\\,$(LD))"
|
|
|
|
MAKE_ARGS += RC="$(subst /,\\,$(RC))"
|
|
|
|
MAKE_ARGS += MT="$(subst /,\\,$(MT))"
|
|
|
|
endif
|
|
|
|
endif
|
2016-03-15 12:55:23 +00:00
|
|
|
|
|
|
|
ifdef OPENJDK
|
|
|
|
MAKE_ARGS += OPENJDK="$(OPENJDK)"
|
|
|
|
endif
|