2004-03-27 02:42:33 +01:00
|
|
|
@echo off
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
:- batch file to build everything
|
|
|
|
:- $Id$
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-07-09 04:16:31 +02:00
|
|
|
:-----------------------------------------------------------------------
|
2004-07-25 11:55:58 +02:00
|
|
|
:- Syntax: BUILD [-r] [fat32|fat16] [msc|wc|tc|tcpp] [86|186|386] [debug] [lfnapi]
|
2004-03-27 02:42:33 +01:00
|
|
|
:- option case is significant !!
|
2004-07-09 04:16:31 +02:00
|
|
|
:-----------------------------------------------------------------------
|
|
|
|
|
|
|
|
set XERROR=1
|
|
|
|
if "%XERROR%" == "" goto noenv
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 13:13:10 +01:00
|
|
|
if "%1" == "-r" call clobber.bat
|
2004-03-27 02:42:33 +01:00
|
|
|
if "%1" == "-r" shift
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
if not exist config.bat echo You must copy CONFIG.B to CONFIG.BAT and edit it to reflect your setup!
|
|
|
|
if not exist config.bat goto abort
|
2001-11-14 00:36:45 +01:00
|
|
|
|
2004-03-27 13:13:10 +01:00
|
|
|
call config.bat
|
2004-07-09 04:16:31 +02:00
|
|
|
if "%LAST%" == "" goto noenv
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
:-----------------------------------------------------------------------
|
|
|
|
:- following is command line handling
|
|
|
|
:- options on the commandline overwrite default settings
|
|
|
|
:-----------------------------------------------------------------------
|
2001-11-04 20:47:39 +01:00
|
|
|
|
|
|
|
:loop_commandline
|
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
if "%1" == "fat32" set XFAT=32
|
|
|
|
if "%1" == "fat16" set XFAT=16
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-07-09 04:16:31 +02:00
|
|
|
if "%1" == "msc" set COMPILER=MSC
|
2004-03-27 02:42:33 +01:00
|
|
|
if "%1" == "wc" set COMPILER=WATCOM
|
2004-07-09 04:16:31 +02:00
|
|
|
if "%1" == "tc" set COMPILER=TC
|
|
|
|
if "%1" == "tcpp" set COMPILER=TCPP
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
if "%1" == "86" set XCPU=86
|
|
|
|
if "%1" == "186" set XCPU=186
|
|
|
|
if "%1" == "386" set XCPU=386
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-07-25 11:55:58 +02:00
|
|
|
if "%1" == "debug" set ALLCFLAGS=%ALLCFLAGS% -DDEBUG
|
|
|
|
if "%1" == "lfnapi" set ALLCFLAGS=%ALLCFLAGS% -DWITHLFNAPI
|
|
|
|
|
2001-11-04 20:47:39 +01:00
|
|
|
shift
|
2004-03-27 02:42:33 +01:00
|
|
|
if not "%1" == "" goto loop_commandline
|
2002-01-23 23:29:41 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
if "%COMPILER%" == "" echo you MUST define a COMPILER variable in CONFIG.BAT
|
|
|
|
if "%COMPILER%" == "" goto abort
|
2002-01-23 23:29:41 +01:00
|
|
|
|
2004-07-09 04:16:31 +02:00
|
|
|
call defaults.bat
|
|
|
|
if "%LAST%" == "" goto noenv
|
2002-01-23 23:29:41 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
:-----------------------------------------------------------------------
|
|
|
|
:- finally - we are going to compile
|
|
|
|
:-----------------------------------------------------------------------
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
echo.
|
|
|
|
echo Process UTILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
echo.
|
2001-11-04 20:47:39 +01:00
|
|
|
cd utils
|
2004-07-09 04:16:31 +02:00
|
|
|
call %MAKE% all
|
2004-03-27 02:42:33 +01:00
|
|
|
if errorlevel 1 goto abort-cd
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
echo.
|
|
|
|
echo Process LIB ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
echo.
|
2001-11-04 20:47:39 +01:00
|
|
|
cd ..\lib
|
2004-07-09 04:16:31 +02:00
|
|
|
call %MAKE% all
|
2004-03-27 02:42:33 +01:00
|
|
|
if errorlevel 1 goto abort-cd
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
echo.
|
|
|
|
echo Process DRIVERS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
echo.
|
2000-05-06 21:34:20 +02:00
|
|
|
cd ..\drivers
|
2004-07-09 04:16:31 +02:00
|
|
|
call %MAKE% all
|
2004-03-27 02:42:33 +01:00
|
|
|
if errorlevel 1 goto abort-cd
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
echo.
|
|
|
|
echo Process BOOT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
echo.
|
2000-05-06 21:34:20 +02:00
|
|
|
cd ..\boot
|
2004-07-09 04:16:31 +02:00
|
|
|
call %MAKE% all
|
2004-03-27 02:42:33 +01:00
|
|
|
if errorlevel 1 goto abort-cd
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
echo.
|
|
|
|
echo Process SYS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
echo.
|
2000-05-06 21:34:20 +02:00
|
|
|
cd ..\sys
|
2004-07-09 04:16:31 +02:00
|
|
|
call %MAKE% all
|
2004-03-27 02:42:33 +01:00
|
|
|
if errorlevel 1 goto abort-cd
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
echo.
|
|
|
|
echo Process KERNEL +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
echo.
|
2000-05-06 21:34:20 +02:00
|
|
|
cd ..\kernel
|
2004-07-09 04:16:31 +02:00
|
|
|
call %MAKE% all
|
2004-03-27 02:42:33 +01:00
|
|
|
if errorlevel 1 goto abort-cd
|
2001-07-10 00:19:33 +02:00
|
|
|
|
2002-02-03 23:40:24 +01:00
|
|
|
cd ..
|
2001-07-10 00:19:33 +02:00
|
|
|
|
2004-07-09 04:16:31 +02:00
|
|
|
:- if you like, put finalizing commands (like copy to floppy) into build2.bat
|
|
|
|
|
|
|
|
set XERROR=
|
2001-07-10 00:19:33 +02:00
|
|
|
|
2004-07-09 04:16:31 +02:00
|
|
|
if exist build2.bat call build2.bat
|
2001-07-10 00:19:33 +02:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
echo.
|
|
|
|
echo Processing is done.
|
|
|
|
goto end
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
:-----------------------------------------------------------------------
|
|
|
|
|
2004-07-09 04:16:31 +02:00
|
|
|
:noenv
|
2004-07-11 10:36:25 +02:00
|
|
|
echo Unable to set necessary environment variables!
|
2004-07-25 11:55:58 +02:00
|
|
|
goto abort
|
|
|
|
|
|
|
|
:abort-cd
|
|
|
|
cd ..
|
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
:abort
|
|
|
|
echo Compilation was aborted!
|
2001-11-18 00:26:45 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
:end
|
2004-07-09 04:16:31 +02:00
|
|
|
defaults.bat clearset
|