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