1 #
   2 # Copyright (c) 2006, 2010, 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.
   8 #
   9 # This code is distributed in the hope that it will be useful, but WITHOUT
  10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 # version 2 for more details (a copy is included in the LICENSE file that
  13 # accompanied this code).
  14 #
  15 # You should have received a copy of the GNU General Public License version
  16 # 2 along with this work; if not, write to the Free Software Foundation,
  17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 #
  19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 # or visit www.oracle.com if you need additional information or have any
  21 # questions.
  22 #  
  23 #
  24 
  25 # The common definitions for hotspot windows builds.
  26 # Include the top level defs.make under make directory instead of this one.
  27 # This file is included into make/defs.make.
  28 # On windows it is only used to construct parameters for
  29 # make/windows/build.make when make/Makefile is used to build VM.
  30 
  31 SLASH_JAVA ?= J:
  32 PATH_SEP = ;
  33 
  34 # Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
  35 ifeq ($(ARCH_DATA_MODEL),32)
  36   ARCH_DATA_MODEL=32
  37   PLATFORM=windows-i586
  38   VM_PLATFORM=windows_i486
  39   HS_ARCH=x86
  40   MAKE_ARGS += ARCH=x86
  41   MAKE_ARGS += BUILDARCH=i486
  42   MAKE_ARGS += Platform_arch=x86
  43   MAKE_ARGS += Platform_arch_model=x86_32
  44 endif
  45 
  46 ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) x86),)
  47   ARCH_DATA_MODEL=32
  48   PLATFORM=windows-i586
  49   VM_PLATFORM=windows_i486
  50   HS_ARCH=x86
  51   MAKE_ARGS += ARCH=x86
  52   MAKE_ARGS += BUILDARCH=i486
  53   MAKE_ARGS += Platform_arch=x86
  54   MAKE_ARGS += Platform_arch_model=x86_32
  55 endif
  56 
  57 ifneq ($(ARCH_DATA_MODEL),32)
  58   ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) ia64),)
  59     ARCH_DATA_MODEL=64
  60     PLATFORM=windows-ia64
  61     VM_PLATFORM=windows_ia64
  62     HS_ARCH=ia64
  63     MAKE_ARGS += LP64=1
  64     MAKE_ARGS += ARCH=ia64
  65     MAKE_ARGS += BUILDARCH=ia64
  66     MAKE_ARGS += Platform_arch=ia64
  67     MAKE_ARGS += Platform_arch_model=ia64
  68   endif
  69 
  70 # http://support.microsoft.com/kb/888731 : this can be either
  71 # AMD64 for AMD, or EM64T for Intel chips.
  72   ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) AMD64),)
  73     ARCH_DATA_MODEL=64
  74     PLATFORM=windows-amd64
  75     VM_PLATFORM=windows_amd64
  76     HS_ARCH=x86
  77     MAKE_ARGS += LP64=1
  78     MAKE_ARGS += ARCH=x86
  79     MAKE_ARGS += BUILDARCH=amd64
  80     MAKE_ARGS += Platform_arch=x86
  81     MAKE_ARGS += Platform_arch_model=x86_64
  82   endif
  83 
  84 ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) EM64T),)
  85     ARCH_DATA_MODEL=64
  86     PLATFORM=windows-amd64
  87     VM_PLATFORM=windows_amd64
  88     HS_ARCH=x86
  89     MAKE_ARGS += LP64=1
  90     MAKE_ARGS += ARCH=x86
  91     MAKE_ARGS += BUILDARCH=amd64
  92     MAKE_ARGS += Platform_arch=x86
  93     MAKE_ARGS += Platform_arch_model=x86_64
  94   endif
  95 
  96 # NB later OS versions than 2003 may report "Intel64"
  97   ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) Intel64),)
  98     ARCH_DATA_MODEL=64
  99     PLATFORM=windows-amd64
 100     VM_PLATFORM=windows_amd64
 101     HS_ARCH=x86
 102     MAKE_ARGS += LP64=1
 103     MAKE_ARGS += ARCH=x86
 104     MAKE_ARGS += BUILDARCH=amd64
 105     MAKE_ARGS += Platform_arch=x86
 106     MAKE_ARGS += Platform_arch_model=x86_64
 107   endif
 108 endif
 109 
 110 JDK_INCLUDE_SUBDIR=win32
 111 
 112 # Library suffix
 113 LIBRARY_SUFFIX=dll
 114 
 115 # HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined
 116 # and added to MAKE_ARGS list in $(GAMMADIR)/make/defs.make.
 117 
 118 # next parameters are defined in $(GAMMADIR)/make/defs.make.
 119 MAKE_ARGS += JDK_MKTG_VERSION=$(JDK_MKTG_VERSION)
 120 MAKE_ARGS += JDK_MAJOR_VER=$(JDK_MAJOR_VERSION)
 121 MAKE_ARGS += JDK_MINOR_VER=$(JDK_MINOR_VERSION)
 122 MAKE_ARGS += JDK_MICRO_VER=$(JDK_MICRO_VERSION)
 123 
 124 ifdef COOKED_JDK_UPDATE_VERSION
 125   MAKE_ARGS += JDK_UPDATE_VER=$(COOKED_JDK_UPDATE_VERSION)
 126 endif
 127 
 128 # COOKED_BUILD_NUMBER should only be set if we have a numeric
 129 # build number.  It must not be zero padded.
 130 ifdef COOKED_BUILD_NUMBER
 131   MAKE_ARGS += JDK_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)
 132 endif
 133 
 134 NMAKE= MAKEFLAGS= MFLAGS= nmake -NOLOGO
 135 
 136 # Check for CYGWIN
 137 ifneq (,$(findstring CYGWIN,$(shell uname)))
 138   USING_CYGWIN=true
 139 else
 140   USING_CYGWIN=false
 141 endif
 142 # Check for MinGW
 143 ifneq (,$(findstring MINGW,$(SYSTEM_UNAME)))
 144   USING_MINGW=true
 145 endif
 146 # FIXUP: The subdirectory for a debug build is NOT the same on all platforms
 147 VM_DEBUG=debug
 148 
 149 # Windows wants particular paths due to nmake (must be after macros defined)
 150 #   It is important that gnumake invokes nmake with C:\\...\\  formated
 151 #   strings so that nmake gets C:\...\ style strings.
 152 # Check for CYGWIN
 153 ifeq ($(USING_CYGWIN), true)
 154   ABS_OUTPUTDIR   := $(subst /,\\,$(shell /bin/cygpath -m -a "$(OUTPUTDIR)"))
 155   ABS_BOOTDIR     := $(subst /,\\,$(shell /bin/cygpath -m -a "$(BOOTDIR)"))
 156   ABS_GAMMADIR    := $(subst /,\\,$(shell /bin/cygpath -m -a "$(GAMMADIR)"))
 157   ABS_OS_MAKEFILE := $(shell /bin/cygpath -m -a "$(HS_MAKE_DIR)/$(OSNAME)")/build.make
 158 else
 159   ifeq ($(USING_MINGW), true)
 160     ABS_OUTPUTDIR   := $(shell $(CD) $(OUTPUTDIR);$(PWD))
 161     ABS_BOOTDIR     := $(shell $(CD) $(BOOTDIR);$(PWD))
 162     ABS_GAMMADIR    := $(shell $(CD) $(GAMMADIR);$(PWD))
 163     ABS_OS_MAKEFILE := $(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make
 164   else
 165     ABS_OUTPUTDIR   := $(subst /,\\,$(shell $(CD) $(OUTPUTDIR);$(PWD)))
 166     ABS_BOOTDIR     := $(subst /,\\,$(shell $(CD) $(BOOTDIR);$(PWD)))
 167     ABS_GAMMADIR    := $(subst /,\\,$(shell $(CD) $(GAMMADIR);$(PWD)))
 168     ABS_OS_MAKEFILE := $(subst /,\\,$(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make)
 169   endif
 170 endif
 171 
 172 # Disable building SA on windows until we are sure
 173 # we want to release it.  If we build it here,
 174 # the SDK makefiles will copy it over and put it into
 175 # the created image.
 176 BUILD_WIN_SA = 1
 177 ifneq ($(ALT_BUILD_WIN_SA),)
 178   BUILD_WIN_SA = $(ALT_BUILD_WIN_SA)
 179 endif
 180 
 181 ifeq ($(BUILD_WIN_SA), 1)
 182   ifeq ($(ARCH),ia64)
 183     BUILD_WIN_SA = 0
 184   endif
 185 endif
 186 
 187 EXPORT_SERVER_DIR = $(EXPORT_JRE_BIN_DIR)/server
 188 EXPORT_CLIENT_DIR = $(EXPORT_JRE_BIN_DIR)/client
 189 EXPORT_KERNEL_DIR = $(EXPORT_JRE_BIN_DIR)/kernel
 190 
 191 EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
 192 EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.$(LIBRARY_SUFFIX)
 193 EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.pdb
 194 EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.map
 195 EXPORT_LIST += $(EXPORT_LIB_DIR)/jvm.lib
 196 ifeq ($(ARCH_DATA_MODEL), 32)
 197   EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
 198   EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.$(LIBRARY_SUFFIX)
 199   EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.pdb
 200   EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.map
 201   # kernel vm
 202   EXPORT_LIST += $(EXPORT_KERNEL_DIR)/Xusage.txt
 203   EXPORT_LIST += $(EXPORT_KERNEL_DIR)/jvm.$(LIBRARY_SUFFIX)
 204   EXPORT_LIST += $(EXPORT_KERNEL_DIR)/jvm.pdb
 205   EXPORT_LIST += $(EXPORT_KERNEL_DIR)/jvm.map
 206 endif
 207 
 208 ifeq ($(BUILD_WIN_SA), 1)
 209   EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.$(LIBRARY_SUFFIX)
 210   EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.pdb
 211   EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.map
 212   EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar
 213   # Must pass this down to nmake.
 214   MAKE_ARGS += BUILD_WIN_SA=1
 215 endif