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


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











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


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



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


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

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


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


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


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