Defs-windows.gmk revision 795
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley#
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley#
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley# This code is free software; you can redistribute it and/or modify it
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley# under the terms of the GNU General Public License version 2 only, as
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley# published by the Free Software Foundation. Sun designates this
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley# particular file as subject to the "Classpath" exception as provided
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley# by Sun in the LICENSE file that accompanied this code.
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley#
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley# This code is distributed in the hope that it will be useful, but WITHOUT
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley# version 2 for more details (a copy is included in the LICENSE file that
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley# accompanied this code).
90929d4c6b284dd318f4a78c2aa407afb7423747oliver.bradley#
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne# You should have received a copy of the GNU General Public License version
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne# 2 along with this work; if not, write to the Free Software Foundation,
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22715efe327ebff20a080126afbf434886fe124cjason.browne#
22715efe327ebff20a080126afbf434886fe124cjason.browne# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22715efe327ebff20a080126afbf434886fe124cjason.browne# CA 95054 USA or visit www.sun.com if you need additional information or
22715efe327ebff20a080126afbf434886fe124cjason.browne# have any questions.
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne#
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne#
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne# Makefile to specify compiler flags for programs and libraries
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne# targeted to Windows builds. Should not contain any rules.
22715efe327ebff20a080126afbf434886fe124cjason.browne#
22715efe327ebff20a080126afbf434886fe124cjason.browne# WARNING: This file is shared with other workspaces.
22715efe327ebff20a080126afbf434886fe124cjason.browne# So when it includes other files, it must use JDK_TOPDIR.
22715efe327ebff20a080126afbf434886fe124cjason.browne#
22715efe327ebff20a080126afbf434886fe124cjason.browne
22715efe327ebff20a080126afbf434886fe124cjason.browne# Get shared JDK settings
dd6f7acd9f8b4ac201528617b8cea0a8b518d4cejason.browneinclude $(JDK_MAKE_SHARED_DIR)/Defs.gmk
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne
dd6f7acd9f8b4ac201528617b8cea0a8b518d4cejason.browne# CC compiler object code output directive flag value
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneCC_OBJECT_OUTPUT_FLAG = -Fo
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneCC_PROGRAM_OUTPUT_FLAG = -Fe
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne
dd6f7acd9f8b4ac201528617b8cea0a8b518d4cejason.browne# The suffix applied to the library name for FDLIBM
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneFDDLIBM_SUFFIX = lib
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne# The suffix applied to scripts (.bat for windows, nothing for unix)
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneSCRIPT_SUFFIX = .bat
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneHPIS = windows
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne# LIB_LOCATION, which for windows identifies where .exe files go, may be
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne# set by each GNUmakefile. The default is BINDIR.
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneifndef LIB_LOCATION
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne LIB_LOCATION = $(BINDIR)
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneendif # LIB_LOCATION
3265d87127479b58587813601a6b05315248a146Jason Browne
9f4ef34f046eeedd0734fe9aaa227b84caa6a6e7Elizabeth Browneifndef PLATFORM_SRC
22715efe327ebff20a080126afbf434886fe124cjason.browne PLATFORM_SRC = $(BUILDDIR)/../src/windows
22715efe327ebff20a080126afbf434886fe124cjason.browneendif # PLATFORM_SRC
22715efe327ebff20a080126afbf434886fe124cjason.browne
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne# Platform specific closed sources
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browneifndef OPENJDK
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne ifndef CLOSED_PLATFORM_SRC
9f4ef34f046eeedd0734fe9aaa227b84caa6a6e7Elizabeth Browne CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/windows
9f4ef34f046eeedd0734fe9aaa227b84caa6a6e7Elizabeth Browne endif
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browneendif
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne
9f4ef34f046eeedd0734fe9aaa227b84caa6a6e7Elizabeth Browne# for backwards compatability, the old "win32" is used here instead of
9f4ef34f046eeedd0734fe9aaa227b84caa6a6e7Elizabeth Browne# the more proper "windows"
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.brownePLATFORM_INCLUDE_NAME = win32
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.brownePLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne# The following DLL's are considered MS runtime libraries and should
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne# not to be REBASEd, see deploy/make/common/Release.gmk.
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne# msvcrt.dll, msvcrnn.dll [msvcr71 or msvcr80 or msvcr90] : Microsoft runtimes
9f4ef34f046eeedd0734fe9aaa227b84caa6a6e7Elizabeth BrowneMS_RUNTIME_LIBRARIES = msvcrt.dll
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browneMSVCRNN_DLL =
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browneifeq ($(ARCH_DATA_MODEL), 32)
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne ifeq ($(COMPILER_VERSION), VS2003)
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne MSVCRNN_DLL = msvcr71.dll
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne MSVCPNN_DLL = msvcp71.dll
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne endif
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne ifeq ($(COMPILER_VERSION), VS2005)
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne MSVCRNN_DLL = msvcr80.dll
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne MSVCPNN_DLL = msvcp80.dll
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne endif
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne ifeq ($(COMPILER_VERSION), VS2008)
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne MSVCRNN_DLL = msvcr90.dll
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne MSVCPNN_DLL = msvcp90.dll
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne endif
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browneendif
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browneEXTRA_LFLAGS += /LIBPATH:$(DXSDK_LIB_PATH)
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne# C Compiler flag definitions
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne#
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne# Default optimization
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne#
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browneifndef OPTIMIZATION_LEVEL
397a6f6248290aed0c80b6314796178a18efe9bcJason Browne ifeq ($(PRODUCT), java)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne OPTIMIZATION_LEVEL = HIGHER
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne else
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne OPTIMIZATION_LEVEL = LOWER
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne endif
33b843c6297041e8c1a73b737821958ed0883366Jason Browneendif
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browneifeq ($(CC_VERSION),msvc)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # Visual Studio .NET 2003 or VS2003 compiler option definitions:
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # -O1 Favors reduced size over speed (-Og -Os -Oy -Ob2 -Gs -GF -Gy)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # -O2 Favors speed over reduced size (-Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy)
397a6f6248290aed0c80b6314796178a18efe9bcJason Browne # -Ox Full optimization (use -O2) (-Og -Oi -Ot -Oy -Ob2)
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne # (Removed in Visual Studio 2005 or VS2005)
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne # -Ob2 More aggressive inlining
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne # -Og Global optimizations
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne # -Oi Replace some functions with intrinsic or special forms
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # -Op Improve floating point calculations (disables some optimizations)
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne # (Replaced with -fp:precise in VS2005, /Op is default now)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # -Os Favor small code
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # -Ot Favor faster code
397a6f6248290aed0c80b6314796178a18efe9bcJason Browne # -Oy Frame pointer omission
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # -GB Optimize for pentium (old VC6 option?)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # -G6 VS2003 version of -GB?
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne # -GF Pool strings in read-only memory
33b843c6297041e8c1a73b737821958ed0883366Jason Browne # -Gf Pool strings in read-write memory (the default)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # -Gs Controls stack probess
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # -GS Adds buffer overflow checks on stacks
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # (Default in VS2005)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # -GX Enables exception handling
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # (Replaced with /EHsc in VS2005)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # -Gy Function level linking only
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne #
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # NOTE: With VC6, -Ox included -Gs.
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # NOTE: With VC6, -Ox, -O1, and -O2 used -Ob1, not -Ob2.
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # NOTE: With VC6, -O1 and -O2 used -Gf, not -GF.
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne #
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/NONE = -Od
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/LOWER = -O2
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/HIGHER = -O3
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/HIGHEST = -O3
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne ifeq ($(COMPILER_VERSION), VC6)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # VC6 (6.2) msvc compiler (the way Tiger and early Mustang were built)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne AUTOMATIC_PCH_OPTION =
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne GX_OPTION = -GX
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne ifeq ($(ARCH_DATA_MODEL), 32)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/HIGHEST = -Ox -Gy -Os -GB
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/HIGHER = -Ox -Gy -Os -GB
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/LOWER = -Ox -Gy -Os -GB
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne else
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/HIGHEST = -Ox -Gy -Op
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/HIGHER = -Ox -Gy -Op
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/LOWER = -Ox -Gy -Op
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne endif
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne endif
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne ifeq ($(COMPILER_VERSION), VS2003)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne AUTOMATIC_PCH_OPTION = -YX
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # Also known as VC7 compiler
3d2f8976854bd9256c853f21c3a3c2fa9891b37ejason.browne GX_OPTION = -GX
3265d87127479b58587813601a6b05315248a146Jason Browne ifeq ($(ARCH_DATA_MODEL), 32)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # Lowered opt level to try and reduce footprint, dll size especially.
3265d87127479b58587813601a6b05315248a146Jason Browne # Was: CC_OPT/HIGHEST = -O2 -G6
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # Was: CC_OPT/HIGHER = -O2
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/HIGHEST = -O2
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne CC_OPT/HIGHER = -O1
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/LOWER = -O1
d84445f383c4eb7a93a274379edeb69f82ee8810huck.elliott else
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/HIGHEST = -O2 -Op
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/HIGHER = -O2 -Op
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/LOWER = -O1 -Op
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne endif
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne endif
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne ifeq ($(COMPILER_VERSION), VS2005)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
33b843c6297041e8c1a73b737821958ed0883366Jason Browne AUTOMATIC_PCH_OPTION =
33b843c6297041e8c1a73b737821958ed0883366Jason Browne # VS2005 compiler, only with Platform SDK right now?
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne GX_OPTION = -EHsc
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne ifeq ($(ARCH_DATA_MODEL), 32)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/HIGHEST = -O2
22715efe327ebff20a080126afbf434886fe124cjason.browne CC_OPT/HIGHER = -O1
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/LOWER = -O1
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne else
22715efe327ebff20a080126afbf434886fe124cjason.browne CC_OPT/HIGHEST = -O2
22715efe327ebff20a080126afbf434886fe124cjason.browne CC_OPT/HIGHER = -O1
22715efe327ebff20a080126afbf434886fe124cjason.browne CC_OPT/LOWER = -O1
22715efe327ebff20a080126afbf434886fe124cjason.browne endif
22715efe327ebff20a080126afbf434886fe124cjason.browne endif
22715efe327ebff20a080126afbf434886fe124cjason.browne ifeq ($(COMPILER_VERSION), VS2008)
22715efe327ebff20a080126afbf434886fe124cjason.browne # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
22715efe327ebff20a080126afbf434886fe124cjason.browne AUTOMATIC_PCH_OPTION =
22715efe327ebff20a080126afbf434886fe124cjason.browne GX_OPTION = -EHsc
22715efe327ebff20a080126afbf434886fe124cjason.browne ifeq ($(ARCH_DATA_MODEL), 32)
22715efe327ebff20a080126afbf434886fe124cjason.browne CC_OPT/HIGHEST = -O2
22715efe327ebff20a080126afbf434886fe124cjason.browne CC_OPT/HIGHER = -O1
22715efe327ebff20a080126afbf434886fe124cjason.browne CC_OPT/LOWER = -O1
22715efe327ebff20a080126afbf434886fe124cjason.browne else
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/HIGHEST = -O2
22715efe327ebff20a080126afbf434886fe124cjason.browne CC_OPT/HIGHER = -O1
22715efe327ebff20a080126afbf434886fe124cjason.browne CC_OPT/LOWER = -O1
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne endif
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne endif
33b843c6297041e8c1a73b737821958ed0883366Jason Browne
22715efe327ebff20a080126afbf434886fe124cjason.browneelse # CC_VERSION
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # GCC not supported, but left for historical reference...
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/NONE =
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/LOWER = -O2
22715efe327ebff20a080126afbf434886fe124cjason.browne CC_OPT/HIGHER = -O2
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne CC_OPT/HIGHEST = -O3
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browneendif
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne
22715efe327ebff20a080126afbf434886fe124cjason.browneCC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL))
22715efe327ebff20a080126afbf434886fe124cjason.browne
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne# Select the runtime support library carefully, need to be consistent
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne#
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne# VS2003 compiler option definitions:
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne# -MD Use dynamic multi-threaded runtime library
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne# -MDd Use debug version (don't use, doesn't mix with -MD DLL's)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne# -MT Use static multi-threaded runtime library (-ML is going away)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne# -MTd Use static debug version (better than -MDd, no runtime issues)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne# -D_DEBUG Change use of malloc/free/etc to use special debug ones (-MTd)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne#
33b843c6297041e8c1a73b737821958ed0883366Jason Browne# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcpnn.dll
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne#
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne# If MS_RUNTIME_STATIC is requested, use -MT only with VS2003.
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browneifeq ($(MS_RUNTIME_STATIC),true)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne ifeq ($(COMPILER_VERSION), VS2003)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne MS_RUNTIME_OPTION=-MT
22715efe327ebff20a080126afbf434886fe124cjason.browne endif
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browneelse
d84445f383c4eb7a93a274379edeb69f82ee8810huck.elliott MS_RUNTIME_OPTION=-MD
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browneendif
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne# The _DEBUG macro option (changes things like malloc to use debug version)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth BrowneMS_RUNTIME_DEBUG_OPTION=
22715efe327ebff20a080126afbf434886fe124cjason.browneMS_RC_DEBUG_OPTION=
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne# Externally set environment variable can force any build to use the debug vers
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browneifeq ($(MFC_DEBUG), true)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne ifeq ($(MS_RUNTIME_STATIC),true)
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne MS_RUNTIME_OPTION=-MTd
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne else
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # This MS debugging flag forces a dependence on the debug
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # version of the runtime library (MSVCRTD.DLL), as does -MDd.
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne # We cannot re-distribute this debug runtime.
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne MS_RUNTIME_OPTION=-MDd
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne endif
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne MS_RUNTIME_DEBUG_OPTION= -D_DEBUG
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne MS_RC_DEBUG_OPTION= -d _DEBUG
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browneendif
9e90d9b80268528a6f6b3144a429849a75681f47Elizabeth Browne
33b843c6297041e8c1a73b737821958ed0883366Jason Browne# Always add _STATIC_CPPLIB definition
33b843c6297041e8c1a73b737821958ed0883366Jason BrowneSTATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB
33b843c6297041e8c1a73b737821958ed0883366Jason BrowneMS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneifeq ($(CC_VERSION),msvc)
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne # VS2003 compiler option definitions:
22715efe327ebff20a080126afbf434886fe124cjason.browne # -Zi Cause *.pdb file to be created, full debug information
22715efe327ebff20a080126afbf434886fe124cjason.browne # -Z7 Full debug inside the .obj, no .pdb
22715efe327ebff20a080126afbf434886fe124cjason.browne # -Zd Basic debug, no local variables? In the .obj
22715efe327ebff20a080126afbf434886fe124cjason.browne # -Zl Don't add runtime library name to obj file?
22715efe327ebff20a080126afbf434886fe124cjason.browne # -Od Turns off optimization and speeds compilation
22715efe327ebff20a080126afbf434886fe124cjason.browne # -YX -Fp/.../foobar.pch Use precompiled headers (try someday?)
22715efe327ebff20a080126afbf434886fe124cjason.browne # -nologo Don't print out startup message
33b843c6297041e8c1a73b737821958ed0883366Jason Browne # /D _STATIC_CPPLIB
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne # Use static link for the C++ runtime (so msvcpnn.dll not needed)
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne #
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne CFLAGS_COMMON += -Zi -nologo
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne CFLAGS_OPT = $(CC_OPT)
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne CFLAGS_DBG = -Od $(MS_RUNTIME_DEBUG_OPTION)
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne # Starting from VS2005 the wchar_t is handled as a built-in C/C++ data type
a95affcf61989573b6cd080e5bd2416bf5af4b4bElizabeth # by default. However, we expect the wchar_t to be a typedef to the
22715efe327ebff20a080126afbf434886fe124cjason.browne # unsigned short data type. The -Zc:wchar_t- option restores the old
f6d886370a7cd712288f760f2ee2edbdc834503djason.browne # behavior (as seen in VS2003) to avoid massive code modifications.
397a6f6248290aed0c80b6314796178a18efe9bcJason Browne # When/if our code will be "C/C++ Standard"-compliant (at least in the area
12e51f2d3d5bbab9a7d831998eb852567223a8a9jason.browne # of handling the wchar_t type), the option won't be necessary.
12e51f2d3d5bbab9a7d831998eb852567223a8a9jason.browne ifeq ($(ARCH_DATA_MODEL), 32)
22715efe327ebff20a080126afbf434886fe124cjason.browne CFLAGS_VS2005 += -Zc:wchar_t-
258271c20c197793364cd4ada1224c3004d2deddJason Browne else
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne # The 64bit Platform SDK we use (April 2005) doesn't like this option
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne ifneq ($(CC_VER), 14.00.40310.41)
12e51f2d3d5bbab9a7d831998eb852567223a8a9jason.browne CFLAGS_VS2005 += -Zc:wchar_t-
12e51f2d3d5bbab9a7d831998eb852567223a8a9jason.browne endif
22715efe327ebff20a080126afbf434886fe124cjason.browne endif
22715efe327ebff20a080126afbf434886fe124cjason.browne
475f923f502d2590d1fabb3662bf46758fd7f16aElizabeth Browne # All builds get the same runtime setting
22715efe327ebff20a080126afbf434886fe124cjason.browne CFLAGS_COMMON += $(MS_RUNTIME_OPTION) $(CFLAGS_$(COMPILER_VERSION))
22715efe327ebff20a080126afbf434886fe124cjason.browne
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne
22715efe327ebff20a080126afbf434886fe124cjason.browne LDEBUG = /debug
12e51f2d3d5bbab9a7d831998eb852567223a8a9jason.browne
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne ifeq ($(VTUNE_SUPPORT), true)
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne OTHER_CFLAGS = -Z7 -Ox
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne LDEBUG += /pdb:NONE
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne endif
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne # The new Platform SDK and VS2005 has /GS as a default and requires
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne # bufferoverflowU.lib on the link command line, otherwise
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne # we get missing __security_check_cookie externals at link time.
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne BUFFEROVERFLOWLIB = bufferoverflowU.lib
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne # Always add bufferoverflowU.lib to VS2005 link commands (pack uses LDDFLAGS)
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne LFLAGS_VS2005 = $(BUFFEROVERFLOWLIB)
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne # VS2008 has bufferoverflow baked in:
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne LFLAGS_VS2008 =
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne
9849ba3450fd40c5f351b6a968888a7d1582eb80jason.browne # LFLAGS are the flags given to $(LINK) and used to build the actual DLL file
22715efe327ebff20a080126afbf434886fe124cjason.browne BASELFLAGS = -nologo /opt:REF /incremental:no
22715efe327ebff20a080126afbf434886fe124cjason.browneifdef MT
475f923f502d2590d1fabb3662bf46758fd7f16aElizabeth Browne # VS2005, VS2008, and beyond: ask LINK to generate manifests for .dll & .exe
12e51f2d3d5bbab9a7d831998eb852567223a8a9jason.browne BASELFLAGS += /manifest
475f923f502d2590d1fabb3662bf46758fd7f16aElizabeth Browneendif
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne LFLAGS = $(BASELFLAGS) $(LDEBUG) $(EXTRA_LFLAGS) $(LFLAGS_$(COMPILER_VERSION))
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne LDDFLAGS += $(LFLAGS_$(COMPILER_VERSION))
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneendif
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne#
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne# Preprocessor macro definitions
22715efe327ebff20a080126afbf434886fe124cjason.browne#
22715efe327ebff20a080126afbf434886fe124cjason.browneCPPFLAGS_COMMON = -DWIN32 -DIAL -D_LITTLE_ENDIAN
22715efe327ebff20a080126afbf434886fe124cjason.browneifeq ($(ARCH), amd64)
22715efe327ebff20a080126afbf434886fe124cjason.browne CPPFLAGS_COMMON += -D_AMD64_ -Damd64
22715efe327ebff20a080126afbf434886fe124cjason.browneelse
22715efe327ebff20a080126afbf434886fe124cjason.browne CPPFLAGS_COMMON += -D_X86_ -Dx86
22715efe327ebff20a080126afbf434886fe124cjason.browneendif
22715efe327ebff20a080126afbf434886fe124cjason.browneCPPFLAGS_COMMON += -DWIN32_LEAN_AND_MEAN
22715efe327ebff20a080126afbf434886fe124cjason.browne
22715efe327ebff20a080126afbf434886fe124cjason.browne#
22715efe327ebff20a080126afbf434886fe124cjason.browne# Output options (use specific filenames to avoid parallel compile errors)
22715efe327ebff20a080126afbf434886fe124cjason.browne#
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneCFLAGS_COMMON += -Fd$(OBJDIR)/$(basename $(@F)).pdb -Fm$(OBJDIR)/$(basename $(@F)).map
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne#
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne# Use -wdNNNN to disable warning NNNN.
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne# C4800 is a warning about bool performance casts (can't make go away)
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne#
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneCOMPILER_WARNINGS_TO_IGNORE = 4800
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneCFLAGS_COMMON += $(COMPILER_WARNINGS_TO_IGNORE:%=-wd%)
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne#
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne# Add warnings and extra on 64bit issues
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne#
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneifeq ($(ARCH_DATA_MODEL), 64)
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne CFLAGS_COMMON += -Wp64
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneendif
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne#
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne# Treat compiler warnings as errors, if requested
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne#
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneCFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL)
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneifeq ($(COMPILER_WARNINGS_FATAL),true)
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne CFLAGS_COMMON += -WX
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneendif
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneCPPFLAGS_OPT =
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneCPPFLAGS_DBG = -DDEBUG -DLOGGING
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneCXXFLAGS_COMMON = $(CFLAGS_COMMON)
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneCXXFLAGS_OPT = $(CFLAGS_OPT)
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneCXXFLAGS_DBG = $(CFLAGS_DBG)
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneifneq ($(LIBRARY),fdlibm)
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne EXTRA_LIBS += advapi32.lib
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browneendif
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne
ee3c8b0cc03a9031a3564d90aaa94ea4d0019e4cjason.browne#
22715efe327ebff20a080126afbf434886fe124cjason.browne# Path and option to link against the VM, if you have to.
22715efe327ebff20a080126afbf434886fe124cjason.browne#
22715efe327ebff20a080126afbf434886fe124cjason.browneJVMLIB = $(LIBDIR)/jvm.lib
22715efe327ebff20a080126afbf434886fe124cjason.browneJAVALIB = $(LIBDIR)/java.lib
22715efe327ebff20a080126afbf434886fe124cjason.browne
22715efe327ebff20a080126afbf434886fe124cjason.browneifeq ($(CC_VERSION), msvc)
22715efe327ebff20a080126afbf434886fe124cjason.browne CC_DEPEND = -FD
22715efe327ebff20a080126afbf434886fe124cjason.browne CC_DEPEND_FILTER =
22715efe327ebff20a080126afbf434886fe124cjason.browneelse # CC_VERSION
22715efe327ebff20a080126afbf434886fe124cjason.browne# not supported, but left for historical reference...
22715efe327ebff20a080126afbf434886fe124cjason.browne CC_DEPEND = -MM
12e51f2d3d5bbab9a7d831998eb852567223a8a9jason.browne CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)&!g'
22715efe327ebff20a080126afbf434886fe124cjason.browneendif # CC_VERSION
22715efe327ebff20a080126afbf434886fe124cjason.browne
22715efe327ebff20a080126afbf434886fe124cjason.browneLIBRARY_SUFFIX = dll
22715efe327ebff20a080126afbf434886fe124cjason.browneLIB_SUFFIX = lib
22715efe327ebff20a080126afbf434886fe124cjason.browne
22715efe327ebff20a080126afbf434886fe124cjason.browne# Settings for the JDI - Serviceability Agent binding.
22715efe327ebff20a080126afbf434886fe124cjason.browneHOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/bin
22715efe327ebff20a080126afbf434886fe124cjason.browneSALIB_NAME = $(LIB_PREFIX)sawindbg.$(LIBRARY_SUFFIX)
22715efe327ebff20a080126afbf434886fe124cjason.browneSAMAP_NAME = $(LIB_PREFIX)sawindbg.map
22715efe327ebff20a080126afbf434886fe124cjason.browneSAPDB_NAME = $(LIB_PREFIX)sawindbg.pdb
22715efe327ebff20a080126afbf434886fe124cjason.browne
22715efe327ebff20a080126afbf434886fe124cjason.browneifeq ($(ARCH), ia64)
22715efe327ebff20a080126afbf434886fe124cjason.browne # SA will never be supported here.
22715efe327ebff20a080126afbf434886fe124cjason.browne INCLUDE_SA = false
22715efe327ebff20a080126afbf434886fe124cjason.browneelse
22715efe327ebff20a080126afbf434886fe124cjason.browne # Hopefully, SA will be supported here one of these days,
22715efe327ebff20a080126afbf434886fe124cjason.browne # and these will be changed to true. Until then,
22715efe327ebff20a080126afbf434886fe124cjason.browne # to build SA on windows, do a control build with
22715efe327ebff20a080126afbf434886fe124cjason.browne # BUILD_WIN_SA=1
22715efe327ebff20a080126afbf434886fe124cjason.browne # on the make command.
22715efe327ebff20a080126afbf434886fe124cjason.browne ifdef BUILD_WIN_SA
22715efe327ebff20a080126afbf434886fe124cjason.browne INCLUDE_SA = true
22715efe327ebff20a080126afbf434886fe124cjason.browne else
22715efe327ebff20a080126afbf434886fe124cjason.browne INCLUDE_SA = false
22715efe327ebff20a080126afbf434886fe124cjason.browne endif
22715efe327ebff20a080126afbf434886fe124cjason.browneendif
22715efe327ebff20a080126afbf434886fe124cjason.browne
22715efe327ebff20a080126afbf434886fe124cjason.browne# Settings for the VERSIONINFO tap on windows.
22715efe327ebff20a080126afbf434886fe124cjason.browneVERSIONINFO_RESOURCE = $(BUILDDIR)/../src/windows/resource/version.rc
22715efe327ebff20a080126afbf434886fe124cjason.browne
22715efe327ebff20a080126afbf434886fe124cjason.browneifneq ($(JDK_BUILD_NUMBER),)
22715efe327ebff20a080126afbf434886fe124cjason.browne COOKED_BUILD_NUMBER = $(shell $(ECHO) $(JDK_BUILD_NUMBER) | $(SED) -e 's/^b//' -e 's/^0//')
22715efe327ebff20a080126afbf434886fe124cjason.browneelse
22715efe327ebff20a080126afbf434886fe124cjason.browne COOKED_BUILD_NUMBER = 0
22715efe327ebff20a080126afbf434886fe124cjason.browneendif
22715efe327ebff20a080126afbf434886fe124cjason.browne
22715efe327ebff20a080126afbf434886fe124cjason.browne# If the update version contains non-numeric characters, we need
22715efe327ebff20a080126afbf434886fe124cjason.browne# to massage it into a numeric format.
22715efe327ebff20a080126afbf434886fe124cjason.browne# We use the following formula:
22715efe327ebff20a080126afbf434886fe124cjason.browne# JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION
22715efe327ebff20a080126afbf434886fe124cjason.browne#
22715efe327ebff20a080126afbf434886fe124cjason.browne# Here are some examples:
22715efe327ebff20a080126afbf434886fe124cjason.browne# 1.5.0 b01 -> 5,0,0,1
22715efe327ebff20a080126afbf434886fe124cjason.browne# 1.5.0_10 b01 -> 5,0,100,1
22715efe327ebff20a080126afbf434886fe124cjason.browne# 1.4.2 b01 -> 4,2,0,1
22715efe327ebff20a080126afbf434886fe124cjason.browne# 1.4.2_02 b01 -> 4,2,20,1
22715efe327ebff20a080126afbf434886fe124cjason.browne# 1.4.2_02a b01 -> 4,2,21,1
22715efe327ebff20a080126afbf434886fe124cjason.browne# 1.4.2_02b b01 -> 4,2,22,1
22715efe327ebff20a080126afbf434886fe124cjason.browneifdef JDK_UPDATE_VERSION
22715efe327ebff20a080126afbf434886fe124cjason.browne VTMP := $(shell $(ECHO) $(JDK_UPDATE_VERSION) | $(TR) "abcde" "12345")
22715efe327ebff20a080126afbf434886fe124cjason.browne CAB_CHAR1 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 1, 1);}')
22715efe327ebff20a080126afbf434886fe124cjason.browne CAB_CHAR2 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 2, 1);}')
22715efe327ebff20a080126afbf434886fe124cjason.browne CAB_CHAR3 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 3, 1);}')
22715efe327ebff20a080126afbf434886fe124cjason.browne JDK_UPDATE_META_TAG := U$(MARKETING_NUMBER)
22715efe327ebff20a080126afbf434886fe124cjason.browne ifeq ($(CAB_CHAR3),)
22715efe327ebff20a080126afbf434886fe124cjason.browne CAB_CHAR3 := 0
22715efe327ebff20a080126afbf434886fe124cjason.browne endif
22715efe327ebff20a080126afbf434886fe124cjason.browne ifeq ($(CAB_CHAR1), 0)
22715efe327ebff20a080126afbf434886fe124cjason.browne JDK_UPDATE_VER := $(CAB_CHAR2)$(CAB_CHAR3)
22715efe327ebff20a080126afbf434886fe124cjason.browne else
22715efe327ebff20a080126afbf434886fe124cjason.browne JDK_UPDATE_VER := $(CAB_CHAR1)$(CAB_CHAR2)$(CAB_CHAR3)
22715efe327ebff20a080126afbf434886fe124cjason.browne endif
22715efe327ebff20a080126afbf434886fe124cjason.browneelse
22715efe327ebff20a080126afbf434886fe124cjason.browne JDK_UPDATE_VER := 0
22715efe327ebff20a080126afbf434886fe124cjason.browneendif
22715efe327ebff20a080126afbf434886fe124cjason.browne
22715efe327ebff20a080126afbf434886fe124cjason.browneRC_FLAGS = /l 0x409 /r
22715efe327ebff20a080126afbf434886fe124cjason.browne
22715efe327ebff20a080126afbf434886fe124cjason.browneifeq ($(VARIANT), OPT)
22715efe327ebff20a080126afbf434886fe124cjason.browne RC_FLAGS += -d NDEBUG
22715efe327ebff20a080126afbf434886fe124cjason.browneelse
22715efe327ebff20a080126afbf434886fe124cjason.browne RC_FLAGS += $(MS_RC_DEBUG_OPTION)
22715efe327ebff20a080126afbf434886fe124cjason.browneendif
22715efe327ebff20a080126afbf434886fe124cjason.browne
22715efe327ebff20a080126afbf434886fe124cjason.browne# Values for the RC variables defined in RC_FLAGS
22715efe327ebff20a080126afbf434886fe124cjason.browneJDK_RC_BUILD_ID = $(FULL_VERSION)
22715efe327ebff20a080126afbf434886fe124cjason.browneJDK_RC_COMPANY = $(COMPANY_NAME)
22715efe327ebff20a080126afbf434886fe124cjason.browneJDK_RC_COMPONENT = $(PRODUCT_NAME) $(JDK_RC_PLATFORM_NAME) binary
22715efe327ebff20a080126afbf434886fe124cjason.browneJDK_RC_VER = \
22715efe327ebff20a080126afbf434886fe124cjason.browne $(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VER).$(COOKED_BUILD_NUMBER)
22715efe327ebff20a080126afbf434886fe124cjason.browneJDK_RC_COPYRIGHT = Copyright \xA9 $(COPYRIGHT_YEAR)
22715efe327ebff20a080126afbf434886fe124cjason.browneJDK_RC_NAME = \
22715efe327ebff20a080126afbf434886fe124cjason.browne $(PRODUCT_NAME) $(JDK_RC_PLATFORM_NAME) $(JDK_MINOR_VERSION) $(JDK_UPDATE_META_TAG)
22715efe327ebff20a080126afbf434886fe124cjason.browneJDK_RC_FVER = \
22715efe327ebff20a080126afbf434886fe124cjason.browne $(JDK_MINOR_VERSION),$(JDK_MICRO_VERSION),$(JDK_UPDATE_VER),$(COOKED_BUILD_NUMBER)
22715efe327ebff20a080126afbf434886fe124cjason.browne
22715efe327ebff20a080126afbf434886fe124cjason.browne# J2SE name required here
22715efe327ebff20a080126afbf434886fe124cjason.browneRC_FLAGS += -d "J2SE_BUILD_ID=$(JDK_RC_BUILD_ID)" \
22715efe327ebff20a080126afbf434886fe124cjason.browne -d "J2SE_COMPANY=$(JDK_RC_COMPANY)" \
22715efe327ebff20a080126afbf434886fe124cjason.browne -d "J2SE_COMPONENT=$(JDK_RC_COMPONENT)" \
22715efe327ebff20a080126afbf434886fe124cjason.browne -d "J2SE_VER=$(JDK_RC_VER)" \
22715efe327ebff20a080126afbf434886fe124cjason.browne -d "J2SE_COPYRIGHT=$(JDK_RC_COPYRIGHT)" \
22715efe327ebff20a080126afbf434886fe124cjason.browne -d "J2SE_NAME=$(JDK_RC_NAME)" \
22715efe327ebff20a080126afbf434886fe124cjason.browne -d "J2SE_FVER=$(JDK_RC_FVER)"
22715efe327ebff20a080126afbf434886fe124cjason.browne