Defs-windows.gmk revision 4924
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# 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.
#
# 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.
#
#
# Makefile to specify compiler flags for programs and libraries
# targeted to Windows builds. Should not contain any rules.
#
# WARNING: This file is shared with other workspaces.
# So when it includes other files, it must use JDK_TOPDIR.
#
# Get shared JDK settings
# CC compiler object code output directive flag value
# The suffix applied to the library name for FDLIBM
# The suffix applied to scripts (.bat for windows, nothing for unix)
SCRIPT_SUFFIX = .bat
# LIB_LOCATION, which for windows identifies where .exe files go, may be
# set by each GNUmakefile. The default is BINDIR.
LIB_LOCATION = $(BINDIR)
endif # LIB_LOCATION
endif # PLATFORM_SRC
# Location of the various .properties files specific to Windows platform
endif # PLATFORM_SRC
# Platform specific closed sources
# for backwards compatability, the old "win32" is used here instead of
# the more proper "windows"
# The following DLL's are considered MS runtime libraries and should
# not to be REBASEd, see deploy/make/common/Release.gmk.
# msvcr*.dll: Microsoft runtimes
# C Compiler flag definitions
#
# Default optimization
#
else
# Visual Studio compiler option definitions:
# -O1 Favors reduced size over speed (-Og -Os -Oy -Ob2 -Gs -GF -Gy)
# -O2 Favors speed over reduced size (-Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy)
# -Ob2 More aggressive inlining
# -Og Global optimizations
# -Oi Replace some functions with intrinsic or special forms
# -fp:precise (should be the default)
# Improve floating point calculations (disables some optimizations)
# -Os Favor small code
# -Ot Favor faster code
# -Oy Frame pointer omission
# -G6 Used to be -GB?
# -GF Pool strings in read-only memory
# -Gf Pool strings in read-write memory (the default)
# -Gs Controls stack probess
# -GS Adds buffer overflow checks on stacks (the default)
# -EHsc Enables exception handling
# -Gy Function level linking only
#
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
else
else # CC_VERSION
# GCC not supported, but left for historical reference...
# Select the runtime support library carefully, need to be consistent
#
# Visual Studio Runtime compiler option definitions:
# -MD Use dynamic multi-threaded runtime library
# -MDd Use debug version (don't use, doesn't mix with -MD DLL's)
# -MT Use static multi-threaded runtime library (-ML is going away)
# -MTd Use static debug version (better than -MDd, no runtime issues)
#
# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcpnn.dll
#
# If MS_RUNTIME_STATIC is requested we may have a problem, it is no longer
# supported by VS2010
# The _DEBUG macro option (changes things like malloc to use debug version)
# Externally set environment variable can force any build to use the debug vers
else
# This MS debugging flag forces a dependence on the debug
# version of the runtime library (MSVCR*D.DLL), as does -MDd.
# We cannot re-distribute this debug runtime.
# Always add _STATIC_CPPLIB definition
# Silence the warning about using _STATIC_CPPLIB
# Needed with VS2010 to turn off the deprecated warning.
# Visual Studio compiler option definitions:
# -Zi Cause *.pdb file to be created, full debug information
# -Z7 Full debug inside the .obj, no .pdb
# -Zd Basic debug, no local variables? In the .obj
# -Zl Don't add runtime library name to obj file?
# -Od Turns off optimization and speeds compilation
# -YX -Fp/.../foobar.pch Use precompiled headers (try someday?)
# -nologo Don't print out startup message
# /D _STATIC_CPPLIB
# Use static link for the C++ runtime (so msvcpnn.dll not needed)
#
CFLAGS_OPT = $(CC_OPT)
# All builds get the same runtime setting
# VS2010, always need safe exception handlers, not needed on 64bit
LFLAGS_VS2010 += -SAFESEH
# LFLAGS are the flags given to $(LINK) and used to build the actual DLL file
#
# Preprocessor macro definitions
#
else
#
# Output options (use specific filenames to avoid parallel compile errors)
#
#
# Use -wdNNNN to disable warning NNNN.
# C4800 is a warning about bool performance casts (can't make go away)
#
COMPILER_WARNINGS_TO_IGNORE = 4800
CFLAGS_COMMON += $(COMPILER_WARNINGS_TO_IGNORE:%=-wd%)
#
# Treat compiler warnings as errors, if requested
#
CFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL)
CFLAGS_COMMON += -WX
# Turn off some warnings by default, enable them all if asked.
# The -D _CRT_SECURE_NO_DEPRECATE turns off security/deprecated warnings on
# the standard C library functions like strcpy.
# The -D _CRT_NONSTDC_NO_DEPRECATE turns off deprecation warnings about using
# non-standard C POSIX functions.
CXXFLAGS_OPT = $(CFLAGS_OPT)
CXXFLAGS_DBG = $(CFLAGS_DBG)
#
# Path and option to link against the VM, if you have to.
#
else # CC_VERSION
# not supported, but left for historical reference...
endif # CC_VERSION
# Settings for the JDI - Serviceability Agent binding.
# SA will never be supported here.
INCLUDE_SA = false
else
INCLUDE_SA = true
# Settings for the VERSIONINFO tap on windows.
else
# If the update version contains non-numeric characters, we need
# to massage it into a numeric format.
# We use the following formula:
# JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION
#
# Here are some examples:
# 1.5.0 b01 -> 5,0,0,1
# 1.5.0_10 b01 -> 5,0,100,1
# 1.4.2 b01 -> 4,2,0,1
# 1.4.2_02 b01 -> 4,2,20,1
# 1.4.2_02a b01 -> 4,2,21,1
# 1.4.2_02b b01 -> 4,2,22,1
CAB_CHAR3 := 0
else
else
JDK_UPDATE_VER := 0
RC_FLAGS = /l 0x409 /r
else
RC_FLAGS += $(MS_RC_DEBUG_OPTION)
# Values for the RC variables defined in RC_FLAGS
JDK_RC_VER = \
JDK_RC_NAME = \
JDK_RC_FVER = \
# JDK name required here
# Enable 7-Zip LZMA file (de)compression for Java Kernel if it is available
# This is a hack to use until 7-Zip (and UPX) bundles can be put
# Uncomment this block to cause build failure if above assumption false
#DCHK = $(shell if [ ! -d $(DEPLOY_TOPDIR) ] ; then \
# $(ECHO) deploy_not_a_peer_of_j2se ; \
#fi )
#ifeq ($(DCHK), deploy_not_a_peer_of_j2se)
# If a build failure points to control coming here it means
# it means deploy is not in the same directory
# as j2se. Java Kernel can't tolerate that for the time being.
#endif
else \
fi )
# Crazy but true: deploy/make/plugin/jinstall/Makefile.jkernel does
# not include deploy/make/common/Defs-windows.gmk, either directly
# or indirectly. But it does include this file, so redundantly declare
# these variables that are in deploy/make/common/Defs-windows.gmk for
# the sake of the Java Kernel part of the deploy build. Whew!