@echo off rem rem INTEL CORPORATION PROPRIETARY INFORMATION rem This software is supplied under the terms of a license agreement or rem nondisclosure agreement with Intel Corporation and may not be copied rem or disclosed except in accordance with the terms of that agreement. rem Copyright(c) 2007 Intel Corporation. All Rights Reserved. rem set _WIN32_WINNT=0x0501 @if "%ARG%"=="" goto waterfall @if "%ARG%"=="icl101" @CALL :SET_INTEL_ENV 10.1 @if "%ARG%"=="icl10" @CALL :SET_INTEL_ENV 10.0 @if "%ARG%"=="icl91" @CALL :SET_INTEL_ENV 9.1 @if "%ARG%"=="cl9" @CALL :SET_VS9_ENV %vsdk_opt% @if "%ARG%"=="cl8" @CALL :SET_VS8_ENV %vsdk_opt% @if "%ARG%"=="cl7" @CALL :SET_VS7_ENV %sdk_opt% @if "%ARG%"=="cl6" @CALL :SET_VS6_ENV %sdk_opt% @if "%ARG%"=="ifort101" @CALL :SET_INTEL_FOR_ENV 10.1 @if "%ARG%"=="ifort10" @CALL :SET_INTEL_FOR_ENV 10.0 @if "%ARG%"=="ifort9" @CALL :SET_INTEL_FOR_ENV 9.1 @if "%ARG%"=="clarm" @CALL :SET_WCE500_TOOLS @if "%ARG%"=="ecl" @CALL :SET_WCE500_TOOLS @if defined TOOL (set COMP=%ARG%&goto:eof) @CALL :ERR "Compiler "%ARG%" environment is not found" goto:eof :waterfall if "%COMP_TYPE%" == "fortran" ( @CALL :SET_INTEL_FOR_ENV 10 @if not defined TOOL @CALL :SET_INTEL_FOR_ENV 9.1 @if not defined TOOL @CALL :ERR "Intel Fortran environment not found" goto:eof ) set COMP=cl6 @CALL :SET_VS6_ENV %sdk_opt% @if not defined TOOL ( set COMP=icl10 @CALL :SET_INTEL_ENV 10 ) @if not defined TOOL ( set COMP=icl91 @CALL :SET_INTEL_ENV 9.1 ) @if not defined TOOL ( set COMP=cl9 @CALL :SET_VS9_ENV %sdk_opt% ) @if not defined TOOL ( set COMP=cl8 @CALL :SET_VS8_ENV %vsdk_opt% ) @if not defined TOOL ( set COMP=cl7 @CALL :SET_VS7_ENV %sdk_opt% ) @if defined TOOL goto:eof @CALL :ERR "No any valid compiler environment found" goto:eof :::::::::::::::::: :SET_INTEL_ENV set COMPILER=icl.exe set ptn= dir /B /ON "%PrF%\Intel\Compiler\C++\%1.*" @%ptn% 2>NUL 1>&2 if "%errorlevel%"=="0" for /F "usebackq" %%i in (`%ptn%`) do set LASTVERSION=%%i set ENV="%PrF%\Intel\Compiler\C++\%LASTVERSION%\%AR%\Bin\iclvars.bat" if exist %ENV% ( set TOOL=%ENV% @echo +++ Intel C++ Compiler v.%LASTVERSION% for %AR% is taken exit /b ) echo --- Intel C++ Compiler %ARG% for %AR% environment is not found. exit /b 1 :SET_VS9_ENV set COMPILER=cl.exe set _WIN32_WINNT=0x0502 set ENV="%VS90COMNTOOLS%\..\..\vc\bin\%MSAR%" if exist %ENV% ( set TOOL=%ENV% @echo +++ Microsoft Visual Studio 2008 compiler for %AR% is taken exit /b ) set ENV="%ProgramFiles%\Microsoft SDKs\windows\v6.0\bin\setenv.cmd" if defined ProgramW6432 set ENV="%ProgramW6432%\Microsoft SDKs\windows\v6.0\bin\setenv.cmd" if exist %ENV% ( @echo +++ Microsoft Vista SDK v6.0 is taken set VistaSDK=yes set TOOL=%ENV% %~1 exit /b ) echo --- Microsoft Visual Studio 2008 environment is not found. exit /b 1 :SET_VS6_ENV set COMPILER=cl.exe set _WIN32_WINNT=0x0501 set ENV="C:\Program Files\Microsoft Visual Studio\VC98\Bin\%MSAR%" if exist %ENV% ( set TOOL=%ENV% @echo +++ Microsoft Visual Studio 6 compiler for %AR% is taken exit /b ) echo --- Microsoft Visual Studio 2006 environment is not found. exit /b 1 :SET_VS8_ENV set COMPILER=cl.exe set ENV="%VS80COMNTOOLS%\..\..\vc\bin\%MSAR%" if exist %ENV% ( set TOOL=%ENV% @echo +++ Microsoft Visual Studio 2005 compiler for %AR% is taken exit /b ) set ENV="%ProgramFiles%\Microsoft SDKs\windows\v6.0\bin\setenv.cmd" if defined ProgramW6432 set ENV="%ProgramW6432%\Microsoft SDKs\windows\v6.0\bin\setenv.cmd" if exist %ENV% ( @echo +++ Microsoft Vista SDK v6.0 is taken set VistaSDK=yes set TOOL=%ENV% %~1 exit /b ) echo --- Microsoft Visual Studio 2005 environment is not found. exit /b 1 :SET_VS7_ENV set COMPILER=cl.exe if not "%AR%" == "IA32" goto sdk set ENV="%VS71COMNTOOLS%\vsvars32.bat" if exist %ENV% ( set TOOL=%ENV% @echo +++ Microsoft Visual Studio 2003 compiler is taken exit /b ) echo --- Microsoft Visual Studio 2003 environment is not found. exit /b 1 :sdk set ENV="%ProgramFiles%\Microsoft Platform SDK for Windows Server 2003 R2\setenv.cmd" if exist %ENV% ( @echo +++ Microsoft Platform SDK for Windows Server 2003 R2 is taken set TOOL=%ENV% %~1 exit /b ) set ENV="%ProgramFiles%\Microsoft Platform SDK\setenv.cmd" if exist %ENV% ( @echo +++ Microsoft Platform SDK * is taken set TOOL=%ENV% %~1 exit /b ) set ENV="%ProgramFiles%\Microsoft Platform SDK\setenv.bat" if exist %ENV% ( @echo +++ Microsoft Platform SDK is taken set TOOL=%ENV% %~1 exit /b ) @echo --- MS Platform SDK is not found. exit /b 1 :SET_INTEL_FOR_ENV set COMPILER=ifort.exe set ptn= dir /B /ON "%PrF%\Intel\Compiler\fortran\%1.*" @%ptn% 2>NUL 1>&2 if "%errorlevel%"=="0" for /F "usebackq" %%i in (`%ptn%`) do set LASTVERSION=%%i set ENV="%PrF%\Intel\Compiler\fortran\%LASTVERSION%\%AR%\Bin\ifortvars.bat" if exist %ENV% ( set TOOL=%ENV% @echo +++ Intel Fortran Compiler v.%LASTVERSION% for %AR% is taken set COMP=f%LASTVERSION% exit /b ) exit /b 1 :SET_WCE500_TOOLS set COMPILER=%ARG% if exist %SDKROOT% goto pass_SDKROOT_SET set __SDK_TOUCH="C:\Program Files\Windows CE Tools\wce500\" if exist %__SDK_TOUCH% set SDKROOT=C:\Program Files\Windows CE Tools :pass_SDKROOT_SET set TOOL="%ProgramFiles%\Microsoft eMbedded C++ 4.0\EVC\wce500\bin\WCEARMV4I.BAT" if "%ARG%"=="ecl" ( set TOOL="%ProgramFiles%\Microsoft eMbedded C++ 4.0\EVC\wce500\bin\WCEx86.BAT" set COMPILER=cl ) @echo +++ Microsoft eMbedded C++ 4.0 for %AR% is taken exit /b ::::::::::::::::::::::: :ERR @echo --- @echo --- ERROR: %~1 @echo --- exit /b -1