Defs-windows.gmk revision 460
381N/A# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. 0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A# This code is free software; you can redistribute it and/or modify it 0N/A# under the terms of the GNU General Public License version 2 only, as 0N/A# published by the Free Software Foundation. Sun designates this 0N/A# particular file as subject to the "Classpath" exception as provided 0N/A# by Sun in the LICENSE file that accompanied this code. 0N/A# This code is distributed in the hope that it will be useful, but WITHOUT 0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A# version 2 for more details (a copy is included in the LICENSE file that 0N/A# accompanied this code). 0N/A# You should have received a copy of the GNU General Public License version 0N/A# 2 along with this work; if not, write to the Free Software Foundation, 0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A# CA 95054 USA or visit www.sun.com if you need additional information or 0N/A# have any questions. 0N/A# Makefile to specify compiler flags for programs and libraries 0N/A# targeted to Windows builds. Should not contain any rules. 0N/A# WARNING: This file is shared with other workspaces. 0N/A# So when it includes other files, it must use JDK_TOPDIR. 0N/A# Get shared JDK settings 0N/A# CC compiler object code output directive flag value 0N/A# The suffix applied to the library name for FDLIBM 0N/A# The suffix applied to scripts (.bat for windows, nothing for unix) 0N/A# LIB_LOCATION, which for windows identifies where .exe files go, may be 0N/A# set by each GNUmakefile. The default is BINDIR. 0N/A# Platform specific closed sources 0N/A# for backwards compatability, the old "win32" is used here instead of 0N/A# the more proper "windows" 0N/A# The following DLL's are considered MS runtime libraries and should 0N/A# C Compiler flag definitions 0N/A# Default optimization 0N/A # Visual Studio .NET 2003 or VS2003 compiler option definitions: 0N/A # -O1 Favors reduced size over speed (-Og -Os -Oy -Ob2 -Gs -GF -Gy) 0N/A # -O2 Favors speed over reduced size (-Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy) 0N/A # -Ox Full optimization (use -O2) (-Og -Oi -Ot -Oy -Ob2) 0N/A # (Removed in Visual Studio 2005 or VS2005) 0N/A # -Ob2 More aggressive inlining 0N/A # -Og Global optimizations 0N/A # -Oi Replace some functions with intrinsic or special forms 0N/A # -Op Improve floating point calculations (disables some optimizations) 0N/A # (Replaced with -fp:precise in VS2005, /Op is default now) 0N/A # -Os Favor small code 0N/A # -Ot Favor faster code 0N/A # -Oy Frame pointer omission 0N/A # -GB Optimize for pentium (old VC6 option?) 0N/A # -G6 VS2003 version of -GB? 0N/A # -GF Pool strings in read-only memory 0N/A # -Gf Pool strings in read-write memory (the default) 0N/A # -Gs Controls stack probess 0N/A # -GS Adds buffer overflow checks on stacks 0N/A # (Default in VS2005) 0N/A # -GX Enables exception handling 0N/A # (Replaced with /EHsc in VS2005) 0N/A # -Gy Function level linking only 0N/A # NOTE: With VC6, -Ox included -Gs. 0N/A # NOTE: With VC6, -Ox, -O1, and -O2 used -Ob1, not -Ob2. 0N/A # NOTE: With VC6, -O1 and -O2 used -Gf, not -GF. 0N/A # VC6 (6.2) msvc compiler (the way Tiger and early Mustang were built) 0N/A # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) 0N/A # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) 0N/A # Also known as VC7 compiler 0N/A # Lowered opt level to try and reduce footprint, dll size especially. 0N/A # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) 0N/A # VS2005 compiler, only with Platform SDK right now? 0N/A # GCC not supported, but left for historical reference... 0N/A# Select the runtime support library carefully, need to be consistent 0N/A# VS2003 compiler option definitions: 0N/A# -MD Use dynamic multi-threaded runtime library 0N/A# -MDd Use debug version (don't use, doesn't mix with -MD DLL's) 0N/A# -MT Use static multi-threaded runtime library (-ML is going away) 0N/A# -MTd Use static debug version (better than -MDd, no runtime issues) 0N/A# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcp71.dll 0N/A# The _DEBUG macro option (changes things like malloc to use debug version) 0N/A# Externally set environment variable can force any build to use the debug vers 0N/A # This MS debugging flag forces a dependence on the debug 0N/A # We cannot re-distribute this debug runtime. 0N/A# Always add _STATIC_CPPLIB definition 0N/A # VS2003 compiler option definitions: 0N/A # -Zi Cause *.pdb file to be created, full debug information 0N/A # -Z7 Full debug inside the .obj, no .pdb 0N/A # -Zd Basic debug, no local variables? In the .obj 0N/A # -Zl Don't add runtime library name to obj file? 0N/A # -Od Turns off optimization and speeds compilation 0N/A # -nologo Don't print out startup message 0N/A # Starting from VS2005 the wchar_t is handled as a built-in C/C++ data type 0N/A # by default. However, we expect the wchar_t to be a typedef to the 0N/A # unsigned short data type. The -Zc:wchar_t- option restores the old 0N/A # behavior (as seen in VS2003) to avoid massive code modifications. 0N/A # When/if our code will be "C/C++ Standard"-compliant (at least in the area 0N/A # of handling the wchar_t type), the option won't be necessary. 0N/A # The 64bit Platform SDK we use (April 2005) doesn't like this option 0N/A # All builds get the same runtime setting 0N/A # The new Platform SDK and VS2005 has /GS as a default and requires 0N/A # we get missing __security_check_cookie externals at link time. 0N/A # LFLAGS are the flags given to $(LINK) and used to build the actual DLL file 0N/A# Preprocessor macro definitions 0N/A# Output options (use specific filenames to avoid parallel compile errors) 0N/A# Add warnings and extra on 64bit issues 0N/A# Treat compiler warnings as errors, if requested 0N/A# Path and option to link against the VM, if you have to. 0N/A# not supported, but left for historical reference... 0N/A# Settings for the JDI - Serviceability Agent binding. 0N/A # SA will never be supported here. 0N/A # Hopefully, SA will be supported here one of these days, 0N/A # and these will be changed to true. Until then, 0N/A # to build SA on windows, do a control build with 0N/A # on the make command. 0N/A# Settings for the VERSIONINFO tap on windows. 0N/A# If the update version contains non-numeric characters, we need 0N/A# to massage it into a numeric format. 0N/A# We use the following formula: 0N/A# JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION 0N/A# Here are some examples: 0N/A# 1.5.0 b01 -> 5,0,0,1 0N/A# 1.5.0_10 b01 -> 5,0,100,1 0N/A# 1.4.2 b01 -> 4,2,0,1 0N/A# 1.4.2_02 b01 -> 4,2,20,1 0N/A# 1.4.2_02a b01 -> 4,2,21,1 0N/A# 1.4.2_02b b01 -> 4,2,22,1 0N/A# J2SE name required here