corba/make/common/Defs-windows.gmk
author weijun
Fri, 27 Nov 2009 08:51:42 +0800
changeset 4337 2a6d13ebbbed
parent 3124 005f9574da2c
child 5385 8308e15f228e
permissions -rw-r--r--
6901085: SPNEGO does not works with native program Reviewed-by: valeriep
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     1
#
2192
7e916cf3102a 6814575: Update copyright year
xdono
parents: 1642
diff changeset
     2
# Copyright 1999-2009 Sun Microsystems, Inc.  All Rights Reserved.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
02bb8761fcce Initial load
duke
parents:
diff changeset
     4
#
02bb8761fcce Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
02bb8761fcce Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
02bb8761fcce Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
02bb8761fcce Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
02bb8761fcce Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
02bb8761fcce Initial load
duke
parents:
diff changeset
    10
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
02bb8761fcce Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
02bb8761fcce Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
02bb8761fcce Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
02bb8761fcce Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
02bb8761fcce Initial load
duke
parents:
diff changeset
    16
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
02bb8761fcce Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
02bb8761fcce Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
02bb8761fcce Initial load
duke
parents:
diff changeset
    20
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
02bb8761fcce Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
02bb8761fcce Initial load
duke
parents:
diff changeset
    23
# have any questions.
02bb8761fcce Initial load
duke
parents:
diff changeset
    24
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    25
02bb8761fcce Initial load
duke
parents:
diff changeset
    26
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    27
# Makefile to specify compiler flags for programs and libraries
02bb8761fcce Initial load
duke
parents:
diff changeset
    28
# targeted to Windows builds.  Should not contain any rules.
02bb8761fcce Initial load
duke
parents:
diff changeset
    29
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    30
02bb8761fcce Initial load
duke
parents:
diff changeset
    31
# Get shared JDK settings
02bb8761fcce Initial load
duke
parents:
diff changeset
    32
include $(BUILDDIR)/common/shared/Defs.gmk
02bb8761fcce Initial load
duke
parents:
diff changeset
    33
02bb8761fcce Initial load
duke
parents:
diff changeset
    34
# CC compiler object code output directive flag value
02bb8761fcce Initial load
duke
parents:
diff changeset
    35
CC_OBJECT_OUTPUT_FLAG = -Fo
02bb8761fcce Initial load
duke
parents:
diff changeset
    36
CC_PROGRAM_OUTPUT_FLAG = -Fe
02bb8761fcce Initial load
duke
parents:
diff changeset
    37
02bb8761fcce Initial load
duke
parents:
diff changeset
    38
# The suffix applied to the library name for FDLIBM
02bb8761fcce Initial load
duke
parents:
diff changeset
    39
FDDLIBM_SUFFIX = lib
02bb8761fcce Initial load
duke
parents:
diff changeset
    40
# The suffix applied to scripts (.bat for windows, nothing for unix)
02bb8761fcce Initial load
duke
parents:
diff changeset
    41
SCRIPT_SUFFIX = .bat
02bb8761fcce Initial load
duke
parents:
diff changeset
    42
02bb8761fcce Initial load
duke
parents:
diff changeset
    43
HPIS = windows
02bb8761fcce Initial load
duke
parents:
diff changeset
    44
# LIB_LOCATION, which for windows identifies where .exe files go, may be
02bb8761fcce Initial load
duke
parents:
diff changeset
    45
# set by each GNUmakefile. The default is BINDIR.
02bb8761fcce Initial load
duke
parents:
diff changeset
    46
ifndef LIB_LOCATION
02bb8761fcce Initial load
duke
parents:
diff changeset
    47
  LIB_LOCATION = $(BINDIR)
02bb8761fcce Initial load
duke
parents:
diff changeset
    48
endif # LIB_LOCATION
02bb8761fcce Initial load
duke
parents:
diff changeset
    49
02bb8761fcce Initial load
duke
parents:
diff changeset
    50
ifndef PLATFORM_SRC
02bb8761fcce Initial load
duke
parents:
diff changeset
    51
  PLATFORM_SRC  = $(TOPDIR)/src/windows
02bb8761fcce Initial load
duke
parents:
diff changeset
    52
endif # PLATFORM_SRC
02bb8761fcce Initial load
duke
parents:
diff changeset
    53
02bb8761fcce Initial load
duke
parents:
diff changeset
    54
# for backwards compatability, the old "win32" is used here instead of 
02bb8761fcce Initial load
duke
parents:
diff changeset
    55
# the more proper "windows"
02bb8761fcce Initial load
duke
parents:
diff changeset
    56
PLATFORM_INCLUDE_NAME = win32
02bb8761fcce Initial load
duke
parents:
diff changeset
    57
PLATFORM_INCLUDE      = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
02bb8761fcce Initial load
duke
parents:
diff changeset
    58
02bb8761fcce Initial load
duke
parents:
diff changeset
    59
# The following DLL's are considered MS runtime libraries and should
02bb8761fcce Initial load
duke
parents:
diff changeset
    60
#     not to be REBASEd, see deploy/make/common/Release.gmk.
1347
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
    61
#     msvcrt.dll, msvcrnn.dll [msvcr71 or msvcr80 or msvcr90] : Microsoft runtimes
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    62
MS_RUNTIME_LIBRARIES = msvcrt.dll
1347
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
    63
MSVCRNN_DLL =
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    64
ifeq ($(ARCH_DATA_MODEL), 32)
02bb8761fcce Initial load
duke
parents:
diff changeset
    65
  ifeq ($(COMPILER_VERSION), VS2003)
1347
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
    66
    MSVCRNN_DLL = msvcr71.dll
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
    67
    MSVCPNN_DLL = msvcp71.dll
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
    68
    MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
    69
  endif
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
    70
  ifeq ($(COMPILER_VERSION), VS2005)
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
    71
    MSVCRNN_DLL = msvcr80.dll
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
    72
    MSVCPNN_DLL = msvcp80.dll
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
    73
    MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
    74
  endif
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
    75
  ifeq ($(COMPILER_VERSION), VS2008)
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
    76
    MSVCRNN_DLL = msvcr90.dll
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
    77
    MSVCPNN_DLL = msvcp90.dll
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
    78
    MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    79
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    80
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    81
02bb8761fcce Initial load
duke
parents:
diff changeset
    82
# C Compiler flag definitions
02bb8761fcce Initial load
duke
parents:
diff changeset
    83
02bb8761fcce Initial load
duke
parents:
diff changeset
    84
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    85
# Default optimization
02bb8761fcce Initial load
duke
parents:
diff changeset
    86
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    87
ifeq ($(CC_VERSION),msvc)
02bb8761fcce Initial load
duke
parents:
diff changeset
    88
  # Visual Studio .NET 2003 or VS2003 compiler option definitions:
02bb8761fcce Initial load
duke
parents:
diff changeset
    89
  #   -O1      Favors reduced size over speed (-Og     -Os -Oy -Ob2 -Gs -GF -Gy)
02bb8761fcce Initial load
duke
parents:
diff changeset
    90
  #   -O2      Favors speed over reduced size (-Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy)
02bb8761fcce Initial load
duke
parents:
diff changeset
    91
  #   -Ox      Full optimization (use -O2)    (-Og -Oi -Ot -Oy -Ob2)
02bb8761fcce Initial load
duke
parents:
diff changeset
    92
  #              (Removed in Visual Studio 2005 or VS2005)
02bb8761fcce Initial load
duke
parents:
diff changeset
    93
  #   -Ob2     More aggressive inlining
02bb8761fcce Initial load
duke
parents:
diff changeset
    94
  #   -Og      Global optimizations
02bb8761fcce Initial load
duke
parents:
diff changeset
    95
  #   -Oi      Replace some functions with intrinsic or special forms
02bb8761fcce Initial load
duke
parents:
diff changeset
    96
  #   -Op      Improve floating point calculations (disables some optimizations)
02bb8761fcce Initial load
duke
parents:
diff changeset
    97
  #              (Replaced with -fp:precise in VS2005, /Op is default now)
02bb8761fcce Initial load
duke
parents:
diff changeset
    98
  #   -Os      Favor small code
02bb8761fcce Initial load
duke
parents:
diff changeset
    99
  #   -Ot      Favor faster code
02bb8761fcce Initial load
duke
parents:
diff changeset
   100
  #   -Oy      Frame pointer omission
02bb8761fcce Initial load
duke
parents:
diff changeset
   101
  #   -GB      Optimize for pentium (old VC6 option?)
02bb8761fcce Initial load
duke
parents:
diff changeset
   102
  #   -G6      VS2003 version of -GB?
02bb8761fcce Initial load
duke
parents:
diff changeset
   103
  #   -GF      Pool strings in read-only memory
02bb8761fcce Initial load
duke
parents:
diff changeset
   104
  #   -Gf      Pool strings in read-write memory (the default)
02bb8761fcce Initial load
duke
parents:
diff changeset
   105
  #   -Gs      Controls stack probess
02bb8761fcce Initial load
duke
parents:
diff changeset
   106
  #   -GS      Adds buffer overflow checks on stacks
02bb8761fcce Initial load
duke
parents:
diff changeset
   107
  #              (Default in VS2005)
02bb8761fcce Initial load
duke
parents:
diff changeset
   108
  #   -GX      Enables exception handling 
02bb8761fcce Initial load
duke
parents:
diff changeset
   109
  #              (Replaced with /EHsc in VS2005)
02bb8761fcce Initial load
duke
parents:
diff changeset
   110
  #   -Gy      Function level linking only
02bb8761fcce Initial load
duke
parents:
diff changeset
   111
  #
02bb8761fcce Initial load
duke
parents:
diff changeset
   112
  # NOTE: With VC6, -Ox included -Gs.
02bb8761fcce Initial load
duke
parents:
diff changeset
   113
  # NOTE: With VC6, -Ox, -O1, and -O2 used -Ob1, not -Ob2.
02bb8761fcce Initial load
duke
parents:
diff changeset
   114
  # NOTE: With VC6, -O1 and -O2 used -Gf, not -GF.
02bb8761fcce Initial load
duke
parents:
diff changeset
   115
  #
02bb8761fcce Initial load
duke
parents:
diff changeset
   116
  ifeq ($(COMPILER_VERSION), VC6)
02bb8761fcce Initial load
duke
parents:
diff changeset
   117
    # VC6 (6.2) msvc compiler (the way Tiger and early Mustang were built)
02bb8761fcce Initial load
duke
parents:
diff changeset
   118
    # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
02bb8761fcce Initial load
duke
parents:
diff changeset
   119
    AUTOMATIC_PCH_OPTION =
02bb8761fcce Initial load
duke
parents:
diff changeset
   120
    GX_OPTION = -GX
02bb8761fcce Initial load
duke
parents:
diff changeset
   121
    ifeq ($(ARCH_DATA_MODEL), 32)
02bb8761fcce Initial load
duke
parents:
diff changeset
   122
      CC_HIGHEST_OPT = -Ox -Gy -Os -GB
02bb8761fcce Initial load
duke
parents:
diff changeset
   123
      CC_HIGHER_OPT  = -Ox -Gy -Os -GB
02bb8761fcce Initial load
duke
parents:
diff changeset
   124
      CC_LOWER_OPT   = -Ox -Gy -Os -GB
02bb8761fcce Initial load
duke
parents:
diff changeset
   125
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   126
      CC_HIGHEST_OPT = -Ox -Gy -Op
02bb8761fcce Initial load
duke
parents:
diff changeset
   127
      CC_HIGHER_OPT  = -Ox -Gy -Op
02bb8761fcce Initial load
duke
parents:
diff changeset
   128
      CC_LOWER_OPT   = -Ox -Gy -Op
02bb8761fcce Initial load
duke
parents:
diff changeset
   129
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   130
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   131
  ifeq ($(COMPILER_VERSION), VS2003)
02bb8761fcce Initial load
duke
parents:
diff changeset
   132
    # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
02bb8761fcce Initial load
duke
parents:
diff changeset
   133
    AUTOMATIC_PCH_OPTION = -YX
02bb8761fcce Initial load
duke
parents:
diff changeset
   134
    # Also known as VC7 compiler
02bb8761fcce Initial load
duke
parents:
diff changeset
   135
    GX_OPTION = -GX
02bb8761fcce Initial load
duke
parents:
diff changeset
   136
    ifeq ($(ARCH_DATA_MODEL), 32)
02bb8761fcce Initial load
duke
parents:
diff changeset
   137
      # Lowered opt level to try and reduce footprint, dll size especially.
02bb8761fcce Initial load
duke
parents:
diff changeset
   138
      #     Was: CC_HIGHEST_OPT = -O2 -G6
02bb8761fcce Initial load
duke
parents:
diff changeset
   139
      #     Was: CC_HIGHER_OPT  = -O2
02bb8761fcce Initial load
duke
parents:
diff changeset
   140
      CC_HIGHEST_OPT = -O2
02bb8761fcce Initial load
duke
parents:
diff changeset
   141
      CC_HIGHER_OPT  = -O1
02bb8761fcce Initial load
duke
parents:
diff changeset
   142
      CC_LOWER_OPT   = -O1
02bb8761fcce Initial load
duke
parents:
diff changeset
   143
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   144
      CC_HIGHEST_OPT = -O2 -Op
02bb8761fcce Initial load
duke
parents:
diff changeset
   145
      CC_HIGHER_OPT  = -O2 -Op
02bb8761fcce Initial load
duke
parents:
diff changeset
   146
      CC_LOWER_OPT   = -O1 -Op
02bb8761fcce Initial load
duke
parents:
diff changeset
   147
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   148
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   149
  ifeq ($(COMPILER_VERSION), VS2005)
02bb8761fcce Initial load
duke
parents:
diff changeset
   150
    # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
02bb8761fcce Initial load
duke
parents:
diff changeset
   151
    AUTOMATIC_PCH_OPTION =
02bb8761fcce Initial load
duke
parents:
diff changeset
   152
    # VS2005 compiler, only with Platform SDK right now?
02bb8761fcce Initial load
duke
parents:
diff changeset
   153
    GX_OPTION = -EHsc
02bb8761fcce Initial load
duke
parents:
diff changeset
   154
    ifeq ($(ARCH_DATA_MODEL), 32)
02bb8761fcce Initial load
duke
parents:
diff changeset
   155
      CC_HIGHEST_OPT = -O2
02bb8761fcce Initial load
duke
parents:
diff changeset
   156
      CC_HIGHER_OPT  = -O1
02bb8761fcce Initial load
duke
parents:
diff changeset
   157
      CC_LOWER_OPT   = -O1
02bb8761fcce Initial load
duke
parents:
diff changeset
   158
    else
02bb8761fcce Initial load
duke
parents:
diff changeset
   159
      CC_HIGHEST_OPT = -O2
02bb8761fcce Initial load
duke
parents:
diff changeset
   160
      CC_HIGHER_OPT  = -O1
02bb8761fcce Initial load
duke
parents:
diff changeset
   161
      CC_LOWER_OPT   = -O1
02bb8761fcce Initial load
duke
parents:
diff changeset
   162
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   163
  endif
1347
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
   164
  ifeq ($(COMPILER_VERSION), VS2008)
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
   165
    # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
   166
    AUTOMATIC_PCH_OPTION =
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
   167
    GX_OPTION = -EHsc
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
   168
    ifeq ($(ARCH_DATA_MODEL), 32)
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
   169
      CC_HIGHEST_OPT = -O2
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
   170
      CC_HIGHER_OPT  = -O1
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
   171
      CC_LOWER_OPT   = -O1
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
   172
    else
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
   173
      CC_HIGHEST_OPT = -O2
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
   174
      CC_HIGHER_OPT  = -O1
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
   175
      CC_LOWER_OPT   = -O1
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
   176
    endif
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
   177
  endif
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   178
  CC_NO_OPT      = -Od
02bb8761fcce Initial load
duke
parents:
diff changeset
   179
else # CC_VERSION
02bb8761fcce Initial load
duke
parents:
diff changeset
   180
  # GCC not supported, but left for historical reference...
02bb8761fcce Initial load
duke
parents:
diff changeset
   181
  CC_HIGHEST_OPT = -O3
02bb8761fcce Initial load
duke
parents:
diff changeset
   182
  CC_HIGHER_OPT  = -O2
02bb8761fcce Initial load
duke
parents:
diff changeset
   183
  CC_LOWER_OPT   = -O2
02bb8761fcce Initial load
duke
parents:
diff changeset
   184
  CC_NO_OPT      = 
02bb8761fcce Initial load
duke
parents:
diff changeset
   185
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   186
02bb8761fcce Initial load
duke
parents:
diff changeset
   187
# If NO_OPTIMIZATIONS is defined in the environment, turn all optimzations off
02bb8761fcce Initial load
duke
parents:
diff changeset
   188
ifdef NO_OPTIMIZATIONS
02bb8761fcce Initial load
duke
parents:
diff changeset
   189
  CC_HIGHEST_OPT = $(CC_NO_OPT)
02bb8761fcce Initial load
duke
parents:
diff changeset
   190
  CC_HIGHER_OPT  = $(CC_NO_OPT)
02bb8761fcce Initial load
duke
parents:
diff changeset
   191
  CC_LOWER_OPT   = $(CC_NO_OPT)
02bb8761fcce Initial load
duke
parents:
diff changeset
   192
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   193
02bb8761fcce Initial load
duke
parents:
diff changeset
   194
ifeq ($(PRODUCT), java)
02bb8761fcce Initial load
duke
parents:
diff changeset
   195
    _OPT = $(CC_HIGHER_OPT)
02bb8761fcce Initial load
duke
parents:
diff changeset
   196
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   197
    _OPT = $(CC_LOWER_OPT)
02bb8761fcce Initial load
duke
parents:
diff changeset
   198
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   199
02bb8761fcce Initial load
duke
parents:
diff changeset
   200
# Select the runtime support library carefully, need to be consistent
02bb8761fcce Initial load
duke
parents:
diff changeset
   201
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   202
# VS2003 compiler option definitions:
02bb8761fcce Initial load
duke
parents:
diff changeset
   203
#   -MD        Use dynamic multi-threaded runtime library
02bb8761fcce Initial load
duke
parents:
diff changeset
   204
#   -MDd       Use debug version (don't use, doesn't mix with -MD DLL's)
02bb8761fcce Initial load
duke
parents:
diff changeset
   205
#   -MT        Use static multi-threaded runtime library (-ML is going away)
02bb8761fcce Initial load
duke
parents:
diff changeset
   206
#   -MTd       Use static debug version (better than -MDd, no runtime issues)
02bb8761fcce Initial load
duke
parents:
diff changeset
   207
#   -D_DEBUG   Change use of malloc/free/etc to use special debug ones (-MTd)
02bb8761fcce Initial load
duke
parents:
diff changeset
   208
#
1347
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
   209
#      NOTE: We also will use /D _STATIC_CPPLIB  so we don't need msvcpnn.dll
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   210
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   211
ifeq ($(MS_RUNTIME_STATIC),true)
02bb8761fcce Initial load
duke
parents:
diff changeset
   212
  MS_RUNTIME_OPTION=-MT
02bb8761fcce Initial load
duke
parents:
diff changeset
   213
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   214
  MS_RUNTIME_OPTION=-MD
02bb8761fcce Initial load
duke
parents:
diff changeset
   215
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   216
# The _DEBUG macro option (changes things like malloc to use debug version)
02bb8761fcce Initial load
duke
parents:
diff changeset
   217
MS_RUNTIME_DEBUG_OPTION=
02bb8761fcce Initial load
duke
parents:
diff changeset
   218
MS_RC_DEBUG_OPTION=
02bb8761fcce Initial load
duke
parents:
diff changeset
   219
# Externally set environment variable can force any build to use the debug vers
02bb8761fcce Initial load
duke
parents:
diff changeset
   220
ifeq ($(MFC_DEBUG), true)
02bb8761fcce Initial load
duke
parents:
diff changeset
   221
  ifeq ($(MS_RUNTIME_STATIC),true)
02bb8761fcce Initial load
duke
parents:
diff changeset
   222
    MS_RUNTIME_OPTION=-MTd
02bb8761fcce Initial load
duke
parents:
diff changeset
   223
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   224
    # This MS debugging flag forces a dependence on the debug
02bb8761fcce Initial load
duke
parents:
diff changeset
   225
    #     version of the runtime library (MSVCRTD.DLL), as does -MDd.
02bb8761fcce Initial load
duke
parents:
diff changeset
   226
    #     We cannot re-distribute this debug runtime.
02bb8761fcce Initial load
duke
parents:
diff changeset
   227
    MS_RUNTIME_OPTION=-MDd
02bb8761fcce Initial load
duke
parents:
diff changeset
   228
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   229
  MS_RUNTIME_DEBUG_OPTION= -D_DEBUG
02bb8761fcce Initial load
duke
parents:
diff changeset
   230
  MS_RC_DEBUG_OPTION= -d _DEBUG
02bb8761fcce Initial load
duke
parents:
diff changeset
   231
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   232
02bb8761fcce Initial load
duke
parents:
diff changeset
   233
# Always add _STATIC_CPPLIB definition
02bb8761fcce Initial load
duke
parents:
diff changeset
   234
STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB
02bb8761fcce Initial load
duke
parents:
diff changeset
   235
MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
02bb8761fcce Initial load
duke
parents:
diff changeset
   236
02bb8761fcce Initial load
duke
parents:
diff changeset
   237
ifeq ($(CC_VERSION),msvc)
02bb8761fcce Initial load
duke
parents:
diff changeset
   238
  # VS2003 compiler option definitions:
02bb8761fcce Initial load
duke
parents:
diff changeset
   239
  #   -Zi      Cause *.pdb file to be created, full debug information
02bb8761fcce Initial load
duke
parents:
diff changeset
   240
  #   -Z7      Full debug inside the .obj, no .pdb
02bb8761fcce Initial load
duke
parents:
diff changeset
   241
  #   -Zd      Basic debug, no local variables? In the .obj
02bb8761fcce Initial load
duke
parents:
diff changeset
   242
  #   -Zl      Don't add runtime library name to obj file?
02bb8761fcce Initial load
duke
parents:
diff changeset
   243
  #   -Od      Turns off optimization and speeds compilation
02bb8761fcce Initial load
duke
parents:
diff changeset
   244
  #   -YX -Fp/.../foobar.pch   Use precompiled headers (try someday?)
02bb8761fcce Initial load
duke
parents:
diff changeset
   245
  #   -nologo  Don't print out startup message
02bb8761fcce Initial load
duke
parents:
diff changeset
   246
  #   /D _STATIC_CPPLIB  
1347
1b32e0d45be0 6759959: VS2008 errors compiling corba sources
tbell
parents: 4
diff changeset
   247
  #            Use static link for the C++ runtime (so msvcpnn.dll not needed)
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   248
  #   
02bb8761fcce Initial load
duke
parents:
diff changeset
   249
  CFLAGS_COMMON  += -Zi -nologo
02bb8761fcce Initial load
duke
parents:
diff changeset
   250
  CFLAGS_OPT      = $(POPT)
02bb8761fcce Initial load
duke
parents:
diff changeset
   251
  CFLAGS_DBG      = -Od $(MS_RUNTIME_DEBUG_OPTION)
02bb8761fcce Initial load
duke
parents:
diff changeset
   252
02bb8761fcce Initial load
duke
parents:
diff changeset
   253
  # Starting from VS2005 the wchar_t is handled as a built-in C/C++ data type
02bb8761fcce Initial load
duke
parents:
diff changeset
   254
  # by default. However, we expect the wchar_t to be a typedef to the
02bb8761fcce Initial load
duke
parents:
diff changeset
   255
  # unsigned short data type. The -Zc:wchar_t- option restores the old
02bb8761fcce Initial load
duke
parents:
diff changeset
   256
  # behavior (as seen in VS2003) to avoid massive code modifications.
02bb8761fcce Initial load
duke
parents:
diff changeset
   257
  # When/if our code will be "C/C++ Standard"-compliant (at least in the area
02bb8761fcce Initial load
duke
parents:
diff changeset
   258
  # of handling the wchar_t type), the option won't be necessary.
02bb8761fcce Initial load
duke
parents:
diff changeset
   259
  ifeq ($(ARCH_DATA_MODEL), 32)
02bb8761fcce Initial load
duke
parents:
diff changeset
   260
    CFLAGS_VS2005 += -Zc:wchar_t-
02bb8761fcce Initial load
duke
parents:
diff changeset
   261
  else
02bb8761fcce Initial load
duke
parents:
diff changeset
   262
    # The 64bit Platform SDK we use (April 2005) doesn't like this option
02bb8761fcce Initial load
duke
parents:
diff changeset
   263
    ifneq ($(CC_VER), 14.00.40310.41)
02bb8761fcce Initial load
duke
parents:
diff changeset
   264
      CFLAGS_VS2005 += -Zc:wchar_t-
02bb8761fcce Initial load
duke
parents:
diff changeset
   265
    endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   266
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   267
02bb8761fcce Initial load
duke
parents:
diff changeset
   268
  # All builds get the same runtime setting
02bb8761fcce Initial load
duke
parents:
diff changeset
   269
  CFLAGS_COMMON += $(MS_RUNTIME_OPTION) $(CFLAGS_$(COMPILER_VERSION))
02bb8761fcce Initial load
duke
parents:
diff changeset
   270
  
02bb8761fcce Initial load
duke
parents:
diff changeset
   271
02bb8761fcce Initial load
duke
parents:
diff changeset
   272
  LDEBUG = /debug
02bb8761fcce Initial load
duke
parents:
diff changeset
   273
  
02bb8761fcce Initial load
duke
parents:
diff changeset
   274
  ifeq ($(VTUNE_SUPPORT), true)
02bb8761fcce Initial load
duke
parents:
diff changeset
   275
    OTHER_CFLAGS = -Z7 -Ox 
02bb8761fcce Initial load
duke
parents:
diff changeset
   276
    LDEBUG += /pdb:NONE
02bb8761fcce Initial load
duke
parents:
diff changeset
   277
  endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   278
  
02bb8761fcce Initial load
duke
parents:
diff changeset
   279
  # The new Platform SDK and VS2005 has /GS as a default and requires 
02bb8761fcce Initial load
duke
parents:
diff changeset
   280
  #    bufferoverflowU.lib on the link command line, otherwise 
02bb8761fcce Initial load
duke
parents:
diff changeset
   281
  #    we get missing __security_check_cookie externals at link time. 
02bb8761fcce Initial load
duke
parents:
diff changeset
   282
  BUFFEROVERFLOWLIB = bufferoverflowU.lib
02bb8761fcce Initial load
duke
parents:
diff changeset
   283
  # Always add bufferoverflowU.lib to VS2005 link commands (pack uses LDDFLAGS)
02bb8761fcce Initial load
duke
parents:
diff changeset
   284
  LFLAGS_VS2005 = $(BUFFEROVERFLOWLIB)
02bb8761fcce Initial load
duke
parents:
diff changeset
   285
02bb8761fcce Initial load
duke
parents:
diff changeset
   286
  # LFLAGS are the flags given to $(LINK) and used to build the actual DLL file
02bb8761fcce Initial load
duke
parents:
diff changeset
   287
  BASELFLAGS = -nologo /opt:REF /incremental:no
02bb8761fcce Initial load
duke
parents:
diff changeset
   288
  LFLAGS = $(BASELFLAGS) $(LDEBUG) $(EXTRA_LFLAGS) $(LFLAGS_$(COMPILER_VERSION))
02bb8761fcce Initial load
duke
parents:
diff changeset
   289
  LDDFLAGS += $(LFLAGS_$(COMPILER_VERSION))
02bb8761fcce Initial load
duke
parents:
diff changeset
   290
  
02bb8761fcce Initial load
duke
parents:
diff changeset
   291
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   292
02bb8761fcce Initial load
duke
parents:
diff changeset
   293
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   294
# Preprocessor macro definitions
02bb8761fcce Initial load
duke
parents:
diff changeset
   295
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   296
CPPFLAGS_COMMON = -DWIN32 -DIAL -D_LITTLE_ENDIAN
02bb8761fcce Initial load
duke
parents:
diff changeset
   297
ifeq ($(ARCH), amd64)
02bb8761fcce Initial load
duke
parents:
diff changeset
   298
  CPPFLAGS_COMMON += -D_AMD64_ -Damd64
02bb8761fcce Initial load
duke
parents:
diff changeset
   299
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   300
  CPPFLAGS_COMMON += -DWIN32 -D_X86_ -Dx86 
02bb8761fcce Initial load
duke
parents:
diff changeset
   301
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   302
CPPFLAGS_COMMON += -DWIN32_LEAN_AND_MEAN
02bb8761fcce Initial load
duke
parents:
diff changeset
   303
02bb8761fcce Initial load
duke
parents:
diff changeset
   304
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   305
# Output options (use specific filenames to avoid parallel compile errors)
02bb8761fcce Initial load
duke
parents:
diff changeset
   306
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   307
CFLAGS_COMMON += -Fd$(OBJDIR)/$(basename $(@F)).pdb -Fm$(OBJDIR)/$(basename $(@F)).map
02bb8761fcce Initial load
duke
parents:
diff changeset
   308
02bb8761fcce Initial load
duke
parents:
diff changeset
   309
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   310
# Add warnings and extra on 64bit issues
02bb8761fcce Initial load
duke
parents:
diff changeset
   311
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   312
ifeq ($(ARCH_DATA_MODEL), 64)
02bb8761fcce Initial load
duke
parents:
diff changeset
   313
  CFLAGS_COMMON += -Wp64 
02bb8761fcce Initial load
duke
parents:
diff changeset
   314
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   315
CFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL)
02bb8761fcce Initial load
duke
parents:
diff changeset
   316
02bb8761fcce Initial load
duke
parents:
diff changeset
   317
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   318
# Treat compiler warnings as errors, if requested
02bb8761fcce Initial load
duke
parents:
diff changeset
   319
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   320
ifeq ($(COMPILER_WARNINGS_FATAL),true)
02bb8761fcce Initial load
duke
parents:
diff changeset
   321
  CFLAGS_COMMON += -WX
02bb8761fcce Initial load
duke
parents:
diff changeset
   322
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   323
02bb8761fcce Initial load
duke
parents:
diff changeset
   324
CPPFLAGS_OPT    = 
02bb8761fcce Initial load
duke
parents:
diff changeset
   325
CPPFLAGS_DBG    = -DDEBUG -DLOGGING
02bb8761fcce Initial load
duke
parents:
diff changeset
   326
02bb8761fcce Initial load
duke
parents:
diff changeset
   327
CXXFLAGS_COMMON = $(CFLAGS_COMMON)
02bb8761fcce Initial load
duke
parents:
diff changeset
   328
CXXFLAGS_OPT    = $(CFLAGS_OPT)
02bb8761fcce Initial load
duke
parents:
diff changeset
   329
CXXFLAGS_DBG    = $(CFLAGS_DBG)
02bb8761fcce Initial load
duke
parents:
diff changeset
   330
02bb8761fcce Initial load
duke
parents:
diff changeset
   331
ifneq ($(LIBRARY),fdlibm)
02bb8761fcce Initial load
duke
parents:
diff changeset
   332
  EXTRA_LIBS += advapi32.lib
02bb8761fcce Initial load
duke
parents:
diff changeset
   333
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   334
02bb8761fcce Initial load
duke
parents:
diff changeset
   335
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   336
# Path and option to link against the VM, if you have to. 
02bb8761fcce Initial load
duke
parents:
diff changeset
   337
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   338
JVMLIB	= $(BOOTDIR)/lib/jvm.lib
02bb8761fcce Initial load
duke
parents:
diff changeset
   339
JAVALIB =
02bb8761fcce Initial load
duke
parents:
diff changeset
   340
02bb8761fcce Initial load
duke
parents:
diff changeset
   341
ifeq ($(CC_VERSION), msvc)
02bb8761fcce Initial load
duke
parents:
diff changeset
   342
  CC_DEPEND        = -FD
02bb8761fcce Initial load
duke
parents:
diff changeset
   343
  CC_DEPEND_FILTER = 
02bb8761fcce Initial load
duke
parents:
diff changeset
   344
else # CC_VERSION
02bb8761fcce Initial load
duke
parents:
diff changeset
   345
# not supported, but left for historical reference...
02bb8761fcce Initial load
duke
parents:
diff changeset
   346
  CC_DEPEND        = -MM
02bb8761fcce Initial load
duke
parents:
diff changeset
   347
  CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)&!g'
02bb8761fcce Initial load
duke
parents:
diff changeset
   348
endif # CC_VERSION
02bb8761fcce Initial load
duke
parents:
diff changeset
   349
02bb8761fcce Initial load
duke
parents:
diff changeset
   350
LIBRARY_SUFFIX = dll
02bb8761fcce Initial load
duke
parents:
diff changeset
   351
LIB_SUFFIX     = lib
02bb8761fcce Initial load
duke
parents:
diff changeset
   352
02bb8761fcce Initial load
duke
parents:
diff changeset
   353
# Settings for the VERSIONINFO tap on windows. 
02bb8761fcce Initial load
duke
parents:
diff changeset
   354
VERSIONINFO_RESOURCE = $(TOPDIR)/src/windows/resource/version.rc
02bb8761fcce Initial load
duke
parents:
diff changeset
   355
02bb8761fcce Initial load
duke
parents:
diff changeset
   356
RC_FLAGS = /l 0x409 /r
02bb8761fcce Initial load
duke
parents:
diff changeset
   357
02bb8761fcce Initial load
duke
parents:
diff changeset
   358
ifeq ($(VARIANT), OPT)
02bb8761fcce Initial load
duke
parents:
diff changeset
   359
  RC_FLAGS += -d NDEBUG 
02bb8761fcce Initial load
duke
parents:
diff changeset
   360
else
02bb8761fcce Initial load
duke
parents:
diff changeset
   361
  RC_FLAGS += $(MS_RC_DEBUG_OPTION)
02bb8761fcce Initial load
duke
parents:
diff changeset
   362
endif 
02bb8761fcce Initial load
duke
parents:
diff changeset
   363
02bb8761fcce Initial load
duke
parents:
diff changeset
   364
ifndef COPYRIGHT_YEAR
02bb8761fcce Initial load
duke
parents:
diff changeset
   365
    COPYRIGHT_YEAR = 2007 
02bb8761fcce Initial load
duke
parents:
diff changeset
   366
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   367
3124
005f9574da2c 6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents: 2192
diff changeset
   368
RC_FLAGS += -d "JDK_BUILD_ID=$(FULL_VERSION)" \
005f9574da2c 6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents: 2192
diff changeset
   369
            -d "JDK_COMPANY=$(COMPANY_NAME)" \
005f9574da2c 6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents: 2192
diff changeset
   370
            -d "JDK_COMPONENT=$(PRODUCT_NAME) Platform SE binary" \
005f9574da2c 6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents: 2192
diff changeset
   371
            -d "JDK_VER=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VER).$(COOKED_BUILD_NUMBER)" \
005f9574da2c 6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents: 2192
diff changeset
   372
            -d "JDK_COPYRIGHT=Copyright \xA9 $(COPYRIGHT_YEAR)" \
005f9574da2c 6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents: 2192
diff changeset
   373
            -d "JDK_NAME=$(PRODUCT_NAME) Platform SE $(JDK_MINOR_VERSION) $(JDK_UPDATE_META_TAG)" \
005f9574da2c 6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents: 2192
diff changeset
   374
            -d "JDK_FVER=$(JDK_VERSION)"