jdk/make/common/shared/Defs-windows.gmk
author ohair
Wed, 06 Apr 2011 22:06:11 -0700
changeset 9035 1255eb81cc2f
parent 8827 f0f30d988312
child 14091 e5c8662f325d
permissions -rw-r--r--
7033660: Update copyright year to 2011 on any files changed in 2011 Reviewed-by: dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
9035
1255eb81cc2f 7033660: Update copyright year to 2011 on any files changed in 2011
ohair
parents: 8827
diff changeset
     2
# Copyright (c) 2005, 2011, Oracle and/or its affiliates. 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
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5474
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5474
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
2
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
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5474
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5474
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5474
diff changeset
    23
# questions.
2
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
# Definitions for Windows.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
# Default for COMPILER_WARNINGS_FATAL on Windows (C++ compiler warnings)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
#    Level: Default is 3, 0 means none, 4 is the most but may be unreliable
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#    Some makefiles may have set this to 0 to turn off warnings completely,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
#    which also effectively creates a COMPILER_WARNINGS_FATAL=false situation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
#    Program.gmk may turn this down to 2 (building .exe's).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
#    Windows 64bit platforms are less likely to be warning free.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
#    Historically, Windows 32bit builds should be mostly warning free.
7669
3ebe17bda998 6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents: 7665
diff changeset
    37
#    VS2010 introduced a large number of security warnings that are off by
3ebe17bda998 6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents: 7665
diff changeset
    38
#    default but will be turned back on with SHOW_ALL_WARNINGS=true.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
ifndef COMPILER_WARNING_LEVEL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
  COMPILER_WARNING_LEVEL=3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
ifndef COMPILER_WARNINGS_FATAL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
  COMPILER_WARNINGS_FATAL=false
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
endif
7669
3ebe17bda998 6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents: 7665
diff changeset
    45
ifndef SHOW_ALL_WARNINGS
3ebe17bda998 6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents: 7665
diff changeset
    46
  SHOW_ALL_WARNINGS = false
3ebe17bda998 6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents: 7665
diff changeset
    47
endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
# Windows should use parallel compilation for best build times
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
ifndef COMPILE_APPROACH
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
  COMPILE_APPROACH = normal
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
# Indication that we are doing an incremental build.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
#    This may trigger the creation of make depend files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
#    (This may not be working on windows yet, always force to false.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
override INCREMENTAL_BUILD = false
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
# WARNING: This is extremely touch stuff, between CYGWIN vs. MKS and all
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
#          variations of MKS and CYGWIN releases, and 32bit vs 64bit,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
#          this file can give you nightmares.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
# Notes:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
#   Keep all paths in the windows "mixed" style except CYGWIN UNXIXCOMMAND_PATH.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
#   Use of PrefixPath is critical, some variables must end with / (see NOTE).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
#   Use of quotes is critical due to possible spaces in paths coming from
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
#     the environment variables, be careful.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
#   First convert \ to / with subst, keep it quoted due to blanks, then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
#     use cygpath -s or dosname -s to get the short non-blank name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
#   If the MKS is old and doesn't have a dosname -s, you will be forced
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
#     to set ALT variables with the short non-space directory names.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
#     If dosname doesn't appear to work, we won't use it.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
#     The dosname utility also wants to accept stdin if it is not supplied
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
#     any path on the command line, this is really dangerous when using
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
#     make variables that can easily become empty, so I use:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
#        echo $1 | dosname -s     instead of    dosname -s $1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
#     to prevent dosname from hanging up the make process when $1 is empty.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
#     The cygpath utility does not have this problem.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
#   The ALT values should never really have spaces or use \.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
#   Suspect these environment variables to have spaces and/or \ characters:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
#     SYSTEMROOT, SystemRoot, WINDIR, windir, PROGRAMFILES, ProgramFiles,
1776
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 1247
diff changeset
    82
#     DXSDK_DIR, MSTOOLS, Mstools, MSSDK, MSSdk, VCnnCOMNTOOLS, 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
#     MSVCDIR, MSVCDir.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
#     So use $(subst \,/,) on them first adding quotes and placing them in
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
#         their own variable assigned with :=, then use FullPath.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
    88
ifdef USING_CYGWIN
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
    89
# Macro to effectively do a toupper without an exec
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
    90
define ToUpper
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
    91
$(subst a,A,$(subst b,B,$(subst c,C,$(subst d,D,$(subst e,E,$(subst f,F,\
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
    92
$(subst g,G,$(subst h,H,$(subst i,I,$(subst j,J,$(subst k,K,$(subst l,L,\
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
    93
$(subst m,M,$(subst n,N,$(subst o,O,$(subst p,P,$(subst q,Q,$(subst r,R,\
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
    94
$(subst s,S,$(subst t,T,$(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,\
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
    95
$(subst y,Y,$(subst z,Z,$1))))))))))))))))))))))))))
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
    96
endef
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
    97
# All possible drive letters
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
    98
drives=a b c d e f g h i j k l m n o p q r s t v u w x y z
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
    99
# Convert /cygdrive/ paths to the mixed style without an exec of cygpath
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   100
#   Must be a path with no spaces. /cygdrive/letter is always lowercase
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   101
#   and letter:/ is always uppercase coming from cygpath.
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   102
define MixedPath
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   103
$(patsubst /%,$(CYGWIN_HOME)/%,$(sort $(filter-out /cygdrive/%,$(foreach drive,$(drives),$(patsubst /cygdrive/$(drive)/%,$(call ToUpper,$(drive)):/%,$1)))))
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   104
endef
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
# Use FullPath to get C:/ style non-spaces path. Never ends with a /!
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
# We assume cygpath is available in the search path
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
#    NOTE: Use of 'pwd' with CYGWIN will not get you a mixed style path!
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
define FullPath
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   109
$(if $(word 2,$1),$(shell $(CYGPATH_CMD) $1 2> $(DEV_NULL)),$(call MixedPath,$(realpath $(subst ",,$1))))
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
define OptFullPath
6309
d3955f70aad3 6974005: Use of cygpath in Makefile logic needs to silence error messages
ohair
parents: 5937
diff changeset
   112
$(shell if [ "$1" != "" -a -d "$1" ]; then $(CYGPATH_CMD) "$1" 2> $(DEV_NULL); else echo "$1"; fi)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
# Temporary until we upgrade to MKS 8.7, MKS pwd returns mixed mode path
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
define FullPath
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
$(shell cd $1 2> $(DEV_NULL) && pwd)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
define OptFullPath
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
# System drive
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
ifdef SYSTEMDRIVE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
  _system_drive =$(SYSTEMDRIVE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
  ifdef SystemDrive
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
    _system_drive =$(SystemDrive)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
_system_drive:=$(call CheckValue,_system_drive,C:)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   136
#        With cygwin, just use this as is don't use FullPath on it.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
ifdef ALT_UNIXCOMMAND_PATH
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   138
  ifdef USING_CYGWIN
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   139
    UNIXCOMMAND_PATH       :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   140
  else
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   141
    xALT_UNIXCOMMAND_PATH  :="$(subst \,/,$(ALT_UNIXCOMMAND_PATH))"
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   142
    fxALT_UNIXCOMMAND_PATH :=$(call FullPath,$(xALT_UNIXCOMMAND_PATH))
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   143
    UNIXCOMMAND_PATH       :=$(call PrefixPath,$(fxALT_UNIXCOMMAND_PATH))
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   144
  endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
  ifdef USING_CYGWIN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
    UNIXCOMMAND_PATH :=$(call PrefixPath,/usr/bin)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
    ifdef ROOTDIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
      xROOTDIR :="$(subst \,/,$(ROOTDIR))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
      _rootdir :=$(call FullPath,$(xROOTDIR))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
      xROOTDIR :="$(_system_drive)/mksnt"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
      _rootdir :=$(call FullPath,$(xROOTDIR))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
    ifneq ($(_rootdir),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
      UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
# Get version of MKS or CYGWIN
2158
68869a085470 6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents: 1776
diff changeset
   164
ifndef USING_CYGWIN
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
_MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@')
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
MKS_VER  :=$(call GetVersion,$(_MKS_VER))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
# At this point, we can re-define FullPath to use DOSNAME_CMD
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
CHECK_MKS87:=$(call CheckVersions,$(MKS_VER),8.7)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
TRY_DOSNAME:=false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
ifeq ($(CHECK_MKS87),same)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
TRY_DOSNAME:=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
# Newer should be ok
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
ifeq ($(CHECK_MKS87),newer)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
TRY_DOSNAME:=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
ifeq ($(TRY_DOSNAME),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
ifeq ($(shell $(UNIXCOMMAND_PATH)dosname -s $(_system_drive)/ 2> $(DEV_NULL)),$(_system_drive)/)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
_DOSNAME=$(UNIXCOMMAND_PATH)dosname
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
DOSNAME_CMD:=$(_DOSNAME) -s
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
define FullPath
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
$(subst //,/,$(shell echo $1 | $(DOSNAME_CMD) 2> $(DEV_NULL)))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
endif # test dosname -s
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
endif # TRY_DOSNAME
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
endif # MKS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
# We try to get references to what we need via the default component
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
#    environment variables, or what was used historically.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
# Process Windows values into FullPath values, these paths may have \ chars
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
# System root
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
ifdef SYSTEMROOT
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
  xSYSTEMROOT  :="$(subst \,/,$(SYSTEMROOT))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
  _system_root :=$(call FullPath,$(xSYSTEMROOT))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
  ifdef SystemRoot
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
     xSYSTEMROOT :="$(subst \,/,$(SystemRoot))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
    _system_root :=$(call FullPath,$(xSYSTEMROOT))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
    ifdef WINDIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
      xWINDIR      :="$(subst \,/,$(WINDIR))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
      _system_root :=$(call FullPath,$(xWINDIR))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
    else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
      ifdef windir
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
        xWINDIR      :="$(subst \,/,$(windir))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
        _system_root :=$(call FullPath,$(xWINDIR))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
      endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
_system_root:=$(call CheckValue,_system_root,$(_system_drive)/WINNT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
# Program Files directory
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
ifdef PROGRAMFILES
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
  xPROGRAMFILES      :="$(subst \,/,$(PROGRAMFILES))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
  ifeq ($(ARCH_DATA_MODEL), 32)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
    xPROGRAMFILES    :="$(_system_drive)/Program Files"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
    xPROGRAMFILES    :="$(_system_drive)/Program Files (x86)"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
ifeq ($(ARCH_DATA_MODEL), 32)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
  _program_files     :=$(call FullPath,$(xPROGRAMFILES))
2186
53da56fa3bf9 6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents: 2158
diff changeset
   227
  _program_files32   :=$(_program_files)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
  ifdef PROGRAMW6432
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
    xPROGRAMW6432    :="$(subst \,/,$(PROGRAMW6432))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
    xPROGRAMW6432    :="$(_system_drive)/Program Files"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
  _program_files     :=$(call FullPath,$(xPROGRAMW6432))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
  _program_files32   :=$(call FullPath,$(xPROGRAMFILES))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
  ifneq ($(word 1,$(_program_files32)),$(_program_files32))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
    _program_files32:=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
ifneq ($(word 1,$(_program_files)),$(_program_files))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
  _program_files:=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
# DirectX SDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
ifdef ALT_DXSDK_DRIVE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
  _dx_sdk_dir  =$(ALT_DXSDK_DRIVE):/DXSDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
  ifdef DXSDK_DIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
    xDXSDK_DIR  :="$(subst \,/,$(DXSDK_DIR))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
    xDXSDK_DIR  :="$(_system_drive)/DXSDK"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
  _dx_sdk_dir :=$(call FullPath,$(xDXSDK_DIR))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   256
# Use of the Visual Studio compilers requires certain env variables be set:
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   257
#   PATH should include the path to cl.exe
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   258
#   INCLUDE should be defined
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   259
#   LIB     should be defined
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   260
#   LIBPATH should be defined
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   261
#   VS100COMNTOOLS should be defined
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   262
#   WINDOWSSDKDIR should be defined
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   263
#     The 7.0a path is from VS2010 Pro, the 7.1 path is the standalone SDK.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   264
#     For 64bit either will work for us.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   265
#     If a developer chooses to install the standalone SDK in some other
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   266
#     location, then they need to set WINDOWSSDKDIR.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   267
#
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   268
# Compilers for 64bit may be from the free SDK, or Visual Studio Professional.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   269
#   The free Express compilers don't contain 64 bit compilers, which is why
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   270
#   you instead need the SDK.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   271
#   Release enginering will use VS2010 Pro, so the frequency of testing of
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   272
#     SDK based builds will depend entirely on individual usage.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   273
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   274
# We only need to do this once
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   275
ifndef VS2010_EXISTS
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   276
  # The 2 key paths we need are WINDOWSSDKDIR and VS100COMNTOOLS.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   277
  #   If not defined try to see if default location exists.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   278
  #   If defined make sure that the path has no spaces.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   279
  #   Finally, export path with no spaces so logic minimizes FullPath calls.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   280
  ifndef WINDOWSSDKDIR
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   281
    # The 7.0a SDK is the second choice.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   282
    xWINDOWSSDKDIR :="$(_program_files32)/Microsoft SDKs/Windows/v7.0a/"
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   283
    fWINDOWSSDKDIR :=$(call FullPath,$(xWINDOWSSDKDIR))
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   284
    # The 7.1 SDK is the second choice.
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   285
    ifeq ($(fWINDOWSSDKDIR),)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   286
      xWINDOWSSDKDIR :="$(_program_files32)/Microsoft SDKs/Windows/v7.1/"
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   287
      fWINDOWSSDKDIR :=$(call FullPath,$(xWINDOWSSDKDIR))
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   288
    endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
  else
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   290
    ifneq ($(word 2,$(WINDOWSSDKDIR)),)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   291
      xWINDOWSSDKDIR :="$(subst \,/,$(WINDOWSSDKDIR))"
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   292
      fWINDOWSSDKDIR :=$(call FullPath,$(xWINDOWSSDKDIR))
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   293
    else
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   294
      fWINDOWSSDKDIR :=$(WINDOWSSDKDIR)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   295
    endif
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   296
  endif
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   297
  ifneq ($(fWINDOWSSDKDIR),)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   298
    WINDOWSSDKDIR  :=$(fWINDOWSSDKDIR)/
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   299
  endif
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   300
  ifndef VS100COMNTOOLS
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   301
    xVS100COMNTOOLS :="$(_program_files32)/Microsoft Visual Studio 10.0/Common7/Tools/"
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   302
    fVS100COMNTOOLS :=$(call FullPath,$(xVS100COMNTOOLS))
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   303
  else
8011
90caa43175fd 7011382: Fix use of VS100COMNTOOLS when installed in non-default or non-space path
ohair
parents: 8008
diff changeset
   304
    xVS100COMNTOOLS :="$(subst \,/,$(VS100COMNTOOLS))"
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   305
    ifneq ($(word 2,$(VS100COMNTOOLS)),)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   306
      fVS100COMNTOOLS :=$(call FullPath,$(xVS100COMNTOOLS))
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   307
    else
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   308
      fVS100COMNTOOLS :=$(xVS100COMNTOOLS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
  endif
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   311
  ifneq ($(fVS100COMNTOOLS),)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   312
    VS100COMNTOOLS :=$(fVS100COMNTOOLS)/
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   313
  endif
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   314
  # Check to see that both exist
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   315
  ifeq ($(WINDOWSSDKDIR),)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   316
    _vs2010_message := No WINDOWSSDKDIR found on system. $(_vs2010_message)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   317
    VS2010_EXISTS   := false
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   318
  endif
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   319
  ifeq ($(VS100COMNTOOLS),)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   320
    _vs2010_message := No VS100COMNTOOLS found on system. $(_vs2010_message)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   321
    VS2010_EXISTS   := false
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   322
  endif
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   323
  ifeq ($(VS2010_EXISTS),false)
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   324
    x:=$(warning WARNING: No VS2010 available. $(_vs2010_message))
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   325
    VS100COMNTOOLS :=
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   326
    WINDOWSSDKDIR  :=
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   327
  else
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   328
    VS2010_EXISTS := true
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   329
    _msvc_dir     :=$(VS100COMNTOOLS)/../../Vc
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   330
  endif
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   331
  export VS2010_EXISTS
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   332
  export VS100COMNTOOLS
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   333
  export WINDOWSSDKDIR
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   334
endif
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   335
8827
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   336
ifneq ($(VS2010_EXISTS),true)
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   337
  x:=$(error ERROR: No VS2010 found on system.)
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   338
endif 
7665
bc5dbdc44e1e 6360517: ALT_MSDEVTOOLS_PATH and rc.exe location, and rebase location
ohair
parents: 6309
diff changeset
   339
8827
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   340
# VS2010 Compiler root directory
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   341
_msvc_dir :=$(VS100COMNTOOLS)/../../Vc
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   342
# SDK root directory
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   343
_ms_sdk   :=$(WINDOWSSDKDIR)
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   344
# Compiler bin directory and redist directory
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   345
ifeq ($(ARCH_DATA_MODEL), 32)
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   346
  _compiler_bin :=$(_msvc_dir)/Bin
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   347
  _redist_sdk   :=$(call FullPath,$(_msvc_dir)/redist/x86/Microsoft.VC100.CRT)
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   348
endif
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   349
ifeq ($(ARCH_DATA_MODEL), 64)
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   350
  _compiler_bin :=$(_msvc_dir)/bin/amd64
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   351
  _redist_sdk   :=$(call FullPath,$(_msvc_dir)/redist/x64/Microsoft.VC100.CRT)
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   352
endif
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   353
ifeq ($(_redist_sdk),)
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   354
  _redist_sdk   :=$(_system_root)/system32
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   355
endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
# Location on system where jdk installs might be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
ifneq ($(_program_files),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
  USRJDKINSTANCES_PATH =$(_program_files)/Java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
  USRJDKINSTANCES_PATH =$(_system_drive)/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
# SLASH_JAVA: location of all network accessable files
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   365
# NOTE: Do not use FullPath on this because it's often a drive letter and
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   366
#       plain drive letters are ambiguous, so just use this 'as is'.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
ifdef ALT_SLASH_JAVA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
  xALT_SLASH_JAVA :="$(subst \,/,$(ALT_SLASH_JAVA))"
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   369
  SLASH_JAVA      :=$(xALT_SLASH_JAVA)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
  ifdef ALT_JDK_JAVA_DRIVE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
    SLASH_JAVA  =$(JDK_JAVA_DRIVE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
    SLASH_JAVA  =J:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
SLASH_JAVA:=$(call AltCheckSpaces,SLASH_JAVA)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
SLASH_JAVA:=$(call AltCheckValue,SLASH_JAVA)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
# JDK_DEVTOOLS_DIR: common path for all the java devtools
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
ifdef ALT_JDK_DEVTOOLS_DIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
  xALT_JDK_DEVTOOLS_DIR :="$(subst \,/,$(ALT_JDK_DEVTOOLS_DIR))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
  JDK_DEVTOOLS_DIR      :=$(call FullPath,$(xALT_JDK_DEVTOOLS_DIR))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
  JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
JDK_DEVTOOLS_DIR:=$(call AltCheckSpaces,JDK_DEVTOOLS_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
JDK_DEVTOOLS_DIR:=$(call AltCheckValue,JDK_DEVTOOLS_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
# COMPILER_PATH: path to where the compiler and tools are installed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
ifdef ALT_COMPILER_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
  xALT_COMPILER_PATH  :="$(subst \,/,$(ALT_COMPILER_PATH))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
  fxALT_COMPILER_PATH :=$(call FullPath,$(xALT_COMPILER_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
  COMPILER_PATH       :=$(call PrefixPath,$(fxALT_COMPILER_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
  COMPILER_PATH :=$(call PrefixPath,$(_compiler_bin))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
COMPILER_PATH :=$(call AltCheckSpaces,COMPILER_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
# MSDEVTOOLS_PATH: path to where the additional MS Compiler tools are.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
ifdef ALT_MSDEVTOOLS_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
  xALT_MSDEVTOOLS_PATH  :="$(subst \,/,$(ALT_MSDEVTOOLS_PATH))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
  fxALT_MSDEVTOOLS_PATH :=$(call FullPath,$(xALT_MSDEVTOOLS_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
  MSDEVTOOLS_PATH       :=$(call PrefixPath,$(fxALT_MSDEVTOOLS_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
  ifeq ($(ARCH_DATA_MODEL), 64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
    ifdef MSTOOLS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
      xMSTOOLS  :="$(subst \,/,$(MSTOOLS))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
      _ms_tools :=$(call FullPath,$(xMSTOOLS))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
    else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
      ifdef Mstools
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
        xMSTOOLS  :="$(subst \,/,$(Mstools))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
        _ms_tools :=$(call FullPath,$(xMSTOOLS))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
      else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
        _ms_tools :=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
      endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
    ifneq ($(_ms_tools),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
      _ms_tools_bin :=$(_ms_tools)/Bin
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
    else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
      # Assumes compiler bin is .../Bin/win64/x86/AMD64, rc.exe is 3 levels up
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
      _ms_tools_bin :=$(_compiler_bin)/../../..
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
    _ms_tools_bin :=$(_compiler_bin)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
  MSDEVTOOLS_PATH :=$(call PrefixPath,$(_ms_tools_bin))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
MSDEVTOOLS_PATH:=$(call AltCheckSpaces,MSDEVTOOLS_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
ifdef ALT_DEVTOOLS_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
  xALT_DEVTOOLS_PATH  :="$(subst \,/,$(ALT_DEVTOOLS_PATH))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
  fxALT_DEVTOOLS_PATH :=$(call FullPath,$(xALT_DEVTOOLS_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
  DEVTOOLS_PATH       :=$(call PrefixPath,$(fxALT_DEVTOOLS_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
  ifdef USING_CYGWIN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
    DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
    xDEVTOOLS_PATH  :="$(_system_drive)/utils"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
    fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
    DEVTOOLS_PATH  :=$(call PrefixPath,$(fxDEVTOOLS_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
# _BOOTDIR2: Second choice
2806
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2624
diff changeset
   452
# The _BOOTDIR3 is defind optionally.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
ifndef ALT_BOOTDIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
  _BOOTDIR1  =$(_system_drive)/jdk$(PREVIOUS_JDK_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
  _BOOTDIR2  =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
2806
27edf81ff967 6833444: _BOOTDIR1/_BOOTDIR2 on MS Windows should be consistent with other platforms
anthony
parents: 2624
diff changeset
   456
  _BOOTDIR3  =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
8827
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   459
# Everybody needs the MSVCRNN runtime starting with VS2010
f0f30d988312 7011718: VS2010, remove makefile logic with regards to use of VC6, VS2003, VS2005, VS2008
ohair
parents: 8269
diff changeset
   460
_NEEDS_MSVCRNN = true
2186
53da56fa3bf9 6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents: 2158
diff changeset
   461
53da56fa3bf9 6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents: 2158
diff changeset
   462
ifeq ($(_NEEDS_MSVCRNN), true)
1776
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 1247
diff changeset
   463
  # MSVCRNN_DLL_PATH: location of msvcrnn.dll that will be re-distributed
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 1247
diff changeset
   464
  ifdef ALT_MSVCRNN_DLL_PATH
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 1247
diff changeset
   465
    xALT_MSVCRNN_DLL_PATH :="$(subst \,/,$(ALT_MSVCRNN_DLL_PATH))"
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 1247
diff changeset
   466
    MSVCRNN_DLL_PATH      :=$(call FullPath,$(xALT_MSVCRNN_DLL_PATH))
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
  else
2186
53da56fa3bf9 6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents: 2158
diff changeset
   468
    MSVCRNN_DLL_PATH :=$(_redist_sdk)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
  endif
1776
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 1247
diff changeset
   470
  MSVCRNN_DLL_PATH :=$(call AltCheckSpaces,MSVCRNN_DLL_PATH)
33e9405ab91b 6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents: 1247
diff changeset
   471
  MSVCRNN_DLL_PATH:=$(call AltCheckValue,MSVCRNN_DLL_PATH)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
# DXSDK_PATH: path to Microsoft DirectX SDK Include and Lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
ifdef ALT_DXSDK_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
  xALT_DXSDK_PATH :="$(subst \,/,$(ALT_DXSDK_PATH))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
  DXSDK_PATH      :=$(call FullPath,$(xALT_DXSDK_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
  _DXSDK_PATH1 :=$(_dx_sdk_dir)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
  _DXSDK_PATH2 :=$(JDK_DEVTOOLS_DIR)/windows/dxsdk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
  DXSDK_PATH  :=$(call DirExists,$(_DXSDK_PATH1),$(_DXSDK_PATH2),$(_dx_sdk_dir))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
DXSDK_PATH :=$(call AltCheckSpaces,DXSDK_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
DXSDK_PATH:=$(call AltCheckValue,DXSDK_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
# DXSDK_INCLUDE_PATH: path to Microsoft DirectX SDK Include
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
ifdef ALT_DXSDK_INCLUDE_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
  xALT_DXSDK_INCLUDE_PATH :="$(subst \,/,$(ALT_DXSDK_INCLUDE_PATH))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
  DXSDK_INCLUDE_PATH      :=$(call FullPath,$(xALT_DXSDK_INCLUDE_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
  DXSDK_INCLUDE_PATH =$(subst //,/,$(DXSDK_PATH)/Include)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
# DXSDK_LIB_PATH: path to Microsoft DirectX SDK Lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
ifdef ALT_DXSDK_LIB_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
  xALT_DXSDK_LIB_PATH :="$(subst \,/,$(ALT_DXSDK_LIB_PATH))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
  DXSDK_LIB_PATH      :=$(call FullPath,$(xALT_DXSDK_LIB_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
  ifeq ($(ARCH_DATA_MODEL), 64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
    # 64bit libs are located in "Lib/x64" subdir
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
    DXSDK_LIB_PATH =$(subst //,/,$(DXSDK_PATH)/Lib/x64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
    DXSDK_LIB_PATH =$(subst //,/,$(DXSDK_PATH)/Lib)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
# DEPLOY_MSSDK: Microsoft SDK for this platform (for deploy)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
ifdef ALT_DEPLOY_MSSDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
  xALT_DEPLOY_MSSDK :="$(subst \,/,$(ALT_DEPLOY_MSSDK))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
  DEPLOY_MSSDK      :=$(call FullPath,$(xALT_DEPLOY_MSSDK))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
  DEPLOY_MSSDK      :=$(_ms_sdk)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
DEPLOY_MSSDK:=$(call AltCheckSpaces,DEPLOY_MSSDK)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
# INSTALL_MSSDK: Microsoft Installer SDK for this platform (for install)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
ifdef ALT_INSTALL_MSSDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
  xALT_INSTALL_MSSDK :="$(subst \,/,$(ALT_INSTALL_MSSDK))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
  INSTALL_MSSDK      :=$(call FullPath,$(xALT_INSTALL_MSSDK))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
else
3111
fefdeafb7ab9 6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents: 2624
diff changeset
   521
  INSTALL_MSSDK      :=$(_ms_sdk)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
INSTALL_MSSDK:=$(call AltCheckSpaces,INSTALL_MSSDK)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
# WSCRIPT: path to wscript.exe (used in creating install bundles)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
ifdef ALT_WSCRIPT
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
  xALT_WSCRIPT :="$(subst \,/,$(ALT_WSCRIPT))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
  WSCRIPT  =$(xALT_WSCRIPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
  _WSCRIPT1 :=$(_system_root)/system32/wscript.exe
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
  _WSCRIPT2 :=$(DEVTOOLS_PATH)wscript.exe
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
  WSCRIPT  :=$(call FileExists,$(_WSCRIPT1),$(_WSCRIPT2))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
WSCRIPT:=$(call AltCheckSpaces,WSCRIPT)
1025
a9ba5ea0f1f7 6614210: JPRT Windows 32bit msival2 build failure when building 'install' workspace
ksrini
parents: 2
diff changeset
   535
# batch mode no modal dialogs on errors, please.
2602
5b394a4b6ce1 6755943: Java JAR Pack200 Decompression should enforce stricter header checks
ksrini
parents: 2
diff changeset
   536
WSCRIPT += -B
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
# CSCRIPT: path to cscript.exe (used in creating install bundles)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
ifdef ALT_CSCRIPT
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
  xALT_CSCRIPT :="$(subst \,/,$(ALT_CSCRIPT))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
  CSCRIPT  =$(xALT_CSCRIPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
  _CSCRIPT1 :=$(_system_root)/system32/cscript.exe
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
  _CSCRIPT2 :=$(DEVTOOLS_PATH)cscript.exe
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
  CSCRIPT  :=$(call FileExists,$(_CSCRIPT1),$(_CSCRIPT2))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
CSCRIPT:=$(call AltCheckSpaces,CSCRIPT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
5381
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   549
# CABARC: path to cabarc.exe (used in creating install bundles)
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   550
ifdef ALT_CABARC
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   551
  xALT_CABARC :="$(subst \,/,$(ALT_CABARC))"
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   552
  CABARC  =$(xALT_CABARC)
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   553
else
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   554
  _CABARC1 :=$(_system_root)/system32/cabarc.exe
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   555
  _CABARC2 :=$(DEVTOOLS_PATH)cabarc.exe
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   556
  CABARC  :=$(call FileExists,$(_CABARC1),$(_CABARC2))
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   557
endif
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   558
CABARC:=$(call AltCheckSpaces,CABARC)
d6d64a42ff51 6931180: Migration to recent versions of MS Platform SDK
prr
parents: 3288
diff changeset
   559
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
# MSICERT: path to msicert.exe (used in creating install bundles)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
ifdef ALT_MSICERT
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
  xALT_MSICERT :="$(subst \,/,$(ALT_MSICERT))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
  MSICERT  =$(xALT_MSICERT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
  _MSICERT1 :=$(INSTALL_MSSDK)/Bin/msicert.exe
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
  _MSICERT2 :=$(DEVTOOLS_PATH)msicert.exe
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
  MSICERT   :=$(call FileExists,$(_MSICERT1),$(_MSICERT2))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
MSICERT:=$(call AltCheckSpaces,MSICERT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
# Import JDK images allow for partial builds, components not built are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
#    imported (or copied from) these import areas when needed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
#   multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
ifdef ALT_BUILD_JDK_IMPORT_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
  BUILD_JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
  BUILD_JDK_IMPORT_PATH   = $(PROMOTED_BUILD_BINARIES)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
BUILD_JDK_IMPORT_PATH:=$(call AltCheckSpaces,BUILD_JDK_IMPORT_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
# JDK_IMPORT_PATH: location of previously built JDK (this version) to import
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
ifdef ALT_JDK_IMPORT_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
  JDK_IMPORT_PATH  :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   588
  JDK_IMPORT_PATH   = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
JDK_IMPORT_PATH:=$(call AltCheckSpaces,JDK_IMPORT_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
# HOTSPOT_IMPORT_PATH: location of hotspot pre-built files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
ifdef ALT_HOTSPOT_IMPORT_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
  HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   596
else
3116
244619fd110e 6633813: Add standard hotspot import path for Kernel VM
herrick
parents: 3114
diff changeset
   597
  # Default locations include the current $OUTPUTDIR, RE Promotions,
244619fd110e 6633813: Add standard hotspot import path for Kernel VM
herrick
parents: 3114
diff changeset
   598
  # and a JDK.  Please be aware the JDK does not include a Kernel VM.
244619fd110e 6633813: Add standard hotspot import path for Kernel VM
herrick
parents: 3114
diff changeset
   599
  _HOTSPOT_IMPORT_PATH1 = $(OUTPUTDIR)/hotspot/import
244619fd110e 6633813: Add standard hotspot import path for Kernel VM
herrick
parents: 3114
diff changeset
   600
  _HOTSPOT_IMPORT_PATH2 = $(PROMOTED_BUILD_DISTDIR)/hotspot/import
244619fd110e 6633813: Add standard hotspot import path for Kernel VM
herrick
parents: 3114
diff changeset
   601
  _HOTSPOT_IMPORT_PATH3 = $(JDK_IMPORT_PATH)
244619fd110e 6633813: Add standard hotspot import path for Kernel VM
herrick
parents: 3114
diff changeset
   602
   HOTSPOT_IMPORT_PATH := $(call DirExists,$(_HOTSPOT_IMPORT_PATH1),$(_HOTSPOT_IMPORT_PATH2),$(_HOTSPOT_IMPORT_PATH3))
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   603
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
HOTSPOT_IMPORT_PATH:=$(call AltCheckSpaces,HOTSPOT_IMPORT_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
HOTSPOT_IMPORT_PATH:=$(call AltCheckValue,HOTSPOT_IMPORT_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
# HOTSPOT_CLIENT_PATH: location of client jvm library file.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   608
ifeq ($(ARCH_DATA_MODEL), 32)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
  ifdef ALT_HOTSPOT_CLIENT_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
    HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
    HOTSPOT_CLIENT_PATH   =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
  HOTSPOT_CLIENT_PATH:=$(call AltCheckSpaces,HOTSPOT_CLIENT_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
  HOTSPOT_CLIENT_PATH:=$(call AltCheckValue,HOTSPOT_CLIENT_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   616
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
# HOTSPOT_SERVER_PATH: location of server jvm library file.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
ifdef ALT_HOTSPOT_SERVER_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   620
  HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
  HOTSPOT_SERVER_PATH   =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
HOTSPOT_SERVER_PATH:=$(call AltCheckSpaces,HOTSPOT_SERVER_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
# HOTSPOT_LIB_PATH: location of jvm.lib file.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
ifdef ALT_HOTSPOT_LIB_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
  xALT_HOTSPOT_LIB_PATH :="$(subst \,/,$(ALT_HOTSPOT_LIB_PATH))"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
  HOTSPOT_LIB_PATH      :=$(call FullPath,$(xALT_HOTSPOT_LIB_PATH))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
  HOTSPOT_LIB_PATH  =$(HOTSPOT_IMPORT_PATH)/lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   634
HOTSPOT_LIB_PATH:=$(call AltCheckSpaces,HOTSPOT_LIB_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   635
HOTSPOT_LIB_PATH:=$(call AltCheckValue,HOTSPOT_LIB_PATH)
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   636
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   637
# Special define for checking the binaries
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   638
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   639
# All windows dll and exe files should have been built with /NXCOMPAT
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   640
#   and be setup for dynamic base addresses.
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   641
#   In addition, we should not be dependent on certain dll files that
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   642
#   we do not or cannot redistribute.
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   643
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   644
# List of filenames we should NOT be dependent on
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   645
ifeq ($(MFC_DEBUG),true)
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   646
  BANNED_DLLS=msvcp100[.]dll
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   647
else
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   648
  BANNED_DLLS=msvcp100[.]dll|msvcr100d[.]dll|msvcrtd[.]dll
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   649
endif
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   650
8269
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   651
# Check for /safeseh (only used on 32bit)
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   652
define binary_file_safeseh_verification # binary_file
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   653
( \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   654
  $(ECHO) "Checking for /SAFESEH usage in: $1" && \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   655
  if [ "`$(DUMPBIN) /loadconfig $1 | $(EGREP) -i 'Safe Exception Handler Table'`" = "" ] ; then \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   656
    $(ECHO) "ERROR: Did not find 'Safe Exception Handler Table' in loadconfig: $1" ; \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   657
    $(DUMPBIN) /loadconfig $1 ; \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   658
    exit 6 ; \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   659
  fi ; \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   660
)
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   661
endef
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   662
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   663
# Check for /NXCOMPAT usage
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   664
define binary_file_nxcompat_verification # binary_file
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   665
( \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   666
  $(ECHO) "Checking for /NXCOMPAT usage in: $1" && \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   667
  if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'NX compatible'`" = "" ] ; then \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   668
    $(ECHO) "ERROR: Did not find 'NX compatible' in headers: $1" ; \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   669
    $(DUMPBIN) /headers $1 ; \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   670
    exit 7 ; \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   671
  fi ; \
8269
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   672
)
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   673
endef
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   674
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   675
# Check for /DYNAMICBASE usage
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   676
define binary_file_dynamicbase_verification # binary_file
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   677
( \
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   678
  $(ECHO) "Checking for /DYNAMICBASE usage in: $1" && \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   679
  if [ "`$(DUMPBIN) /headers $1 | $(EGREP) -i 'Dynamic base'`" = "" ] ; then \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   680
    $(ECHO) "ERROR: Did not find 'Dynamic base' in headers: $1" ; \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   681
    $(DUMPBIN) /headers $1 ; \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   682
    exit 8 ; \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   683
  fi ; \
8269
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   684
)
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   685
endef
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   686
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   687
# Check for banned dll usage
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   688
define binary_file_dll_verification # binary_file
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   689
( \
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   690
  $(ECHO) "Checking for banned dependencies in: $1" && \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   691
  if [ "`$(DUMPBIN) /dependents $1 | $(EGREP) -i '$(BANNED_DLLS)'`" != "" ] ; then \
8201
9e6915af34ba 7012644: Regression: jdk/make/common/shared/Defs-windows.gmk has problems on cygwin
ohair
parents: 8018
diff changeset
   692
    $(ECHO) "ERROR: Found use of $(BANNED_DLLS)"; \
8008
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   693
    $(DUMPBIN) /dependents $1 ; \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   694
    exit 9 ; \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   695
  fi ; \
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   696
)
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   697
endef
753c38f4af83 6975326: Problem in install/make/rebase/Makefile, grep on empty pattern
ohair
parents: 7669
diff changeset
   698
8269
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   699
# Macro to check it's input file for properly built executables.
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   700
#   Relies on process exit code. Different for 32bit vs 64bit.
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   701
ifeq ($(ARCH_DATA_MODEL),32)
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   702
define binary_file_verification # binary_file
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   703
( \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   704
  $(call binary_file_safeseh_verification,$1); \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   705
  $(call binary_file_nxcompat_verification,$1); \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   706
  $(call binary_file_dynamicbase_verification,$1); \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   707
  $(call binary_file_dll_verification,$1); \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   708
)
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   709
endef
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   710
else
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   711
define binary_file_verification # binary_file
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   712
( \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   713
  $(call binary_file_nxcompat_verification,$1); \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   714
  $(call binary_file_dynamicbase_verification,$1); \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   715
  $(call binary_file_dll_verification,$1); \
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   716
)
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   717
endef
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   718
endif
f32efe2fd5f5 7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents: 8201
diff changeset
   719