blob: 4d203365bb79f85e158933a624f1c0e82db643f1 [file] [log] [blame]
duke6e45e102007-12-01 00:00:00 +00001#
xdono53d0f662008-10-02 19:58:32 -07002# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
duke6e45e102007-12-01 00:00:00 +00003# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# This code is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 2 only, as
7# published by the Free Software Foundation. Sun designates this
8# particular file as subject to the "Classpath" exception as provided
9# by Sun in the LICENSE file that accompanied this code.
10#
11# This code is distributed in the hope that it will be useful, but WITHOUT
12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14# version 2 for more details (a copy is included in the LICENSE file that
15# accompanied this code).
16#
17# You should have received a copy of the GNU General Public License version
18# 2 along with this work; if not, write to the Free Software Foundation,
19# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20#
21# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22# CA 95054 USA or visit www.sun.com if you need additional information or
23# have any questions.
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.
37ifndef COMPILER_WARNING_LEVEL
38 COMPILER_WARNING_LEVEL=3
39endif
40ifndef COMPILER_WARNINGS_FATAL
41 COMPILER_WARNINGS_FATAL=false
42endif
43
44# Windows should use parallel compilation for best build times
45ifndef COMPILE_APPROACH
46 COMPILE_APPROACH = normal
47endif
48
49# Indication that we are doing an incremental build.
50# This may trigger the creation of make depend files.
51# (This may not be working on windows yet, always force to false.)
52override INCREMENTAL_BUILD = false
53
54# WARNING: This is extremely touch stuff, between CYGWIN vs. MKS and all
55# variations of MKS and CYGWIN releases, and 32bit vs 64bit,
56# this file can give you nightmares.
57#
58# Notes:
59# Keep all paths in the windows "mixed" style except CYGWIN UNXIXCOMMAND_PATH.
60# Use of PrefixPath is critical, some variables must end with / (see NOTE).
61# Use of quotes is critical due to possible spaces in paths coming from
62# the environment variables, be careful.
63# First convert \ to / with subst, keep it quoted due to blanks, then
64# use cygpath -s or dosname -s to get the short non-blank name.
65# If the MKS is old and doesn't have a dosname -s, you will be forced
66# to set ALT variables with the short non-space directory names.
67# If dosname doesn't appear to work, we won't use it.
68# The dosname utility also wants to accept stdin if it is not supplied
69# any path on the command line, this is really dangerous when using
70# make variables that can easily become empty, so I use:
71# echo $1 | dosname -s instead of dosname -s $1
72# to prevent dosname from hanging up the make process when $1 is empty.
73# The cygpath utility does not have this problem.
74# The ALT values should never really have spaces or use \.
75# Suspect these environment variables to have spaces and/or \ characters:
76# SYSTEMROOT, SystemRoot, WINDIR, windir, PROGRAMFILES, ProgramFiles,
tbellfc2a6fe2009-01-14 21:35:03 -080077# DXSDK_DIR, MSTOOLS, Mstools, MSSDK, MSSdk, VCnnCOMNTOOLS,
duke6e45e102007-12-01 00:00:00 +000078# MSVCDIR, MSVCDir.
79# So use $(subst \,/,) on them first adding quotes and placing them in
80# their own variable assigned with :=, then use FullPath.
81#
82
83# Use FullPath to get C:/ style non-spaces path. Never ends with a /!
84ifdef USING_CYGWIN
85# We assume cygpath is available in the search path
86# NOTE: Use of 'pwd' with CYGWIN will not get you a mixed style path!
87CYGPATH_CMD=cygpath -a -s -m
88define FullPath
89$(shell $(CYGPATH_CMD) $1 2> $(DEV_NULL))
90endef
91define OptFullPath
92$(shell if [ "$1" != "" -a -d "$1" ]; then $(CYGPATH_CMD) "$1"; else echo "$1"; fi)
93endef
94else
95# Temporary until we upgrade to MKS 8.7, MKS pwd returns mixed mode path
96define FullPath
97$(shell cd $1 2> $(DEV_NULL) && pwd)
98endef
99define OptFullPath
100$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
101endef
102endif
103
104# System drive
105ifdef SYSTEMDRIVE
106 _system_drive =$(SYSTEMDRIVE)
107else
108 ifdef SystemDrive
109 _system_drive =$(SystemDrive)
110 endif
111endif
112_system_drive:=$(call CheckValue,_system_drive,C:)
113
114# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
115# NOTE: Must end with / so that it could be empty, allowing PATH usage.
116ifdef ALT_UNIXCOMMAND_PATH
117 xALT_UNIXCOMMAND_PATH :="$(subst \,/,$(ALT_UNIXCOMMAND_PATH))"
118 fxALT_UNIXCOMMAND_PATH :=$(call FullPath,$(xALT_UNIXCOMMAND_PATH))
119 UNIXCOMMAND_PATH :=$(call PrefixPath,$(fxALT_UNIXCOMMAND_PATH))
120else
121 ifdef USING_CYGWIN
122 UNIXCOMMAND_PATH :=$(call PrefixPath,/usr/bin)
123 else
124 ifdef ROOTDIR
125 xROOTDIR :="$(subst \,/,$(ROOTDIR))"
126 _rootdir :=$(call FullPath,$(xROOTDIR))
127 else
128 xROOTDIR :="$(_system_drive)/mksnt"
129 _rootdir :=$(call FullPath,$(xROOTDIR))
130 endif
131 ifneq ($(_rootdir),)
132 UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt)
133 endif
134 endif
135endif
136UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
137
138# Get version of MKS or CYGWIN
ohair8df39292009-01-31 17:31:21 -0800139ifndef USING_CYGWIN
duke6e45e102007-12-01 00:00:00 +0000140_MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@')
141MKS_VER :=$(call GetVersion,$(_MKS_VER))
142# At this point, we can re-define FullPath to use DOSNAME_CMD
143CHECK_MKS87:=$(call CheckVersions,$(MKS_VER),8.7)
144TRY_DOSNAME:=false
145ifeq ($(CHECK_MKS87),same)
146TRY_DOSNAME:=true
147endif
148# Newer should be ok
149ifeq ($(CHECK_MKS87),newer)
150TRY_DOSNAME:=true
151endif
152ifeq ($(TRY_DOSNAME),true)
153ifeq ($(shell $(UNIXCOMMAND_PATH)dosname -s $(_system_drive)/ 2> $(DEV_NULL)),$(_system_drive)/)
154_DOSNAME=$(UNIXCOMMAND_PATH)dosname
155DOSNAME_CMD:=$(_DOSNAME) -s
156define FullPath
157$(subst //,/,$(shell echo $1 | $(DOSNAME_CMD) 2> $(DEV_NULL)))
158endef
159endif # test dosname -s
160endif # TRY_DOSNAME
161endif # MKS
162
163# We try to get references to what we need via the default component
164# environment variables, or what was used historically.
165
166# Process Windows values into FullPath values, these paths may have \ chars
167
168# System root
169ifdef SYSTEMROOT
170 xSYSTEMROOT :="$(subst \,/,$(SYSTEMROOT))"
171 _system_root :=$(call FullPath,$(xSYSTEMROOT))
172else
173 ifdef SystemRoot
174 xSYSTEMROOT :="$(subst \,/,$(SystemRoot))"
175 _system_root :=$(call FullPath,$(xSYSTEMROOT))
176 else
177 ifdef WINDIR
178 xWINDIR :="$(subst \,/,$(WINDIR))"
179 _system_root :=$(call FullPath,$(xWINDIR))
180 else
181 ifdef windir
182 xWINDIR :="$(subst \,/,$(windir))"
183 _system_root :=$(call FullPath,$(xWINDIR))
184 endif
185 endif
186 endif
187endif
188_system_root:=$(call CheckValue,_system_root,$(_system_drive)/WINNT)
189
190# Program Files directory
191ifdef PROGRAMFILES
192 xPROGRAMFILES :="$(subst \,/,$(PROGRAMFILES))"
193else
194 ifeq ($(ARCH_DATA_MODEL), 32)
195 xPROGRAMFILES :="$(_system_drive)/Program Files"
196 else
197 xPROGRAMFILES :="$(_system_drive)/Program Files (x86)"
198 endif
199endif
200ifeq ($(ARCH_DATA_MODEL), 32)
201 _program_files :=$(call FullPath,$(xPROGRAMFILES))
ohair82280fd2009-03-16 11:24:06 -0700202 _program_files32 :=$(_program_files)
duke6e45e102007-12-01 00:00:00 +0000203else
204 ifdef PROGRAMW6432
205 xPROGRAMW6432 :="$(subst \,/,$(PROGRAMW6432))"
206 else
207 xPROGRAMW6432 :="$(_system_drive)/Program Files"
208 endif
209 _program_files :=$(call FullPath,$(xPROGRAMW6432))
210 _program_files32 :=$(call FullPath,$(xPROGRAMFILES))
211 ifneq ($(word 1,$(_program_files32)),$(_program_files32))
212 _program_files32:=
213 endif
214endif
215ifneq ($(word 1,$(_program_files)),$(_program_files))
216 _program_files:=
217endif
218
219# DirectX SDK
220ifdef ALT_DXSDK_DRIVE
221 _dx_sdk_dir =$(ALT_DXSDK_DRIVE):/DXSDK
222else
223 ifdef DXSDK_DIR
224 xDXSDK_DIR :="$(subst \,/,$(DXSDK_DIR))"
225 else
226 xDXSDK_DIR :="$(_system_drive)/DXSDK"
227 endif
228 _dx_sdk_dir :=$(call FullPath,$(xDXSDK_DIR))
229endif
230
231# Compilers, SDK, and Visual Studio (MSDEV) [32bit is different from 64bit]
232ifeq ($(ARCH_DATA_MODEL), 32)
233 # Try looking in MSVCDIR or MSVCDir area first (set by vcvars32.bat)
234 ifdef MSVCDIR
235 xMSVCDIR :="$(subst \,/,$(MSVCDIR))"
236 _msvc_dir :=$(call FullPath,$(xMSVCDIR))
237 else
238 ifdef MSVCDir
239 xMSVCDIR :="$(subst \,/,$(MSVCDir))"
240 _msvc_dir :=$(call FullPath,$(xMSVCDIR))
241 else
242 ifneq ($(_program_files),)
243 xMSVCDIR :="$(_program_files)/Microsoft Visual Studio .NET 2003/Vc7"
244 _msvc_dir :=$(call FullPath,$(xMSVCDIR))
245 endif
246 endif
247 endif
tbellfc2a6fe2009-01-14 21:35:03 -0800248 # If we still don't have it, look for VSnnCOMNTOOLS (newest first),
249 # set by installer?
duke6e45e102007-12-01 00:00:00 +0000250 ifeq ($(_msvc_dir),)
tbellfc2a6fe2009-01-14 21:35:03 -0800251 ifdef VS90COMNTOOLS # /Common/Tools directory, use ../../Vc
252 xVS90COMNTOOLS :="$(subst \,/,$(VS90COMNTOOLS))"
253 _vs90tools :=$(call FullPath,$(xVS90COMNTOOLS))
254 endif
255 ifneq ($(_vs90tools),)
ohair82280fd2009-03-16 11:24:06 -0700256 _msvc_dir :=$(_vs90tools)/../../Vc
257 else
258 ifdef VS80COMNTOOLS # /Common/Tools directory, use ../../Vc
259 xVS80COMNTOOLS :="$(subst \,/,$(VS80COMNTOOLS))"
260 _vs80tools :=$(call FullPath,$(xVS80COMNTOOLS))
261 endif
262 ifneq ($(_vs80tools),)
263 _msvc_dir :=$(_vs80tools)/../../Vc
264 else
265 ifdef VS71COMNTOOLS # /Common/Tools directory, use ../../Vc7
266 xVS71COMNTOOLS :="$(subst \,/,$(VS71COMNTOOLS))"
267 _vs71tools :=$(call FullPath,$(xVS71COMNTOOLS))
268 endif
269 ifneq ($(_vs71tools),)
270 _msvc_dir :=$(_vs71tools)/../../Vc7
271 endif
272 endif
duke6e45e102007-12-01 00:00:00 +0000273 endif
274 endif
275 ifneq ($(_msvc_dir),)
276 _compiler_bin :=$(_msvc_dir)/Bin
ohair82280fd2009-03-16 11:24:06 -0700277 # Assume PlatformSDK is in VS71 (will be empty if VS90)
278 _ms_sdk :=$(call FullPath,$(_msvc_dir)/PlatformSDK)
279 # Assume VS90, then VS80, then VS71
280 _redist_sdk :=$(call FullPath,$(_msvc_dir)/../SDK/v3.5/Bin)
281 ifeq ($(_redist_sdk),)
282 _redist_sdk :=$(call FullPath,$(_msvc_dir)/../SDK/v2.0/Bin)
283 ifeq ($(_redist_sdk),)
284 _redist_sdk :=$(call FullPath,$(_msvc_dir)/../SDK/v1.1/Bin)
285 endif
286 endif
duke6e45e102007-12-01 00:00:00 +0000287 endif
288endif
289
290# The Microsoft Platform SDK installed by itself
291ifneq ($(_program_files),)
ohair82280fd2009-03-16 11:24:06 -0700292 _PSDK :="$(_program_files)/Microsoft SDKs/Windows/v6.1/"
293 _psdk :=$(call FullPath,$(xMSSDK61))
duke6e45e102007-12-01 00:00:00 +0000294 ifeq ($(_psdk),)
ohair82280fd2009-03-16 11:24:06 -0700295 xPSDK :="$(_program_files)/Microsoft Platform SDK"
296 _psdk :=$(call FullPath,$(xPSDK))
297 ifeq ($(_psdk),)
298 xPSDK :="$(_program_files)/Microsoft SDK"
299 _psdk :=$(call FullPath,$(xMSSDK))
300 endif
duke6e45e102007-12-01 00:00:00 +0000301 endif
302endif
303
304# If no SDK found yet, look in other places
305ifeq ($(_ms_sdk),)
306 ifdef MSSDK
307 xMSSDK :="$(subst \,/,$(MSSDK))"
308 _ms_sdk :=$(call FullPath,$(xMSSDK))
309 else
310 ifdef MSSdk
311 xMSSDK :="$(subst \,/,$(MSSdk))"
312 _ms_sdk :=$(call FullPath,$(xMSSDK))
313 else
314 _ms_sdk :=$(_psdk)
315 endif
316 endif
317endif
318
319# Compilers for 64bit are from SDK
320ifeq ($(ARCH_DATA_MODEL), 64)
ohair82280fd2009-03-16 11:24:06 -0700321 xVS2008 :="$(_program_files32)/Microsoft Visual Studio 9.0/"
322 VS2008 :=$(call FullPath,$(xVS2008))
323 ifneq ($(VS2008),)
324 _compiler_bin :=$(VS2008)/VC/Bin/$(ARCH)
325 xMSSDK61 :="$(_program_files)/Microsoft SDKs/Windows/v6.1/"
326 MSSDK61 :=$(call FullPath,$(xMSSDK61))
327 _redist_sdk :=$(VS2008)/VC/redist/x86/Microsoft.VC90.CRT
328 else
329 ifneq ($(_ms_sdk),)
330 ifeq ($(ARCH), ia64)
331 _compiler_bin :=$(_ms_sdk)/Bin/Win64
332 endif
333 ifeq ($(ARCH), amd64)
334 _compiler_bin :=$(_ms_sdk)/Bin/Win64/x86/$(ARCH)
335 _redist_sdk :=$(_ms_sdk)/redist/win64/AMD64
336 endif
duke6e45e102007-12-01 00:00:00 +0000337 endif
338 endif
339endif
340
341# Location on system where jdk installs might be
342ifneq ($(_program_files),)
343 USRJDKINSTANCES_PATH =$(_program_files)/Java
344else
345 USRJDKINSTANCES_PATH =$(_system_drive)/
346endif
347
348# SLASH_JAVA: location of all network accessable files
349ifdef ALT_SLASH_JAVA
350 xALT_SLASH_JAVA :="$(subst \,/,$(ALT_SLASH_JAVA))"
351 SLASH_JAVA :=$(call FullPath,$(xALT_SLASH_JAVA))
352else
353 ifdef ALT_JDK_JAVA_DRIVE
354 SLASH_JAVA =$(JDK_JAVA_DRIVE)
355 else
356 SLASH_JAVA =J:
357 endif
358endif
359SLASH_JAVA:=$(call AltCheckSpaces,SLASH_JAVA)
360SLASH_JAVA:=$(call AltCheckValue,SLASH_JAVA)
361
362# JDK_DEVTOOLS_DIR: common path for all the java devtools
363ifdef ALT_JDK_DEVTOOLS_DIR
364 xALT_JDK_DEVTOOLS_DIR :="$(subst \,/,$(ALT_JDK_DEVTOOLS_DIR))"
365 JDK_DEVTOOLS_DIR :=$(call FullPath,$(xALT_JDK_DEVTOOLS_DIR))
366else
367 JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
368endif
369JDK_DEVTOOLS_DIR:=$(call AltCheckSpaces,JDK_DEVTOOLS_DIR)
370JDK_DEVTOOLS_DIR:=$(call AltCheckValue,JDK_DEVTOOLS_DIR)
371
372# COMPILER_PATH: path to where the compiler and tools are installed.
373# NOTE: Must end with / so that it could be empty, allowing PATH usage.
374ifdef ALT_COMPILER_PATH
375 xALT_COMPILER_PATH :="$(subst \,/,$(ALT_COMPILER_PATH))"
376 fxALT_COMPILER_PATH :=$(call FullPath,$(xALT_COMPILER_PATH))
377 COMPILER_PATH :=$(call PrefixPath,$(fxALT_COMPILER_PATH))
378else
379 COMPILER_PATH :=$(call PrefixPath,$(_compiler_bin))
380endif
381COMPILER_PATH :=$(call AltCheckSpaces,COMPILER_PATH)
382
383# MSDEVTOOLS_PATH: path to where the additional MS Compiler tools are.
384# NOTE: Must end with / so that it could be empty, allowing PATH usage.
385ifdef ALT_MSDEVTOOLS_PATH
386 xALT_MSDEVTOOLS_PATH :="$(subst \,/,$(ALT_MSDEVTOOLS_PATH))"
387 fxALT_MSDEVTOOLS_PATH :=$(call FullPath,$(xALT_MSDEVTOOLS_PATH))
388 MSDEVTOOLS_PATH :=$(call PrefixPath,$(fxALT_MSDEVTOOLS_PATH))
389else
390 ifeq ($(ARCH_DATA_MODEL), 64)
391 ifdef MSTOOLS
392 xMSTOOLS :="$(subst \,/,$(MSTOOLS))"
393 _ms_tools :=$(call FullPath,$(xMSTOOLS))
394 else
395 ifdef Mstools
396 xMSTOOLS :="$(subst \,/,$(Mstools))"
397 _ms_tools :=$(call FullPath,$(xMSTOOLS))
398 else
399 _ms_tools :=
400 endif
401 endif
402 ifneq ($(_ms_tools),)
403 _ms_tools_bin :=$(_ms_tools)/Bin
404 else
405 # Assumes compiler bin is .../Bin/win64/x86/AMD64, rc.exe is 3 levels up
406 _ms_tools_bin :=$(_compiler_bin)/../../..
407 endif
408 else
409 _ms_tools_bin :=$(_compiler_bin)
410 endif
411 MSDEVTOOLS_PATH :=$(call PrefixPath,$(_ms_tools_bin))
412endif
413MSDEVTOOLS_PATH:=$(call AltCheckSpaces,MSDEVTOOLS_PATH)
414
415# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
416# NOTE: Must end with / so that it could be empty, allowing PATH usage.
417ifdef ALT_DEVTOOLS_PATH
418 xALT_DEVTOOLS_PATH :="$(subst \,/,$(ALT_DEVTOOLS_PATH))"
419 fxALT_DEVTOOLS_PATH :=$(call FullPath,$(xALT_DEVTOOLS_PATH))
420 DEVTOOLS_PATH :=$(call PrefixPath,$(fxALT_DEVTOOLS_PATH))
421else
422 ifdef USING_CYGWIN
423 DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
424 else
425 xDEVTOOLS_PATH :="$(_system_drive)/utils"
426 fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH))
427 DEVTOOLS_PATH :=$(call PrefixPath,$(fxDEVTOOLS_PATH))
428 endif
429endif
430DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
431
432# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
433# _BOOTDIR2: Second choice
434ifndef ALT_BOOTDIR
435 _BOOTDIR1 =$(_system_drive)/jdk$(PREVIOUS_JDK_VERSION)
436 _BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
437endif
438
ohair82280fd2009-03-16 11:24:06 -0700439# 32 bit always needs 2 runtimes, 64 bit usually does too
duke6e45e102007-12-01 00:00:00 +0000440
ohair82280fd2009-03-16 11:24:06 -0700441# MSVCRT_DLL_PATH: location of msvcrt.dll that will be re-distributed
442ifdef ALT_MSVCRT_DLL_PATH
443 xALT_MSVCRT_DLL_PATH :="$(subst \,/,$(ALT_MSVCRT_DLL_PATH))"
444 MSVCRT_DLL_PATH :=$(call FullPath,$(xALT_MSVCRT_DLL_PATH))
445else
446 MSVCRT_DLL_PATH :=$(call FullPath,$(_system_root)/system32/)
447endif
448MSVCRT_DLL_PATH:=$(call AltCheckSpaces,MSVCRT_DLL_PATH)
449MSVCRT_DLL_PATH:=$(call AltCheckValue,MSVCRT_DLL_PATH)
450
451# 32bit always needs the MSVCRNN runtime, 64bit does when using VS2008
duke6e45e102007-12-01 00:00:00 +0000452ifeq ($(ARCH_DATA_MODEL), 32)
ohair82280fd2009-03-16 11:24:06 -0700453 _NEEDS_MSVCRNN = true
454else
455 ifeq ($(VS2008),)
456 _NEEDS_MSVCRNN = false
duke6e45e102007-12-01 00:00:00 +0000457 else
ohair82280fd2009-03-16 11:24:06 -0700458 _NEEDS_MSVCRNN = true
duke6e45e102007-12-01 00:00:00 +0000459 endif
ohair82280fd2009-03-16 11:24:06 -0700460endif
461
462ifeq ($(_NEEDS_MSVCRNN), true)
tbellfc2a6fe2009-01-14 21:35:03 -0800463 # MSVCRNN_DLL_PATH: location of msvcrnn.dll that will be re-distributed
464 ifdef ALT_MSVCRNN_DLL_PATH
465 xALT_MSVCRNN_DLL_PATH :="$(subst \,/,$(ALT_MSVCRNN_DLL_PATH))"
466 MSVCRNN_DLL_PATH :=$(call FullPath,$(xALT_MSVCRNN_DLL_PATH))
duke6e45e102007-12-01 00:00:00 +0000467 else
ohair82280fd2009-03-16 11:24:06 -0700468 MSVCRNN_DLL_PATH :=$(_redist_sdk)
duke6e45e102007-12-01 00:00:00 +0000469 endif
tbellfc2a6fe2009-01-14 21:35:03 -0800470 MSVCRNN_DLL_PATH :=$(call AltCheckSpaces,MSVCRNN_DLL_PATH)
471 MSVCRNN_DLL_PATH:=$(call AltCheckValue,MSVCRNN_DLL_PATH)
duke6e45e102007-12-01 00:00:00 +0000472endif
473
474# DXSDK_PATH: path to Microsoft DirectX SDK Include and Lib
475ifdef ALT_DXSDK_PATH
476 xALT_DXSDK_PATH :="$(subst \,/,$(ALT_DXSDK_PATH))"
477 DXSDK_PATH :=$(call FullPath,$(xALT_DXSDK_PATH))
478else
479 _DXSDK_PATH1 :=$(_dx_sdk_dir)
480 _DXSDK_PATH2 :=$(JDK_DEVTOOLS_DIR)/windows/dxsdk
481 DXSDK_PATH :=$(call DirExists,$(_DXSDK_PATH1),$(_DXSDK_PATH2),$(_dx_sdk_dir))
482endif
483DXSDK_PATH :=$(call AltCheckSpaces,DXSDK_PATH)
484DXSDK_PATH:=$(call AltCheckValue,DXSDK_PATH)
485
486# DXSDK_INCLUDE_PATH: path to Microsoft DirectX SDK Include
487ifdef ALT_DXSDK_INCLUDE_PATH
488 xALT_DXSDK_INCLUDE_PATH :="$(subst \,/,$(ALT_DXSDK_INCLUDE_PATH))"
489 DXSDK_INCLUDE_PATH :=$(call FullPath,$(xALT_DXSDK_INCLUDE_PATH))
490else
491 DXSDK_INCLUDE_PATH =$(subst //,/,$(DXSDK_PATH)/Include)
492endif
493
494# DXSDK_LIB_PATH: path to Microsoft DirectX SDK Lib
495ifdef ALT_DXSDK_LIB_PATH
496 xALT_DXSDK_LIB_PATH :="$(subst \,/,$(ALT_DXSDK_LIB_PATH))"
497 DXSDK_LIB_PATH :=$(call FullPath,$(xALT_DXSDK_LIB_PATH))
498else
499 ifeq ($(ARCH_DATA_MODEL), 64)
500 # 64bit libs are located in "Lib/x64" subdir
501 DXSDK_LIB_PATH =$(subst //,/,$(DXSDK_PATH)/Lib/x64)
502 else
503 DXSDK_LIB_PATH =$(subst //,/,$(DXSDK_PATH)/Lib)
504 endif
505endif
506
507# DEPLOY_MSSDK: Microsoft SDK for this platform (for deploy)
508ifdef ALT_DEPLOY_MSSDK
509 xALT_DEPLOY_MSSDK :="$(subst \,/,$(ALT_DEPLOY_MSSDK))"
510 DEPLOY_MSSDK :=$(call FullPath,$(xALT_DEPLOY_MSSDK))
511else
512 DEPLOY_MSSDK :=$(_ms_sdk)
513endif
514DEPLOY_MSSDK:=$(call AltCheckSpaces,DEPLOY_MSSDK)
515
516# INSTALL_MSSDK: Microsoft Installer SDK for this platform (for install)
517ifdef ALT_INSTALL_MSSDK
518 xALT_INSTALL_MSSDK :="$(subst \,/,$(ALT_INSTALL_MSSDK))"
519 INSTALL_MSSDK :=$(call FullPath,$(xALT_INSTALL_MSSDK))
520else
herrick43e2a0c2009-06-12 14:56:32 -0400521 INSTALL_MSSDK :=$(_ms_sdk)
duke6e45e102007-12-01 00:00:00 +0000522endif
523INSTALL_MSSDK:=$(call AltCheckSpaces,INSTALL_MSSDK)
524
525# INSTALL_MSIVAL2: Installation of MsiVal2 for this platform (for install)
526ifdef ALT_INSTALL_MSIVAL2
527 xALT_INSTALL_MSIVAL2 :="$(subst \,/,$(ALT_INSTALL_MSIVAL2))"
528 INSTALL_MSIVAL2 :=$(call FullPath,$(xALT_INSTALL_MSIVAL2))
529else
ohair82280fd2009-03-16 11:24:06 -0700530 INSTALL_MSIVAL2 :=$(_program_files32)/MsiVal2
duke6e45e102007-12-01 00:00:00 +0000531endif
532INSTALL_MSIVAL2:=$(call AltCheckSpaces,INSTALL_MSIVAL2)
533
534# WSCRIPT: path to wscript.exe (used in creating install bundles)
535ifdef ALT_WSCRIPT
536 xALT_WSCRIPT :="$(subst \,/,$(ALT_WSCRIPT))"
537 WSCRIPT =$(xALT_WSCRIPT)
538else
539 _WSCRIPT1 :=$(_system_root)/system32/wscript.exe
540 _WSCRIPT2 :=$(DEVTOOLS_PATH)wscript.exe
541 WSCRIPT :=$(call FileExists,$(_WSCRIPT1),$(_WSCRIPT2))
542endif
543WSCRIPT:=$(call AltCheckSpaces,WSCRIPT)
ksrini72738352008-08-19 07:50:03 -0700544# batch mode no modal dialogs on errors, please.
545WSCRIPT += -B
duke6e45e102007-12-01 00:00:00 +0000546
547# CSCRIPT: path to cscript.exe (used in creating install bundles)
548ifdef ALT_CSCRIPT
549 xALT_CSCRIPT :="$(subst \,/,$(ALT_CSCRIPT))"
550 CSCRIPT =$(xALT_CSCRIPT)
551else
552 _CSCRIPT1 :=$(_system_root)/system32/cscript.exe
553 _CSCRIPT2 :=$(DEVTOOLS_PATH)cscript.exe
554 CSCRIPT :=$(call FileExists,$(_CSCRIPT1),$(_CSCRIPT2))
555endif
556CSCRIPT:=$(call AltCheckSpaces,CSCRIPT)
557
558# MSIVAL2: path to msival2.exe (used in validating install msi files)
559ifdef ALT_MSIVAL2
560 xALT_MSIVAL2 :="$(subst \,/,$(ALT_MSIVAL2))"
561 MSIVAL2 =$(xALT_MSIVAL2)
562else
563 _MSIVAL2_1 :=$(INSTALL_MSIVAL2)/msival2.exe
564 _MSIVAL2_2 :=$(DEVTOOLS_PATH)msival2.exe
565 MSIVAL2 :=$(call FileExists,$(_MSIVAL2_1),$(_MSIVAL2_2))
566endif
567MSIVAL2:=$(call AltCheckSpaces,MSIVAL2)
ksrini72738352008-08-19 07:50:03 -0700568# suppress msival2 checks, as it hangs jprt builds
569ifdef SKIP_MSIVAL2
570 MSIVAL2 := $(ECHO)
571endif
duke6e45e102007-12-01 00:00:00 +0000572
573# LOGOCUB: path to cub file for (used in validating install msi files)
574ifdef ALT_LOGOCUB
575 xALT_LOGOCUB :="$(subst \,/,$(ALT_LOGOCUB))"
576 LOGOCUB =$(xALT_LOGOCUB)
577else
578 _LOGOCUB1 :=$(INSTALL_MSIVAL2)/logo.cub
579 _LOGOCUB2 :=$(DEVTOOLS_PATH)logo.cub
580 LOGOCUB :=$(call FileExists,$(_LOGOCUB1),$(_LOGOCUB2))
581endif
582LOGOCUB:=$(call AltCheckSpaces,LOGOCUB)
583
584# MSITRAN: path to msitran.exe (used in creating install bundles and sponsors)
585ifdef ALT_MSITRAN
586 xALT_MSITRAN :="$(subst \,/,$(ALT_MSITRAN))"
587 MSITRAN =$(xALT_MSITRAN)
588else
589 _MSITRAN1 :=$(INSTALL_MSSDK)/Bin/msitran.exe
590 _MSITRAN2 :=$(DEVTOOLS_PATH)msitran.exe
591 MSITRAN :=$(call FileExists,$(_MSITRAN1),$(_MSITRAN2))
592endif
593MSITRAN:=$(call AltCheckSpaces,MSITRAN)
594
595# MSICERT: path to msicert.exe (used in creating install bundles)
596ifdef ALT_MSICERT
597 xALT_MSICERT :="$(subst \,/,$(ALT_MSICERT))"
598 MSICERT =$(xALT_MSICERT)
599else
600 _MSICERT1 :=$(INSTALL_MSSDK)/Bin/msicert.exe
601 _MSICERT2 :=$(DEVTOOLS_PATH)msicert.exe
602 MSICERT :=$(call FileExists,$(_MSICERT1),$(_MSICERT2))
603endif
604MSICERT:=$(call AltCheckSpaces,MSICERT)
605
606# Import JDK images allow for partial builds, components not built are
607# imported (or copied from) these import areas when needed.
608
609# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
610# multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
611ifdef ALT_BUILD_JDK_IMPORT_PATH
612 BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
613else
614 BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES)
615endif
616BUILD_JDK_IMPORT_PATH:=$(call AltCheckSpaces,BUILD_JDK_IMPORT_PATH)
617BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
618
619# JDK_IMPORT_PATH: location of previously built JDK (this version) to import
620ifdef ALT_JDK_IMPORT_PATH
621 JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
622else
623 JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
624endif
625JDK_IMPORT_PATH:=$(call AltCheckSpaces,JDK_IMPORT_PATH)
626JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
627
628# HOTSPOT_IMPORT_PATH: location of hotspot pre-built files
629ifdef ALT_HOTSPOT_IMPORT_PATH
630 HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH))
631else
632 HOTSPOT_IMPORT_PATH =$(JDK_IMPORT_PATH)
633endif
634HOTSPOT_IMPORT_PATH:=$(call AltCheckSpaces,HOTSPOT_IMPORT_PATH)
635HOTSPOT_IMPORT_PATH:=$(call AltCheckValue,HOTSPOT_IMPORT_PATH)
636
637# HOTSPOT_CLIENT_PATH: location of client jvm library file.
638ifeq ($(ARCH_DATA_MODEL), 32)
639 ifdef ALT_HOTSPOT_CLIENT_PATH
640 HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH))
641 else
642 HOTSPOT_CLIENT_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client
643 endif
644 HOTSPOT_CLIENT_PATH:=$(call AltCheckSpaces,HOTSPOT_CLIENT_PATH)
645 HOTSPOT_CLIENT_PATH:=$(call AltCheckValue,HOTSPOT_CLIENT_PATH)
646endif
647
herrick43e2a0c2009-06-12 14:56:32 -0400648# HOTSPOT_KERNEL_PATH: location of kernel jvm library file.
649ifeq ($(ARCH_DATA_MODEL), 32)
650 ifdef ALT_HOTSPOT_KERNEL_PATH
651 HOTSPOT_KERNEL_PATH :=$(call FullPath,$(ALT_HOTSPOT_KERNEL_PATH))
652 else
653 HOTSPOT_KERNEL_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/kernel
654 endif
655 HOTSPOT_KERNEL_PATH:=$(call AltCheckSpaces,HOTSPOT_KERNEL_PATH)
656 HOTSPOT_KERNEL_PATH:=$(call AltCheckValue,HOTSPOT_KERNEL_PATH)
657endif
658
duke6e45e102007-12-01 00:00:00 +0000659# HOTSPOT_SERVER_PATH: location of server jvm library file.
660ifdef ALT_HOTSPOT_SERVER_PATH
661 HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
662else
663 HOTSPOT_SERVER_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
664endif
665HOTSPOT_SERVER_PATH:=$(call AltCheckSpaces,HOTSPOT_SERVER_PATH)
666HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH)
667
668# HOTSPOT_LIB_PATH: location of jvm.lib file.
669ifdef ALT_HOTSPOT_LIB_PATH
670 xALT_HOTSPOT_LIB_PATH :="$(subst \,/,$(ALT_HOTSPOT_LIB_PATH))"
671 HOTSPOT_LIB_PATH :=$(call FullPath,$(xALT_HOTSPOT_LIB_PATH))
672else
673 HOTSPOT_LIB_PATH =$(HOTSPOT_IMPORT_PATH)/lib
674endif
675HOTSPOT_LIB_PATH:=$(call AltCheckSpaces,HOTSPOT_LIB_PATH)
676HOTSPOT_LIB_PATH:=$(call AltCheckValue,HOTSPOT_LIB_PATH)