2004-03-27 02:42:33 +01:00
|
|
|
@echo off
|
|
|
|
:- $Id$
|
|
|
|
|
2006-10-31 22:13:02 +01:00
|
|
|
:- with option clearset, clears all config.bat-made environment variables
|
|
|
|
:- without options, MAKE / LINK / ... are set to defaults based on COMPILER ...
|
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
if "%1" == "clearset" goto clearset
|
|
|
|
|
|
|
|
:-----------------------------------------------------------------------
|
|
|
|
|
2009-07-11 18:59:43 +02:00
|
|
|
if not "%COMPILER%" == "" goto skip_cc
|
|
|
|
|
|
|
|
set COMPILER=WATCOM
|
|
|
|
|
|
|
|
echo No compiler specified, defaulting to Open Watcom
|
|
|
|
|
|
|
|
:skip_cc
|
|
|
|
|
|
|
|
:-----------------------------------------------------------------------
|
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
if not "%MAKE%" == "" goto skip_make
|
|
|
|
|
|
|
|
if "%COMPILER%" == "TC2" set MAKE=%TC2_BASE%\make
|
|
|
|
if "%COMPILER%" == "TURBOCPP" set MAKE=%TP1_BASE%\bin\make
|
|
|
|
if "%COMPILER%" == "TC3" set MAKE=%TC3_BASE%\bin\make
|
|
|
|
if "%COMPILER%" == "BC5" set MAKE=%BC5_BASE%\bin\make
|
2004-04-11 14:21:25 +02:00
|
|
|
if "%COMPILER%" == "WATCOM" set MAKE=wmake /ms /h
|
|
|
|
if "%COMPILER%" == "MSCL8" set MAKE=%MS_BASE%\bin\nmake /nologo
|
2004-03-27 02:42:33 +01:00
|
|
|
|
|
|
|
echo Make is %MAKE%.
|
|
|
|
|
|
|
|
:skip_make
|
|
|
|
|
|
|
|
:-----------------------------------------------------------------------
|
|
|
|
|
|
|
|
if not "%XLINK%" == "" goto skip_xlink
|
|
|
|
|
2004-04-11 14:21:25 +02:00
|
|
|
if "%COMPILER%" == "TC2" set XLINK=%TC2_BASE%\tlink /m/c
|
|
|
|
if "%COMPILER%" == "TURBOCPP" set XLINK=%TP1_BASE%\bin\tlink /m/c
|
|
|
|
if "%COMPILER%" == "TC3" set XLINK=%TC3_BASE%\bin\tlink /m/c
|
|
|
|
if "%COMPILER%" == "BC5" set XLINK=%BC5_BASE%\bin\tlink /m/c
|
|
|
|
if "%COMPILER%" == "WATCOM" set XLINK=..\utils\wlinker /ma/nologo
|
|
|
|
if "%COMPILER%" == "MSCL8" set XLINK=%MS_BASE%\bin\link /ONERROR:NOEXE /ma /nologo
|
2004-03-27 02:42:33 +01:00
|
|
|
|
|
|
|
echo Linker is %XLINK%.
|
|
|
|
|
|
|
|
:skip_xlink
|
|
|
|
|
|
|
|
:-----------------------------------------------------------------------
|
|
|
|
|
|
|
|
if not "%XUPX%" == "" set UPXOPT=-U
|
|
|
|
if "%XUPX%" == "" set UPXOPT=
|
|
|
|
|
|
|
|
goto end
|
|
|
|
|
|
|
|
:-----------------------------------------------------------------------
|
|
|
|
|
|
|
|
:clearset
|
|
|
|
|
|
|
|
if not "%OLDPATH%" == "" set PATH=%OLDPATH%
|
|
|
|
if not "%OLDPATH%" == "" set OLDPATH=
|
|
|
|
|
|
|
|
set MAKE=
|
|
|
|
set COMPILER=
|
2009-06-22 22:37:36 +02:00
|
|
|
set ALLCFLAGS=
|
|
|
|
set CFLAGS=
|
2004-03-27 02:42:33 +01:00
|
|
|
set XCPU=
|
2009-06-22 22:37:36 +02:00
|
|
|
set XCPU_EX=
|
2004-03-27 02:42:33 +01:00
|
|
|
set XFAT=
|
|
|
|
set XLINK=
|
|
|
|
set TC2_BASE=
|
|
|
|
set TP1_BASE=
|
|
|
|
set TC3_BASE=
|
|
|
|
set BC5_BASE=
|
|
|
|
set MS_BASE=
|
|
|
|
set XNASM=
|
2009-06-22 22:37:36 +02:00
|
|
|
set NASMFLAGS=
|
2004-03-27 02:42:33 +01:00
|
|
|
set XUPX=
|
|
|
|
set UPXOPT=
|
2009-06-22 22:37:36 +02:00
|
|
|
set LOADSEG=
|
2004-03-27 02:42:33 +01:00
|
|
|
|
|
|
|
:end
|