1@echo off
2REM
3REM Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
4REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5REM
6REM This code is free software; you can redistribute it and/or modify it
7REM under the terms of the GNU General Public License version 2 only, as
8REM published by the Free Software Foundation.
9REM
10REM This code is distributed in the hope that it will be useful, but WITHOUT
11REM ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12REM FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13REM version 2 for more details (a copy is included in the LICENSE file that
14REM accompanied this code).
15REM
16REM You should have received a copy of the GNU General Public License version
17REM 2 along with this work; if not, write to the Free Software Foundation,
18REM Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19REM
20REM Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21REM or visit www.oracle.com if you need additional information or have any
22REM questions.
23REM
24REM
25
26REM Cross compile IA64 compiler2 VM
27REM Usage:
28REM cross_compile flavor workspace bootstrap_dir [build_id]
29REM                 %1       %2             %3      %4
30REM
31REM Set current directory
32for /F %%i in ('cd') do set CD=%%i
33echo Setting up Visual C++ Compilation Environment
34if "%MSVCDir%" == "" goto setdir1
35goto setenv1
36:setdir1
37SET MSVCDir=C:\Program Files\Microsoft Visual Studio\VC98
38:setenv1
39SET OLDINCLUDE=%INCLUDE%
40SET OLDLIB=%LIB%
41SET OLDPATH=%PATH%
42call "%MSVCDir%\Bin\VCVARS32"
43call %2\make\windows\build %1 adlc %2 %3 %4
44SET INCLUDE=%OLDINCLUDE%
45SET LIB=%OLDLIB%
46SET PATH=%OLDPATH%
47echo Setting up 64-BIT Compilation Environment
48if "%MSSdk%" == "" goto setdir2
49goto setenv2
50:setdir2
51SET MSSdk=C:\Program Files\Microsoft SDK
52:setenv2
53call "%MSSdk%\SetEnv.bat" /XP64
54SET ALT_ADLC_PATH=%CD%\windows_i486_compiler2\generated
55call %2\make\windows\build %1 compiler2 %2 %3 %4
56SET INCLUDE=%OLDINCLUDE%
57SET LIB=%OLDLIB%
58SET PATH=%OLDPATH%
59SET OLDINCLUDE=
60SET OLDLIB=
61SET OLDPATH=
62