jdk/make/common/Defs-windows.gmk
author ohair
Wed, 06 Aug 2008 16:43:53 -0700
changeset 919 909db04edd73
parent 849 be386e469547
parent 917 75261da60fff
child 1776 33e9405ab91b
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
715
f16baef3a20e 6719955: Update copyright year
xdono
parents: 30
diff changeset
     2
# Copyright 1999-2008 Sun Microsystems, Inc.  All Rights Reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
# have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
# Makefile to specify compiler flags for programs and libraries
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
# targeted to Windows builds.  Should not contain any rules.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
# WARNING: This file is shared with other workspaces. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
#          So when it includes other files, it must use JDK_TOPDIR.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
# Get shared JDK settings
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
# CC compiler object code output directive flag value
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
CC_OBJECT_OUTPUT_FLAG = -Fo
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
CC_PROGRAM_OUTPUT_FLAG = -Fe
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
# The suffix applied to the library name for FDLIBM
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
FDDLIBM_SUFFIX = lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
# The suffix applied to scripts (.bat for windows, nothing for unix)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
SCRIPT_SUFFIX = .bat
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
HPIS = windows
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
# LIB_LOCATION, which for windows identifies where .exe files go, may be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
# set by each GNUmakefile. The default is BINDIR.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
ifndef LIB_LOCATION
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
  LIB_LOCATION = $(BINDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
endif # LIB_LOCATION
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
ifndef PLATFORM_SRC
30
7ea1edf98bfe 6668781: Openjdk windows cygwin build failure: no rule to make linker_md.obj target
ohair
parents: 2
diff changeset
    54
  PLATFORM_SRC  = $(BUILDDIR)/../src/windows
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
endif # PLATFORM_SRC
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
# Platform specific closed sources
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
  ifndef CLOSED_PLATFORM_SRC
30
7ea1edf98bfe 6668781: Openjdk windows cygwin build failure: no rule to make linker_md.obj target
ohair
parents: 2
diff changeset
    60
    CLOSED_PLATFORM_SRC  = $(BUILDDIR)/../src/closed/windows
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
# for backwards compatability, the old "win32" is used here instead of 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
# the more proper "windows"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
PLATFORM_INCLUDE_NAME = win32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
PLATFORM_INCLUDE      = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
# The following DLL's are considered MS runtime libraries and should
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
#     not to be REBASEd, see deploy/make/common/Release.gmk.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
#     msvcrt.dll, msvcr71.dll: Microsoft runtimes
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
MS_RUNTIME_LIBRARIES = msvcrt.dll
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
ifeq ($(ARCH_DATA_MODEL), 32)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
  ifeq ($(COMPILER_VERSION), VS2003)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
    MS_RUNTIME_LIBRARIES += msvcr71.dll
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
EXTRA_LFLAGS += /LIBPATH:$(DXSDK_LIB_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
# C Compiler flag definitions
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
# Default optimization
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
#
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
    87
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
    88
ifndef OPTIMIZATION_LEVEL
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
    89
  ifeq ($(PRODUCT), java)
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
    90
    OPTIMIZATION_LEVEL = HIGHER
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
    91
  else
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
    92
    OPTIMIZATION_LEVEL = LOWER
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
    93
  endif
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
    94
endif
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
    95
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
ifeq ($(CC_VERSION),msvc)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
  # Visual Studio .NET 2003 or VS2003 compiler option definitions:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
  #   -O1      Favors reduced size over speed (-Og     -Os -Oy -Ob2 -Gs -GF -Gy)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
  #   -O2      Favors speed over reduced size (-Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
  #   -Ox      Full optimization (use -O2)    (-Og -Oi -Ot -Oy -Ob2)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
  #              (Removed in Visual Studio 2005 or VS2005)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
  #   -Ob2     More aggressive inlining
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
  #   -Og      Global optimizations
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
  #   -Oi      Replace some functions with intrinsic or special forms
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
  #   -Op      Improve floating point calculations (disables some optimizations)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
  #              (Replaced with -fp:precise in VS2005, /Op is default now)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
  #   -Os      Favor small code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
  #   -Ot      Favor faster code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
  #   -Oy      Frame pointer omission
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
  #   -GB      Optimize for pentium (old VC6 option?)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
  #   -G6      VS2003 version of -GB?
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
  #   -GF      Pool strings in read-only memory
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
  #   -Gf      Pool strings in read-write memory (the default)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
  #   -Gs      Controls stack probess
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
  #   -GS      Adds buffer overflow checks on stacks
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
  #              (Default in VS2005)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
  #   -GX      Enables exception handling 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
  #              (Replaced with /EHsc in VS2005)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
  #   -Gy      Function level linking only
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
  #
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
  # NOTE: With VC6, -Ox included -Gs.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
  # NOTE: With VC6, -Ox, -O1, and -O2 used -Ob1, not -Ob2.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
  # NOTE: With VC6, -O1 and -O2 used -Gf, not -GF.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
  #
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   125
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   126
  CC_OPT/NONE    = -Od
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   127
  CC_OPT/LOWER   = -O2
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   128
  CC_OPT/HIGHER  = -O3
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   129
  CC_OPT/HIGHEST = -O3
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   130
  
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
  ifeq ($(COMPILER_VERSION), VC6)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
    # VC6 (6.2) msvc compiler (the way Tiger and early Mustang were built)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
    # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
    AUTOMATIC_PCH_OPTION =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
    GX_OPTION = -GX
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
    ifeq ($(ARCH_DATA_MODEL), 32)
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   137
      CC_OPT/HIGHEST = -Ox -Gy -Os -GB
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   138
      CC_OPT/HIGHER  = -Ox -Gy -Os -GB
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   139
      CC_OPT/LOWER   = -Ox -Gy -Os -GB
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
    else
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   141
      CC_OPT/HIGHEST = -Ox -Gy -Op
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   142
      CC_OPT/HIGHER  = -Ox -Gy -Op
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   143
      CC_OPT/LOWER   = -Ox -Gy -Op
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
  endif
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   146
  
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
  ifeq ($(COMPILER_VERSION), VS2003)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
    # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
    AUTOMATIC_PCH_OPTION = -YX
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
    # Also known as VC7 compiler
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
    GX_OPTION = -GX
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    ifeq ($(ARCH_DATA_MODEL), 32)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
      # Lowered opt level to try and reduce footprint, dll size especially.
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   154
      #     Was: CC_OPT/HIGHEST = -O2 -G6
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   155
      #     Was: CC_OPT/HIGHER  = -O2
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   156
      CC_OPT/HIGHEST = -O2
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   157
      CC_OPT/HIGHER  = -O1
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   158
      CC_OPT/LOWER   = -O1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
    else
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   160
      CC_OPT/HIGHEST = -O2 -Op
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   161
      CC_OPT/HIGHER  = -O2 -Op
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   162
      CC_OPT/LOWER   = -O1 -Op
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
  endif
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   165
  
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
  ifeq ($(COMPILER_VERSION), VS2005)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
    # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
    AUTOMATIC_PCH_OPTION =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
    # VS2005 compiler, only with Platform SDK right now?
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
    GX_OPTION = -EHsc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
    ifeq ($(ARCH_DATA_MODEL), 32)
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   172
      CC_OPT/HIGHEST = -O2
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   173
      CC_OPT/HIGHER  = -O1
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   174
      CC_OPT/LOWER   = -O1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
    else
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   176
      CC_OPT/HIGHEST = -O2
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   177
      CC_OPT/HIGHER  = -O1
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   178
      CC_OPT/LOWER   = -O1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
  endif
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   181
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
else # CC_VERSION
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   183
  
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
  # GCC not supported, but left for historical reference...
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   185
  CC_OPT/NONE     =
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   186
  CC_OPT/LOWER    = -O2
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   187
  CC_OPT/HIGHER   = -O2
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   188
  CC_OPT/HIGHEST  = -O3
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   189
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   192
CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL))
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
# Select the runtime support library carefully, need to be consistent
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
# VS2003 compiler option definitions:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
#   -MD        Use dynamic multi-threaded runtime library
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
#   -MDd       Use debug version (don't use, doesn't mix with -MD DLL's)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
#   -MT        Use static multi-threaded runtime library (-ML is going away)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
#   -MTd       Use static debug version (better than -MDd, no runtime issues)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
#   -D_DEBUG   Change use of malloc/free/etc to use special debug ones (-MTd)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
#      NOTE: We also will use /D _STATIC_CPPLIB  so we don't need msvcp71.dll
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
ifeq ($(MS_RUNTIME_STATIC),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
  MS_RUNTIME_OPTION=-MT
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
  MS_RUNTIME_OPTION=-MD
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
# The _DEBUG macro option (changes things like malloc to use debug version)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
MS_RUNTIME_DEBUG_OPTION=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
MS_RC_DEBUG_OPTION=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
# Externally set environment variable can force any build to use the debug vers
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
ifeq ($(MFC_DEBUG), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
  ifeq ($(MS_RUNTIME_STATIC),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
    MS_RUNTIME_OPTION=-MTd
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
    # This MS debugging flag forces a dependence on the debug
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
    #     version of the runtime library (MSVCRTD.DLL), as does -MDd.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
    #     We cannot re-distribute this debug runtime.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
    MS_RUNTIME_OPTION=-MDd
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
  MS_RUNTIME_DEBUG_OPTION= -D_DEBUG
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
  MS_RC_DEBUG_OPTION= -d _DEBUG
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
# Always add _STATIC_CPPLIB definition
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
ifeq ($(CC_VERSION),msvc)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
  # VS2003 compiler option definitions:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
  #   -Zi      Cause *.pdb file to be created, full debug information
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
  #   -Z7      Full debug inside the .obj, no .pdb
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
  #   -Zd      Basic debug, no local variables? In the .obj
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
  #   -Zl      Don't add runtime library name to obj file?
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
  #   -Od      Turns off optimization and speeds compilation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
  #   -YX -Fp/.../foobar.pch   Use precompiled headers (try someday?)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
  #   -nologo  Don't print out startup message
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
  #   /D _STATIC_CPPLIB  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
  #            Use static link for the C++ runtime (so msvcp71.dll not needed)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
  #   
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
  CFLAGS_COMMON  += -Zi -nologo
917
75261da60fff 6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents: 715
diff changeset
   244
  CFLAGS_OPT      = $(CC_OPT)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
  CFLAGS_DBG      = -Od $(MS_RUNTIME_DEBUG_OPTION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
  # Starting from VS2005 the wchar_t is handled as a built-in C/C++ data type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
  # by default. However, we expect the wchar_t to be a typedef to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
  # unsigned short data type. The -Zc:wchar_t- option restores the old
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
  # behavior (as seen in VS2003) to avoid massive code modifications.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
  # When/if our code will be "C/C++ Standard"-compliant (at least in the area
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
  # of handling the wchar_t type), the option won't be necessary.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
  ifeq ($(ARCH_DATA_MODEL), 32)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
    CFLAGS_VS2005 += -Zc:wchar_t-
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
    # The 64bit Platform SDK we use (April 2005) doesn't like this option
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
    ifneq ($(CC_VER), 14.00.40310.41)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
      CFLAGS_VS2005 += -Zc:wchar_t-
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
  # All builds get the same runtime setting
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
  CFLAGS_COMMON += $(MS_RUNTIME_OPTION) $(CFLAGS_$(COMPILER_VERSION))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
  LDEBUG = /debug
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
  ifeq ($(VTUNE_SUPPORT), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
    OTHER_CFLAGS = -Z7 -Ox 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
    LDEBUG += /pdb:NONE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
  # The new Platform SDK and VS2005 has /GS as a default and requires 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
  #    bufferoverflowU.lib on the link command line, otherwise 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
  #    we get missing __security_check_cookie externals at link time. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
  BUFFEROVERFLOWLIB = bufferoverflowU.lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
  # Always add bufferoverflowU.lib to VS2005 link commands (pack uses LDDFLAGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
  LFLAGS_VS2005 = $(BUFFEROVERFLOWLIB)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
  # LFLAGS are the flags given to $(LINK) and used to build the actual DLL file
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
  BASELFLAGS = -nologo /opt:REF /incremental:no
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
  LFLAGS = $(BASELFLAGS) $(LDEBUG) $(EXTRA_LFLAGS) $(LFLAGS_$(COMPILER_VERSION))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
  LDDFLAGS += $(LFLAGS_$(COMPILER_VERSION))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
# Preprocessor macro definitions
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
CPPFLAGS_COMMON = -DWIN32 -DIAL -D_LITTLE_ENDIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
ifeq ($(ARCH), amd64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
  CPPFLAGS_COMMON += -D_AMD64_ -Damd64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
else
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 847
diff changeset
   294
  CPPFLAGS_COMMON += -D_X86_ -Dx86 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
CPPFLAGS_COMMON += -DWIN32_LEAN_AND_MEAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
# Output options (use specific filenames to avoid parallel compile errors)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
CFLAGS_COMMON += -Fd$(OBJDIR)/$(basename $(@F)).pdb -Fm$(OBJDIR)/$(basename $(@F)).map
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
#
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 847
diff changeset
   304
# Use -wdNNNN to disable warning NNNN.
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 847
diff changeset
   305
#   C4800 is a warning about bool performance casts (can't make go away)
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 847
diff changeset
   306
#
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 847
diff changeset
   307
COMPILER_WARNINGS_TO_IGNORE = 4800
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 847
diff changeset
   308
CFLAGS_COMMON += $(COMPILER_WARNINGS_TO_IGNORE:%=-wd%)
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 847
diff changeset
   309
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 847
diff changeset
   310
#
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
# Add warnings and extra on 64bit issues
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
ifeq ($(ARCH_DATA_MODEL), 64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
  CFLAGS_COMMON += -Wp64 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
# Treat compiler warnings as errors, if requested
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
#
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 847
diff changeset
   320
CFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
ifeq ($(COMPILER_WARNINGS_FATAL),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
  CFLAGS_COMMON += -WX
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
CPPFLAGS_OPT    = 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
CPPFLAGS_DBG    = -DDEBUG -DLOGGING
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
CXXFLAGS_COMMON = $(CFLAGS_COMMON)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
CXXFLAGS_OPT    = $(CFLAGS_OPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
CXXFLAGS_DBG    = $(CFLAGS_DBG)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
ifneq ($(LIBRARY),fdlibm)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
  EXTRA_LIBS += advapi32.lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
# Path and option to link against the VM, if you have to. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
JVMLIB = $(LIBDIR)/jvm.lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
JAVALIB = $(LIBDIR)/java.lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
ifeq ($(CC_VERSION), msvc)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
  CC_DEPEND        = -FD
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
  CC_DEPEND_FILTER = 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
else # CC_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
# not supported, but left for historical reference...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
  CC_DEPEND        = -MM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
  CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)&!g'
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
endif # CC_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
LIBRARY_SUFFIX = dll
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
LIB_SUFFIX     = lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
# Settings for the JDI - Serviceability Agent binding.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/bin
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
SALIB_NAME = $(LIB_PREFIX)sawindbg.$(LIBRARY_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
SAMAP_NAME = $(LIB_PREFIX)sawindbg.map
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
SAPDB_NAME = $(LIB_PREFIX)sawindbg.pdb
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
ifeq ($(ARCH), ia64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
  # SA will never be supported here.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
  INCLUDE_SA = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
  # Hopefully, SA will be supported here one of these days,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
  # and these will be changed to true.  Until then,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
  # to build SA on windows, do a control build with
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
  #    BUILD_WIN_SA=1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
  # on the make command.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
  ifdef BUILD_WIN_SA
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 847
diff changeset
   370
    INCLUDE_SA = true
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
  else
849
be386e469547 6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents: 847
diff changeset
   372
    INCLUDE_SA = false
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
# Settings for the VERSIONINFO tap on windows. 
30
7ea1edf98bfe 6668781: Openjdk windows cygwin build failure: no rule to make linker_md.obj target
ohair
parents: 2
diff changeset
   377
VERSIONINFO_RESOURCE = $(BUILDDIR)/../src/windows/resource/version.rc
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
ifneq ($(JDK_BUILD_NUMBER),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
 COOKED_BUILD_NUMBER = $(shell $(ECHO) $(JDK_BUILD_NUMBER) | $(SED) -e 's/^b//' -e 's/^0//')
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
 COOKED_BUILD_NUMBER = 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
# If the update version contains non-numeric characters, we need
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
# to massage it into a numeric format. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
# We use the following formula:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
# JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
# Here are some examples:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
#     1.5.0    b01  ->  5,0,0,1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
#     1.5.0_10 b01  ->  5,0,100,1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
#     1.4.2 b01     ->  4,2,0,1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
#     1.4.2_02 b01  ->  4,2,20,1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
#     1.4.2_02a b01 ->  4,2,21,1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
#     1.4.2_02b b01 ->  4,2,22,1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
ifdef JDK_UPDATE_VERSION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
  VTMP := $(shell $(ECHO) $(JDK_UPDATE_VERSION) | $(TR) "abcde" "12345")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
  CAB_CHAR1 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 1, 1);}')
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
  CAB_CHAR2 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 2, 1);}')
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
  CAB_CHAR3 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 3, 1);}')
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
  JDK_UPDATE_META_TAG := U$(MARKETING_NUMBER)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
  ifeq ($(CAB_CHAR3),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
    CAB_CHAR3 := 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
  ifeq ($(CAB_CHAR1), 0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
    JDK_UPDATE_VER := $(CAB_CHAR2)$(CAB_CHAR3)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
    JDK_UPDATE_VER := $(CAB_CHAR1)$(CAB_CHAR2)$(CAB_CHAR3)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
  JDK_UPDATE_VER := 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
RC_FLAGS = /l 0x409 /r
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
ifeq ($(VARIANT), OPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
  RC_FLAGS += -d NDEBUG 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
  RC_FLAGS += $(MS_RC_DEBUG_OPTION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
endif 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
847
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   423
# Values for the RC variables defined in RC_FLAGS
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   424
JDK_RC_BUILD_ID = $(FULL_VERSION)
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   425
JDK_RC_COMPANY = $(COMPANY_NAME)
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   426
JDK_RC_COMPONENT = $(PRODUCT_NAME) $(JDK_RC_PLATFORM_NAME) binary
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   427
JDK_RC_VER = \
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   428
    $(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VER).$(COOKED_BUILD_NUMBER)
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   429
JDK_RC_COPYRIGHT = Copyright \xA9 $(COPYRIGHT_YEAR)
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   430
JDK_RC_NAME = \
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   431
    $(PRODUCT_NAME) $(JDK_RC_PLATFORM_NAME) $(JDK_MINOR_VERSION) $(JDK_UPDATE_META_TAG)
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   432
JDK_RC_FVER = \
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   433
    $(JDK_MINOR_VERSION),$(JDK_MICRO_VERSION),$(JDK_UPDATE_VER),$(COOKED_BUILD_NUMBER)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
# J2SE name required here
847
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   436
RC_FLAGS += -d "J2SE_BUILD_ID=$(JDK_RC_BUILD_ID)" \
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   437
            -d "J2SE_COMPANY=$(JDK_RC_COMPANY)" \
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   438
            -d "J2SE_COMPONENT=$(JDK_RC_COMPONENT)" \
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   439
            -d "J2SE_VER=$(JDK_RC_VER)" \
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   440
            -d "J2SE_COPYRIGHT=$(JDK_RC_COPYRIGHT)" \
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   441
            -d "J2SE_NAME=$(JDK_RC_NAME)" \
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   442
            -d "J2SE_FVER=$(JDK_RC_FVER)"