Defs-windows.gmk revision 0
3909N/A# Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. 2080N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2080N/A# This code is free software; you can redistribute it and/or modify it 2080N/A# under the terms of the GNU General Public License version 2 only, as 2362N/A# published by the Free Software Foundation. Sun designates this 2080N/A# particular file as subject to the "Classpath" exception as provided 2362N/A# by Sun in the LICENSE file that accompanied this code. 2080N/A# This code is distributed in the hope that it will be useful, but WITHOUT 2080N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 2080N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 2080N/A# version 2 for more details (a copy is included in the LICENSE file that 2080N/A# You should have received a copy of the GNU General Public License version 2080N/A# 2 along with this work; if not, write to the Free Software Foundation, 2080N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 2080N/A# Makefile to specify compiler flags for programs and libraries 2080N/A# targeted to Windows builds. Should not contain any rules. 2080N/A# CC compiler object code output directive flag value 2080N/A# The suffix applied to the library name for FDLIBM 2080N/A# The suffix applied to scripts (.bat for windows, nothing for unix) 2080N/A# LIB_LOCATION, which for windows identifies where .exe files go, may be 2080N/A# set by each GNUmakefile. The default is BINDIR. 2080N/A# for backwards compatability, the old "win32" is used here instead of 2080N/A# The following DLL's are considered MS runtime libraries and should 2080N/A# C Compiler flag definitions 2080N/A # Visual Studio .NET 2003 or VS2003 compiler option definitions: 2080N/A # -O1 Favors reduced size over speed (-Og -Os -Oy -Ob2 -Gs -GF -Gy) 2080N/A # -O2 Favors speed over reduced size (-Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy) 2080N/A # -Ox Full optimization (use -O2) (-Og -Oi -Ot -Oy -Ob2) 2080N/A # (Removed in Visual Studio 2005 or VS2005) 2080N/A # -Ob2 More aggressive inlining 2080N/A # -Oi Replace some functions with intrinsic or special forms 2080N/A # -Op Improve floating point calculations (disables some optimizations) 2080N/A # (Replaced with -fp:precise in VS2005, /Op is default now) 2080N/A # -Oy Frame pointer omission 2080N/A # -GB Optimize for pentium (old VC6 option?) 2080N/A # -G6 VS2003 version of -GB? 2080N/A # -GF Pool strings in read-only memory 2080N/A # -Gf Pool strings in read-write memory (the default) 2080N/A # -Gs Controls stack probess 2080N/A # -GS Adds buffer overflow checks on stacks 2080N/A # -GX Enables exception handling 2080N/A # (Replaced with /EHsc in VS2005) 2080N/A # -Gy Function level linking only 2080N/A # NOTE: With VC6, -Ox included -Gs. 2080N/A # NOTE: With VC6, -Ox, -O1, and -O2 used -Ob1, not -Ob2. 2080N/A # NOTE: With VC6, -O1 and -O2 used -Gf, not -GF. 2080N/A # VC6 (6.2) msvc compiler (the way Tiger and early Mustang were built) 2080N/A # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) # Also known as VC7 compiler # Lowered opt level to try and reduce footprint, dll size especially. # Was: CC_HIGHEST_OPT = -O2 -G6 # Was: CC_HIGHER_OPT = -O2 # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) # VS2005 compiler, only with Platform SDK right now? # GCC not supported, but left for historical reference... # If NO_OPTIMIZATIONS is defined in the environment, turn all optimzations off # Select the runtime support library carefully, need to be consistent # VS2003 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) # -D_DEBUG Change use of malloc/free/etc to use special debug ones (-MTd) # NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcp71.dll # 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 # This MS debugging flag forces a dependence on the debug # version of the runtime library (MSVCRTD.DLL), as does -MDd. # We cannot re-distribute this debug runtime. # Always add _STATIC_CPPLIB definition # VS2003 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 # Use static link for the C++ runtime (so msvcp71.dll not needed) # Starting from VS2005 the wchar_t is handled as a built-in C/C++ data type # by default. However, we expect the wchar_t to be a typedef to the # unsigned short data type. The -Zc:wchar_t- option restores the old # behavior (as seen in VS2003) to avoid massive code modifications. # When/if our code will be "C/C++ Standard"-compliant (at least in the area # of handling the wchar_t type), the option won't be necessary. # The 64bit Platform SDK we use (April 2005) doesn't like this option # All builds get the same runtime setting # The new Platform SDK and VS2005 has /GS as a default and requires # we get missing __security_check_cookie externals at link time. # LFLAGS are the flags given to $(LINK) and used to build the actual DLL file # Preprocessor macro definitions # Output options (use specific filenames to avoid parallel compile errors) # Add warnings and extra on 64bit issues # Treat compiler warnings as errors, if requested # Path and option to link against the VM, if you have to. # not supported, but left for historical reference... # Settings for the VERSIONINFO tap on windows.