make/common/Defs-windows.gmk

Print this page


   1 #
   2 # Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


  58     CLOSED_PLATFORM_SRC  = $(BUILDDIR)/../src/closed/windows
  59   endif
  60 endif
  61 
  62 # for backwards compatability, the old "win32" is used here instead of 
  63 # the more proper "windows"
  64 PLATFORM_INCLUDE_NAME = win32
  65 PLATFORM_INCLUDE      = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
  66 
  67 # The following DLL's are considered MS runtime libraries and should
  68 #     not to be REBASEd, see deploy/make/common/Release.gmk.
  69 #     msvcr*.dll: Microsoft runtimes
  70 ifeq ($(COMPILER_VERSION), VS2010)
  71   MSVCRNN_DLL = msvcr100.dll
  72   MSVCPNN_DLL = msvcp100.dll
  73   MS_RUNTIME_LIBRARIES = $(MSVCRNN_DLL)
  74 endif
  75 
  76 EXTRA_LFLAGS += /LIBPATH:$(DXSDK_LIB_PATH)
  77 











  78 # C Compiler flag definitions
  79 
  80 #
  81 # Default optimization
  82 #
  83 
  84 ifndef OPTIMIZATION_LEVEL
  85   ifeq ($(PRODUCT), java)
  86     OPTIMIZATION_LEVEL = HIGHER
  87   else
  88     OPTIMIZATION_LEVEL = LOWER
  89   endif
  90 endif
  91 ifndef FASTDEBUG_OPTIMIZATION_LEVEL
  92   FASTDEBUG_OPTIMIZATION_LEVEL = LOWER
  93 endif
  94 
  95 ifeq ($(CC_VERSION),msvc)
  96   # Visual Studio compiler option definitions:
  97   #   -O1      Favors reduced size over speed (-Og     -Os -Oy -Ob2 -Gs -GF -Gy)


 184 # Silence the warning about using _STATIC_CPPLIB
 185 ifneq ($(SHOW_ALL_WARNINGS),true)
 186   # Needed with VS2010 to turn off the deprecated warning.
 187   STATIC_CPPLIB_OPTION += /D _DISABLE_DEPRECATE_STATIC_CPPLIB
 188 endif
 189 
 190 MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
 191 
 192 ifeq ($(CC_VERSION),msvc)
 193   # Visual Studio compiler option definitions:
 194   #   -Zi      Cause *.pdb file to be created, full debug information
 195   #   -Z7      Full debug inside the .obj, no .pdb
 196   #   -Zd      Basic debug, no local variables? In the .obj
 197   #   -Zl      Don't add runtime library name to obj file?
 198   #   -Od      Turns off optimization and speeds compilation
 199   #   -YX -Fp/.../foobar.pch   Use precompiled headers (try someday?)
 200   #   -nologo  Don't print out startup message
 201   #   /D _STATIC_CPPLIB
 202   #            Use static link for the C++ runtime (so msvcpnn.dll not needed)
 203   #   
 204   CFLAGS_COMMON  += -Zi -nologo



 205   CFLAGS_OPT      = $(CC_OPT)
 206   CFLAGS_DBG      = -Od $(MS_RUNTIME_DEBUG_OPTION)
 207 
 208   CFLAGS_VS2010 += -Zc:wchar_t-
 209 
 210   # All builds get the same runtime setting
 211   CFLAGS_COMMON += $(MS_RUNTIME_OPTION) $(CFLAGS_$(COMPILER_VERSION))
 212 
 213   LDEBUG = /debug
 214   
 215   ifeq ($(VTUNE_SUPPORT), true)
 216     OTHER_CFLAGS = -Z7 -Ox 
 217     LDEBUG += /pdb:NONE
 218   endif
 219   
 220   # VS2010, always need safe exception handlers, not needed on 64bit
 221   ifeq ($(ARCH_DATA_MODEL), 32)
 222     LFLAGS_VS2010 +=  -SAFESEH
 223   endif
 224 


 288 JVMLIB = $(LIBDIR)/jvm.lib
 289 JAVALIB = $(LIBDIR)/java.lib
 290 
 291 ifeq ($(CC_VERSION), msvc)
 292   CC_DEPEND        = -FD
 293   CC_DEPEND_FILTER = 
 294 else # CC_VERSION
 295 # not supported, but left for historical reference...
 296   CC_DEPEND        = -MM
 297   CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)&!g'
 298 endif # CC_VERSION
 299 
 300 LIBRARY_SUFFIX = dll
 301 LIB_SUFFIX     = lib
 302 
 303 # Settings for the JDI - Serviceability Agent binding.
 304 HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/bin
 305 SALIB_NAME = $(LIB_PREFIX)sawindbg.$(LIBRARY_SUFFIX)
 306 SAMAP_NAME = $(LIB_PREFIX)sawindbg.map
 307 SAPDB_NAME = $(LIB_PREFIX)sawindbg.pdb

 308 
 309 ifeq ($(ARCH), ia64)
 310   # SA will never be supported here.
 311   INCLUDE_SA = false
 312 else
 313   INCLUDE_SA = true
 314 endif
 315 
 316 # Settings for the VERSIONINFO tap on windows. 
 317 VERSIONINFO_RESOURCE = $(BUILDDIR)/../src/windows/resource/version.rc
 318 
 319 ifneq ($(JDK_BUILD_NUMBER),)
 320  COOKED_BUILD_NUMBER = $(shell $(ECHO) $(JDK_BUILD_NUMBER) | $(SED) -e 's/^b//' -e 's/^0//')
 321 else
 322  COOKED_BUILD_NUMBER = 0
 323 endif
 324 
 325 # If the update version contains non-numeric characters, we need
 326 # to massage it into a numeric format. 
 327 # We use the following formula:


   1 #
   2 # Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


  58     CLOSED_PLATFORM_SRC  = $(BUILDDIR)/../src/closed/windows
  59   endif
  60 endif
  61 
  62 # for backwards compatability, the old "win32" is used here instead of 
  63 # the more proper "windows"
  64 PLATFORM_INCLUDE_NAME = win32
  65 PLATFORM_INCLUDE      = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
  66 
  67 # The following DLL's are considered MS runtime libraries and should
  68 #     not to be REBASEd, see deploy/make/common/Release.gmk.
  69 #     msvcr*.dll: Microsoft runtimes
  70 ifeq ($(COMPILER_VERSION), VS2010)
  71   MSVCRNN_DLL = msvcr100.dll
  72   MSVCPNN_DLL = msvcp100.dll
  73   MS_RUNTIME_LIBRARIES = $(MSVCRNN_DLL)
  74 endif
  75 
  76 EXTRA_LFLAGS += /LIBPATH:$(DXSDK_LIB_PATH)
  77 
  78 # Full Debug Symbols has been enabled on Windows since JDK1.4.1.
  79 # Default is enabled with debug info files ZIP'ed to save space.
  80 
  81 ENABLE_FULL_DEBUG_SYMBOLS ?= 1
  82 
  83 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
  84   ZIP_DEBUGINFO_FILES ?= 1
  85 else
  86   ZIP_DEBUGINFO_FILES=0
  87 endif
  88 
  89 # C Compiler flag definitions
  90 
  91 #
  92 # Default optimization
  93 #
  94 
  95 ifndef OPTIMIZATION_LEVEL
  96   ifeq ($(PRODUCT), java)
  97     OPTIMIZATION_LEVEL = HIGHER
  98   else
  99     OPTIMIZATION_LEVEL = LOWER
 100   endif
 101 endif
 102 ifndef FASTDEBUG_OPTIMIZATION_LEVEL
 103   FASTDEBUG_OPTIMIZATION_LEVEL = LOWER
 104 endif
 105 
 106 ifeq ($(CC_VERSION),msvc)
 107   # Visual Studio compiler option definitions:
 108   #   -O1      Favors reduced size over speed (-Og     -Os -Oy -Ob2 -Gs -GF -Gy)


 195 # Silence the warning about using _STATIC_CPPLIB
 196 ifneq ($(SHOW_ALL_WARNINGS),true)
 197   # Needed with VS2010 to turn off the deprecated warning.
 198   STATIC_CPPLIB_OPTION += /D _DISABLE_DEPRECATE_STATIC_CPPLIB
 199 endif
 200 
 201 MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
 202 
 203 ifeq ($(CC_VERSION),msvc)
 204   # Visual Studio compiler option definitions:
 205   #   -Zi      Cause *.pdb file to be created, full debug information
 206   #   -Z7      Full debug inside the .obj, no .pdb
 207   #   -Zd      Basic debug, no local variables? In the .obj
 208   #   -Zl      Don't add runtime library name to obj file?
 209   #   -Od      Turns off optimization and speeds compilation
 210   #   -YX -Fp/.../foobar.pch   Use precompiled headers (try someday?)
 211   #   -nologo  Don't print out startup message
 212   #   /D _STATIC_CPPLIB
 213   #            Use static link for the C++ runtime (so msvcpnn.dll not needed)
 214   #   
 215   ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 216     CFLAGS_COMMON  += -Zi
 217   endif
 218   CFLAGS_COMMON  += -nologo
 219   CFLAGS_OPT      = $(CC_OPT)
 220   CFLAGS_DBG      = -Od $(MS_RUNTIME_DEBUG_OPTION)
 221 
 222   CFLAGS_VS2010 += -Zc:wchar_t-
 223 
 224   # All builds get the same runtime setting
 225   CFLAGS_COMMON += $(MS_RUNTIME_OPTION) $(CFLAGS_$(COMPILER_VERSION))
 226 
 227   LDEBUG = /debug
 228   
 229   ifeq ($(VTUNE_SUPPORT), true)
 230     OTHER_CFLAGS = -Z7 -Ox 
 231     LDEBUG += /pdb:NONE
 232   endif
 233   
 234   # VS2010, always need safe exception handlers, not needed on 64bit
 235   ifeq ($(ARCH_DATA_MODEL), 32)
 236     LFLAGS_VS2010 +=  -SAFESEH
 237   endif
 238 


 302 JVMLIB = $(LIBDIR)/jvm.lib
 303 JAVALIB = $(LIBDIR)/java.lib
 304 
 305 ifeq ($(CC_VERSION), msvc)
 306   CC_DEPEND        = -FD
 307   CC_DEPEND_FILTER = 
 308 else # CC_VERSION
 309 # not supported, but left for historical reference...
 310   CC_DEPEND        = -MM
 311   CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)&!g'
 312 endif # CC_VERSION
 313 
 314 LIBRARY_SUFFIX = dll
 315 LIB_SUFFIX     = lib
 316 
 317 # Settings for the JDI - Serviceability Agent binding.
 318 HOTSPOT_SALIB_PATH   = $(HOTSPOT_IMPORT_PATH)/jre/bin
 319 SALIB_NAME = $(LIB_PREFIX)sawindbg.$(LIBRARY_SUFFIX)
 320 SAMAP_NAME = $(LIB_PREFIX)sawindbg.map
 321 SAPDB_NAME = $(LIB_PREFIX)sawindbg.pdb
 322 SA_DIZ_NAME = $(LIB_PREFIX)sawindbg.diz
 323 
 324 ifeq ($(ARCH), ia64)
 325   # SA will never be supported here.
 326   INCLUDE_SA = false
 327 else
 328   INCLUDE_SA = true
 329 endif
 330 
 331 # Settings for the VERSIONINFO tap on windows. 
 332 VERSIONINFO_RESOURCE = $(BUILDDIR)/../src/windows/resource/version.rc
 333 
 334 ifneq ($(JDK_BUILD_NUMBER),)
 335  COOKED_BUILD_NUMBER = $(shell $(ECHO) $(JDK_BUILD_NUMBER) | $(SED) -e 's/^b//' -e 's/^0//')
 336 else
 337  COOKED_BUILD_NUMBER = 0
 338 endif
 339 
 340 # If the update version contains non-numeric characters, we need
 341 # to massage it into a numeric format. 
 342 # We use the following formula: