make/windows/makefiles/defs.make

Fri, 12 Apr 2013 15:53:30 -0700

author
drchase
date
Fri, 12 Apr 2013 15:53:30 -0700
changeset 4942
f36e073d56a4
parent 4637
1b0dc9f87e75
child 5046
0380df7c3cd0
permissions
-rw-r--r--

7104565: trim jprt build targets
Summary: remove JPRT debug builds, remove -DDEBUG -DFASTDEBUG and use ASSERT instead in sources
Reviewed-by: dholmes, kvn, coleenp

duke@435 1 #
zgu@4492 2 # Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
duke@435 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 #
duke@435 5 # This code is free software; you can redistribute it and/or modify it
duke@435 6 # under the terms of the GNU General Public License version 2 only, as
duke@435 7 # published by the Free Software Foundation.
duke@435 8 #
duke@435 9 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 # version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 # accompanied this code).
duke@435 14 #
duke@435 15 # You should have received a copy of the GNU General Public License version
duke@435 16 # 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 #
trims@1907 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 # or visit www.oracle.com if you need additional information or have any
trims@1907 21 # questions.
drchase@4942 22 #
duke@435 23 #
duke@435 24
duke@435 25 # The common definitions for hotspot windows builds.
duke@435 26 # Include the top level defs.make under make directory instead of this one.
duke@435 27 # This file is included into make/defs.make.
tbell@862 28 # On windows it is only used to construct parameters for
kamg@526 29 # make/windows/build.make when make/Makefile is used to build VM.
duke@435 30
duke@435 31 SLASH_JAVA ?= J:
duke@435 32 PATH_SEP = ;
duke@435 33
duke@435 34 # Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
prr@1953 35 ifeq ($(ARCH_DATA_MODEL),32)
prr@1953 36 ARCH_DATA_MODEL=32
prr@1953 37 PLATFORM=windows-i586
prr@1953 38 VM_PLATFORM=windows_i486
prr@1953 39 HS_ARCH=x86
prr@1953 40 MAKE_ARGS += ARCH=x86
prr@1953 41 MAKE_ARGS += BUILDARCH=i486
prr@1953 42 MAKE_ARGS += Platform_arch=x86
prr@1953 43 MAKE_ARGS += Platform_arch_model=x86_32
prr@1953 44 endif
prr@1953 45
duke@435 46 ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) x86),)
duke@435 47 ARCH_DATA_MODEL=32
duke@435 48 PLATFORM=windows-i586
duke@435 49 VM_PLATFORM=windows_i486
duke@435 50 HS_ARCH=x86
duke@435 51 MAKE_ARGS += ARCH=x86
duke@435 52 MAKE_ARGS += BUILDARCH=i486
duke@435 53 MAKE_ARGS += Platform_arch=x86
duke@435 54 MAKE_ARGS += Platform_arch_model=x86_32
duke@435 55 endif
duke@435 56
prr@1953 57 ifneq ($(ARCH_DATA_MODEL),32)
prr@1953 58 ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) ia64),)
prr@1953 59 ARCH_DATA_MODEL=64
prr@1953 60 PLATFORM=windows-ia64
prr@1953 61 VM_PLATFORM=windows_ia64
prr@1953 62 HS_ARCH=ia64
prr@1953 63 MAKE_ARGS += LP64=1
prr@1953 64 MAKE_ARGS += ARCH=ia64
prr@1953 65 MAKE_ARGS += BUILDARCH=ia64
prr@1953 66 MAKE_ARGS += Platform_arch=ia64
prr@1953 67 MAKE_ARGS += Platform_arch_model=ia64
prr@1953 68 endif
duke@435 69
prr@1840 70 # http://support.microsoft.com/kb/888731 : this can be either
prr@1840 71 # AMD64 for AMD, or EM64T for Intel chips.
prr@1953 72 ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) AMD64),)
prr@1953 73 ARCH_DATA_MODEL=64
prr@1953 74 PLATFORM=windows-amd64
prr@1953 75 VM_PLATFORM=windows_amd64
prr@1953 76 HS_ARCH=x86
prr@1953 77 MAKE_ARGS += LP64=1
prr@1953 78 MAKE_ARGS += ARCH=x86
prr@1953 79 MAKE_ARGS += BUILDARCH=amd64
prr@1953 80 MAKE_ARGS += Platform_arch=x86
prr@1953 81 MAKE_ARGS += Platform_arch_model=x86_64
prr@1953 82 endif
duke@435 83
prr@1912 84 ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) EM64T),)
prr@1953 85 ARCH_DATA_MODEL=64
prr@1953 86 PLATFORM=windows-amd64
prr@1953 87 VM_PLATFORM=windows_amd64
prr@1953 88 HS_ARCH=x86
prr@1953 89 MAKE_ARGS += LP64=1
prr@1953 90 MAKE_ARGS += ARCH=x86
prr@1953 91 MAKE_ARGS += BUILDARCH=amd64
prr@1953 92 MAKE_ARGS += Platform_arch=x86
prr@1953 93 MAKE_ARGS += Platform_arch_model=x86_64
prr@1953 94 endif
prr@1912 95
prr@1840 96 # NB later OS versions than 2003 may report "Intel64"
prr@1953 97 ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) Intel64),)
prr@1953 98 ARCH_DATA_MODEL=64
prr@1953 99 PLATFORM=windows-amd64
prr@1953 100 VM_PLATFORM=windows_amd64
prr@1953 101 HS_ARCH=x86
prr@1953 102 MAKE_ARGS += LP64=1
prr@1953 103 MAKE_ARGS += ARCH=x86
prr@1953 104 MAKE_ARGS += BUILDARCH=amd64
prr@1953 105 MAKE_ARGS += Platform_arch=x86
prr@1953 106 MAKE_ARGS += Platform_arch_model=x86_64
prr@1953 107 endif
prr@1840 108 endif
prr@1840 109
dcubed@3724 110 # Full Debug Symbols has been enabled on Windows since JDK1.4.1 so
dcubed@3724 111 # there is no need for an "earlier than JDK7 check".
dcubed@3725 112 # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
dcubed@3725 113 # builds is enabled with debug info files ZIP'ed to save space. For
dcubed@3725 114 # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
dcubed@3725 115 # debug build without debug info isn't very useful.
dcubed@3725 116 # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
dcubed@3725 117 #
dcubed@3725 118 # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
dcubed@3725 119 # disabled for a BUILD_FLAVOR == product build.
dcubed@3725 120 #
dcubed@3725 121 # Note: Use of a different variable name for the FDS override option
dcubed@3725 122 # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
dcubed@3725 123 # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
dcubed@3725 124 # in options via environment variables, use of distinct variables
dcubed@3725 125 # prevents strange behaviours. For example, in a BUILD_FLAVOR !=
dcubed@3725 126 # product build, the FULL_DEBUG_SYMBOLS environment variable will be
dcubed@3725 127 # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
dcubed@3725 128 # the same variable name is used, then different values can be picked
dcubed@3725 129 # up by different parts of the build. Just to be clear, we only need
dcubed@3725 130 # two variable names because the incoming option value can be
dcubed@3725 131 # overridden in some situations, e.g., a BUILD_FLAVOR != product
dcubed@3725 132 # build.
dcubed@3724 133
dholmes@4243 134 # Due to the multiple sub-make processes that occur this logic gets
dholmes@4243 135 # executed multiple times. We reduce the noise by at least checking that
dholmes@4243 136 # BUILD_FLAVOR has been set.
dholmes@4243 137 ifneq ($(BUILD_FLAVOR),)
dholmes@4243 138 ifeq ($(BUILD_FLAVOR), product)
dholmes@4243 139 FULL_DEBUG_SYMBOLS ?= 1
dholmes@4243 140 ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
dholmes@4243 141 else
dholmes@4243 142 # debug variants always get Full Debug Symbols (if available)
dholmes@4243 143 ENABLE_FULL_DEBUG_SYMBOLS = 1
dholmes@4243 144 endif
dholmes@4243 145 _JUNK_ := $(shell \
dholmes@4243 146 echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
dholmes@4243 147 MAKE_ARGS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)
dholmes@4243 148
dholmes@4243 149 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dholmes@4243 150 ZIP_DEBUGINFO_FILES ?= 1
dholmes@4243 151 else
dholmes@4243 152 ZIP_DEBUGINFO_FILES=0
dholmes@4243 153 endif
dholmes@4243 154 MAKE_ARGS += ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)
dcubed@3725 155 endif
dcubed@3724 156
dcubed@3724 157 MAKE_ARGS += RM="$(RM)"
dcubed@3724 158 MAKE_ARGS += ZIPEXE=$(ZIPEXE)
dcubed@3724 159
zgu@4492 160 # On 32 bit windows we build server and client, on 64 bit just server.
erikj@3649 161 ifeq ($(JVM_VARIANTS),)
erikj@3649 162 ifeq ($(ARCH_DATA_MODEL), 32)
jprovino@4165 163 JVM_VARIANTS:=client,server
erikj@3649 164 JVM_VARIANT_CLIENT:=true
erikj@3649 165 JVM_VARIANT_SERVER:=true
erikj@3649 166 else
erikj@3649 167 JVM_VARIANTS:=server
erikj@3649 168 JVM_VARIANT_SERVER:=true
erikj@3649 169 endif
erikj@3649 170 endif
erikj@3649 171
duke@435 172 JDK_INCLUDE_SUBDIR=win32
duke@435 173
never@3156 174 # Library suffix
never@3156 175 LIBRARY_SUFFIX=dll
never@3156 176
tbell@862 177 # HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined
duke@435 178 # and added to MAKE_ARGS list in $(GAMMADIR)/make/defs.make.
duke@435 179
duke@435 180 # next parameters are defined in $(GAMMADIR)/make/defs.make.
duke@435 181 MAKE_ARGS += JDK_MKTG_VERSION=$(JDK_MKTG_VERSION)
duke@435 182 MAKE_ARGS += JDK_MAJOR_VER=$(JDK_MAJOR_VERSION)
duke@435 183 MAKE_ARGS += JDK_MINOR_VER=$(JDK_MINOR_VERSION)
duke@435 184 MAKE_ARGS += JDK_MICRO_VER=$(JDK_MICRO_VERSION)
duke@435 185
duke@435 186 ifdef COOKED_JDK_UPDATE_VERSION
duke@435 187 MAKE_ARGS += JDK_UPDATE_VER=$(COOKED_JDK_UPDATE_VERSION)
duke@435 188 endif
duke@435 189
duke@435 190 # COOKED_BUILD_NUMBER should only be set if we have a numeric
duke@435 191 # build number. It must not be zero padded.
duke@435 192 ifdef COOKED_BUILD_NUMBER
duke@435 193 MAKE_ARGS += JDK_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)
duke@435 194 endif
duke@435 195
dcubed@3990 196 NMAKE= MAKEFLAGS= MFLAGS= nmake -NOLOGO
dcubed@3990 197 ifndef SYSTEM_UNAME
dcubed@3990 198 SYSTEM_UNAME := $(shell uname)
dcubed@3990 199 export SYSTEM_UNAME
dcubed@3990 200 endif
duke@435 201
duke@435 202 # Check for CYGWIN
dcubed@3990 203 ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
duke@435 204 USING_CYGWIN=true
duke@435 205 else
duke@435 206 USING_CYGWIN=false
duke@435 207 endif
dcubed@3990 208 # Check for MinGW
dcubed@3990 209 ifneq (,$(findstring MINGW,$(SYSTEM_UNAME)))
dcubed@3990 210 USING_MINGW=true
dcubed@3990 211 endif
duke@435 212
duke@435 213 # Windows wants particular paths due to nmake (must be after macros defined)
duke@435 214 # It is important that gnumake invokes nmake with C:\\...\\ formated
duke@435 215 # strings so that nmake gets C:\...\ style strings.
duke@435 216 # Check for CYGWIN
duke@435 217 ifeq ($(USING_CYGWIN), true)
duke@435 218 ABS_OUTPUTDIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(OUTPUTDIR)"))
duke@435 219 ABS_BOOTDIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(BOOTDIR)"))
duke@435 220 ABS_GAMMADIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(GAMMADIR)"))
jmasa@706 221 ABS_OS_MAKEFILE := $(shell /bin/cygpath -m -a "$(HS_MAKE_DIR)/$(OSNAME)")/build.make
dcubed@3990 222 else ifeq ($(USING_MINGW), true)
dcubed@3990 223 ABS_OUTPUTDIR := $(shell $(CD) $(OUTPUTDIR);$(PWD))
dcubed@3990 224 ABS_BOOTDIR := $(shell $(CD) $(BOOTDIR);$(PWD))
dcubed@3990 225 ABS_GAMMADIR := $(shell $(CD) $(GAMMADIR);$(PWD))
dcubed@3990 226 ABS_OS_MAKEFILE := $(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make
dcubed@3990 227 else
dcubed@3990 228 ABS_OUTPUTDIR := $(subst /,\\,$(shell $(CD) $(OUTPUTDIR);$(PWD)))
dcubed@3990 229 ABS_BOOTDIR := $(subst /,\\,$(shell $(CD) $(BOOTDIR);$(PWD)))
dcubed@3990 230 ABS_GAMMADIR := $(subst /,\\,$(shell $(CD) $(GAMMADIR);$(PWD)))
dcubed@3990 231 ABS_OS_MAKEFILE := $(subst /,\\,$(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make)
duke@435 232 endif
duke@435 233
duke@435 234 # Disable building SA on windows until we are sure
duke@435 235 # we want to release it. If we build it here,
duke@435 236 # the SDK makefiles will copy it over and put it into
duke@435 237 # the created image.
poonam@891 238 BUILD_WIN_SA = 1
duke@435 239 ifneq ($(ALT_BUILD_WIN_SA),)
duke@435 240 BUILD_WIN_SA = $(ALT_BUILD_WIN_SA)
duke@435 241 endif
duke@435 242
duke@435 243 ifeq ($(BUILD_WIN_SA), 1)
tbell@862 244 ifeq ($(ARCH),ia64)
duke@435 245 BUILD_WIN_SA = 0
duke@435 246 endif
duke@435 247 endif
duke@435 248
duke@435 249 EXPORT_SERVER_DIR = $(EXPORT_JRE_BIN_DIR)/server
kvn@3044 250 EXPORT_CLIENT_DIR = $(EXPORT_JRE_BIN_DIR)/client
kvn@3044 251
erikj@3649 252 ifeq ($(JVM_VARIANT_SERVER),true)
erikj@3649 253 EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
erikj@3649 254 EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.$(LIBRARY_SUFFIX)
dcubed@3726 255 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dcubed@3726 256 ifeq ($(ZIP_DEBUGINFO_FILES),1)
dcubed@3726 257 EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.diz
dcubed@3726 258 else
dcubed@3726 259 EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.pdb
dcubed@3726 260 EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.map
dcubed@3726 261 endif
dcubed@3724 262 endif
erikj@3649 263 EXPORT_LIST += $(EXPORT_LIB_DIR)/jvm.lib
dcubed@3724 264 endif
erikj@3649 265 ifeq ($(JVM_VARIANT_CLIENT),true)
duke@435 266 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
never@3156 267 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.$(LIBRARY_SUFFIX)
dcubed@3724 268 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dcubed@3724 269 ifeq ($(ZIP_DEBUGINFO_FILES),1)
dcubed@3724 270 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.diz
dcubed@3724 271 else
dcubed@3724 272 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.pdb
dcubed@3724 273 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.map
dcubed@3724 274 endif
dcubed@3724 275 endif
erikj@3649 276 endif
duke@435 277
duke@435 278 ifeq ($(BUILD_WIN_SA), 1)
never@3156 279 EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.$(LIBRARY_SUFFIX)
dcubed@3724 280 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dcubed@3724 281 ifeq ($(ZIP_DEBUGINFO_FILES),1)
dcubed@3724 282 EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.diz
dcubed@3724 283 else
dcubed@3724 284 EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.pdb
dcubed@3724 285 EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.map
dcubed@3724 286 endif
dcubed@3724 287 endif
tbell@862 288 EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar
duke@435 289 # Must pass this down to nmake.
duke@435 290 MAKE_ARGS += BUILD_WIN_SA=1
duke@435 291 endif
erikj@3600 292
drchase@4942 293 # Propagate compiler and tools paths from configure to nmake.
erikj@3600 294 # Need to make sure they contain \\ and not /.
erikj@3600 295 ifneq ($(SPEC),)
erikj@3600 296 ifeq ($(USING_CYGWIN), true)
erikj@3600 297 MAKE_ARGS += CXX="$(subst /,\\,$(shell /bin/cygpath -s -m -a $(CXX)))"
erikj@3600 298 MAKE_ARGS += LD="$(subst /,\\,$(shell /bin/cygpath -s -m -a $(LD)))"
erikj@3600 299 MAKE_ARGS += RC="$(subst /,\\,$(shell /bin/cygpath -s -m -a $(RC)))"
erikj@3600 300 MAKE_ARGS += MT="$(subst /,\\,$(shell /bin/cygpath -s -m -a $(MT)))"
erikj@3600 301 else
erikj@3600 302 MAKE_ARGS += CXX="$(subst /,\\,$(CXX))"
erikj@3600 303 MAKE_ARGS += LD="$(subst /,\\,$(LD))"
erikj@3600 304 MAKE_ARGS += RC="$(subst /,\\,$(RC))"
erikj@3600 305 MAKE_ARGS += MT="$(subst /,\\,$(MT))"
erikj@3600 306 endif
erikj@3600 307 endif

mercurial