diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8932347 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +* text eol=crlf +*.up -text +*.UP -text diff --git a/MAKEPKGS.BAT b/MAKEPKGS.BAT index c8a67f5..6fa104a 100644 --- a/MAKEPKGS.BAT +++ b/MAKEPKGS.BAT @@ -1,103 +1,103 @@ -@ECHO OFF -IF "%1"=="" GOTO USAGE -REM assumes ran in same directory as this file, ie base of kernel source -SET BASEPATH=%CD% -CD .. - -ECHO create source copy -if EXIST SOURCE RMDIR /S /Q SOURCE > NUL -MKDIR SOURCE -ECHO \.svn>SOURCE\SKIPLIST -ECHO .git>>SOURCE\SKIPLIST -XCOPY %BASEPATH% SOURCE\ke%1 /S /V /I /Q /G /H /R /Y /EXCLUDE:SOURCE\SKIPLIST -DEL SOURCE\SKIPLIST > NUL -ECHO ensuring clean -PUSHD . -CD SOURCE\ke%1 -CALL clobber.bat -POPD -PAUSE - -SET VERSION=%1 -SET LSMRET=SRC -SET LSMFILE=SOURCE\ke%1\docs\fdkernel.lsm -GOTO LSM -:SRC -ECHO zipping source -7z.exe a -tzip -mx9 -mpass15 -r ke%1s.zip SOURCE\* -ECHO creating APPINFO and expected packaging dir structure -ECHO using working configuration file -::COPY trunk\CONFIG.BAT SOURCE\ke%1 > NUL -CD SOURCE\ke%1 - -ECHO build and packaging -SET VERSION=%1 (FAT12/FAT16) -SET FAT=16 -SET BZKRET=F16 -GOTO BZK -:F16 -SET VERSION=%1 (FAT12/FAT16/FAT32) -SET FAT=32 -SET BZKRET=F32 -GOTO BZK -:F32 -ECHO clean up -CD ..\.. -RMDIR /S /Q SOURCE > NUL -ECHO Done. -SET BZKRET= -GOTO DONE - - -:BZK -ECHO build kernel %VERSION% -CALL build.bat /D KERNEL_VERSION /V "%1 " 86 win upx fat%FAT% -DEL BIN\K??86??.sys -SET LSMRET=BZK_2 -SET LSMFILE=docs\fdkernel.lsm -GOTO LSM -:BZK_2 -SET LSMRET= -ECHO zipping FAT%FAT% release version -7z.exe a -tzip -mx9 -mpass15 -r ..\..\ke%1_86f%FAT%.zip BIN\* DOCS\* -ECHO restructuring and zipping update package -DEL BIN\K??86??.* > NUL -MKDIR DOC -MKDIR DOC\KERNEL -COPY DOCS\* DOC\KERNEL\ -MKDIR APPINFO -MOVE DOC\KERNEL\*.lsm APPINFO\ -7z.exe a -tzip -mx9 -mpass15 -r ..\..\kernel%FAT%.zip APPINFO\* BIN\* DOC\* -ECHO cleaning up between builds -CALL clobber.bat -RMDIR /S /Q DOC -RMDIR /S /Q APPINFO -GOTO %BZKRET% - -:LSM -ECHO Begin3>%LSMFILE% -ECHO Title: The FreeDOS Kernel>>%LSMFILE% -ECHO Version: %VERSION%>>%LSMFILE% -ECHO Entered-date: %DATE%>>%LSMFILE% -ECHO Description: The FreeDOS Kernel>>%LSMFILE% -ECHO Keywords: kernel, FreeDOS, DOS, MSDOS>>%LSMFILE% -ECHO Author: (developers: can be reached on the freedos-kernel mailing list)>>%LSMFILE% -ECHO Maintained-by: freedos-kernel@lists.sourceforge.net>>%LSMFILE% -ECHO Primary-site: http://freedos.sourceforge.net/kernel/>>%LSMFILE% -ECHO Alternate-site: http://www.fdos.org/kernel/>>%LSMFILE% -ECHO Alternate-site: https://github.com/PerditionC/fdkernel>>%LSMFILE% -ECHO Alternate-site: https://freedos.svn.sourceforge.net/svnroot/freedos>>%LSMFILE% -ECHO Original-site: http://www.gcfl.net/pub/FreeDOS/kernel>>%LSMFILE% -ECHO Platforms: DOS, FreeDOS, DOSEMU (OpenWatcom C or Turbo C, NASM, UPX)>>%LSMFILE% -ECHO Copying-policy: GPL2>>%LSMFILE% -ECHO End>>%LSMFILE% -SET LSMFILE= -SET VERSION= -GOTO %LSMRET% - -:USAGE -ECHO Build kernel packages (interim builds or release without tagging) - usage: RELEASE {VERSION} e.g. RELEASE 2039 -:DONE -CD %BASEPATH% -SET BASEPATH= - +@ECHO OFF +IF "%1"=="" GOTO USAGE +REM assumes ran in same directory as this file, ie base of kernel source +SET BASEPATH=%CD% +CD .. + +ECHO create source copy +if EXIST SOURCE RMDIR /S /Q SOURCE > NUL +MKDIR SOURCE +ECHO \.svn>SOURCE\SKIPLIST +ECHO .git>>SOURCE\SKIPLIST +XCOPY %BASEPATH% SOURCE\ke%1 /S /V /I /Q /G /H /R /Y /EXCLUDE:SOURCE\SKIPLIST +DEL SOURCE\SKIPLIST > NUL +ECHO ensuring clean +PUSHD . +CD SOURCE\ke%1 +CALL clobber.bat +POPD +PAUSE + +SET VERSION=%1 +SET LSMRET=SRC +SET LSMFILE=SOURCE\ke%1\docs\fdkernel.lsm +GOTO LSM +:SRC +ECHO zipping source +7z.exe a -tzip -mx9 -mpass15 -r ke%1s.zip SOURCE\* +ECHO creating APPINFO and expected packaging dir structure +ECHO using working configuration file +::COPY trunk\CONFIG.BAT SOURCE\ke%1 > NUL +CD SOURCE\ke%1 + +ECHO build and packaging +SET VERSION=%1 (FAT12/FAT16) +SET FAT=16 +SET BZKRET=F16 +GOTO BZK +:F16 +SET VERSION=%1 (FAT12/FAT16/FAT32) +SET FAT=32 +SET BZKRET=F32 +GOTO BZK +:F32 +ECHO clean up +CD ..\.. +RMDIR /S /Q SOURCE > NUL +ECHO Done. +SET BZKRET= +GOTO DONE + + +:BZK +ECHO build kernel %VERSION% +CALL build.bat /D KERNEL_VERSION /V "%1 " 86 win upx fat%FAT% +DEL BIN\K??86??.sys +SET LSMRET=BZK_2 +SET LSMFILE=docs\fdkernel.lsm +GOTO LSM +:BZK_2 +SET LSMRET= +ECHO zipping FAT%FAT% release version +7z.exe a -tzip -mx9 -mpass15 -r ..\..\ke%1_86f%FAT%.zip BIN\* DOCS\* +ECHO restructuring and zipping update package +DEL BIN\K??86??.* > NUL +MKDIR DOC +MKDIR DOC\KERNEL +COPY DOCS\* DOC\KERNEL\ +MKDIR APPINFO +MOVE DOC\KERNEL\*.lsm APPINFO\ +7z.exe a -tzip -mx9 -mpass15 -r ..\..\kernel%FAT%.zip APPINFO\* BIN\* DOC\* +ECHO cleaning up between builds +CALL clobber.bat +RMDIR /S /Q DOC +RMDIR /S /Q APPINFO +GOTO %BZKRET% + +:LSM +ECHO Begin3>%LSMFILE% +ECHO Title: The FreeDOS Kernel>>%LSMFILE% +ECHO Version: %VERSION%>>%LSMFILE% +ECHO Entered-date: %DATE%>>%LSMFILE% +ECHO Description: The FreeDOS Kernel>>%LSMFILE% +ECHO Keywords: kernel, FreeDOS, DOS, MSDOS>>%LSMFILE% +ECHO Author: (developers: can be reached on the freedos-kernel mailing list)>>%LSMFILE% +ECHO Maintained-by: freedos-kernel@lists.sourceforge.net>>%LSMFILE% +ECHO Primary-site: http://freedos.sourceforge.net/kernel/>>%LSMFILE% +ECHO Alternate-site: http://www.fdos.org/kernel/>>%LSMFILE% +ECHO Alternate-site: https://github.com/PerditionC/fdkernel>>%LSMFILE% +ECHO Alternate-site: https://freedos.svn.sourceforge.net/svnroot/freedos>>%LSMFILE% +ECHO Original-site: http://www.gcfl.net/pub/FreeDOS/kernel>>%LSMFILE% +ECHO Platforms: DOS, FreeDOS, DOSEMU (OpenWatcom C or Turbo C, NASM, UPX)>>%LSMFILE% +ECHO Copying-policy: GPL2>>%LSMFILE% +ECHO End>>%LSMFILE% +SET LSMFILE= +SET VERSION= +GOTO %LSMRET% + +:USAGE +ECHO Build kernel packages (interim builds or release without tagging) - usage: RELEASE {VERSION} e.g. RELEASE 2039 +:DONE +CD %BASEPATH% +SET BASEPATH= + diff --git a/RELEASE.BAT b/RELEASE.BAT index cb97580..1f15720 100644 --- a/RELEASE.BAT +++ b/RELEASE.BAT @@ -1,92 +1,92 @@ -@ECHO OFF -IF "%1"=="" GOTO USAGE -REM goto to just below trunk and tags directory, assume ran in trunk directory -CD .. - -ECHO tag SVN with release version - svn copy trunk/ tags/ke%1 -svn copy https://freedos.svn.sourceforge.net/svnroot/freedos/kernel/trunk/ https://freedos.svn.sourceforge.net/svnroot/freedos/kernel/tags/ke%1 -m "Tag kernel release %1" -PAUSE -ECHO svn export to get clean tree -if EXIST SOURCE RMDIR /S /Q SOURCE > NUL -svn export https://freedos.svn.sourceforge.net/svnroot/freedos/kernel/tags/ke%1 SOURCE\ke%1 -REM svn export https://freedos.svn.sourceforge.net/svnroot/freedos/kernel/trunk SOURCE\ke%1 - -SET VERSION=%1 -SET LSMRET=SRC -SET LSMFILE=SOURCE\ke%1\docs\fdkernel.lsm -GOTO LSM -:SRC -ECHO zipping source -7z.exe a -tzip -mx9 -mpass15 -r ke%1s.zip SOURCE\* -ECHO creating APPINFO and expected packaging dir structure -ECHO using working configuration file -COPY trunk\CONFIG.BAT SOURCE\ke%1 > NUL -CD SOURCE\ke%1 - -ECHO build and packaging -SET VERSION=%1 (FAT12/FAT16) -SET FAT=16 -SET BZKRET=F16 -GOTO BZK -:F16 -SET VERSION=%1 (FAT12/FAT16/FAT32) -SET FAT=32 -SET BZKRET=F32 -GOTO BZK -:F32 -ECHO clean up -CD ..\.. -RMDIR /S /Q SOURCE > NUL -ECHO Done. -SET BZKRET= -GOTO DONE - - -:BZK -ECHO build kernel %VERSION% -CALL build.bat /D KERNEL_VERSION /V "%1 " 86 upx fat%FAT% -DEL BIN\K??86??.sys -SET LSMRET=BZK_2 -SET LSMFILE=docs\fdkernel.lsm -GOTO LSM -:BZK_2 -SET LSMRET= -ECHO zipping FAT%FAT% release version -7z.exe a -tzip -mx9 -mpass15 -r ..\..\ke%1_86f%FAT%.zip BIN\* DOCS\* -ECHO restructuring and zipping update package -DEL BIN\K??86??.* > NUL -MKDIR DOC -MKDIR DOC\KERNEL -COPY DOCS\* DOC\KERNEL\ -MKDIR APPINFO -MOVE DOC\KERNEL\*.lsm APPINFO\ -7z.exe a -tzip -mx9 -mpass15 -r ..\..\kernel%FAT%.zip APPINFO\* BIN\* DOC\* -ECHO cleaning up between builds -CALL clobber.bat -RMDIR /S /Q DOC -RMDIR /S /Q APPINFO -GOTO %BZKRET% - -:LSM -ECHO Begin3>%LSMFILE% -ECHO Title: The FreeDOS Kernel>>%LSMFILE% -ECHO Version: %VERSION%>>%LSMFILE% -ECHO Entered-date: %DATE%>>%LSMFILE% -ECHO Description: The FreeDOS Kernel>>%LSMFILE% -ECHO Keywords: kernel, FreeDOS, DOS, MSDOS>>%LSMFILE% -ECHO Author: (developers: can be reached on the freedos-kernel mailing list)>>%LSMFILE% -ECHO Maintained-by: freedos-kernel@lists.sourceforge.net>>%LSMFILE% -ECHO Primary-site: http://freedos.sourceforge.net/kernel/>>%LSMFILE% -ECHO Alternate-site: http://www.fdos.org/kernel/>>%LSMFILE% -ECHO Alternate-site: https://freedos.svn.sourceforge.net/svnroot/freedos>>%LSMFILE% -ECHO Original-site: http://www.gcfl.net/pub/FreeDOS/kernel>>%LSMFILE% -ECHO Platforms: DOS, FreeDOS, DOSEMU (OpenWatcom C or Turbo C, NASM, UPX)>>%LSMFILE% -ECHO Copying-policy: GPL2>>%LSMFILE% -ECHO End>>%LSMFILE% -SET LSMFILE= -SET VERSION= -GOTO %LSMRET% - -:USAGE -ECHO Tag and build release kernels - usage: RELEASE {VERSION} e.g. RELEASE 2039 -:DONE +@ECHO OFF +IF "%1"=="" GOTO USAGE +REM goto to just below trunk and tags directory, assume ran in trunk directory +CD .. + +ECHO tag SVN with release version - svn copy trunk/ tags/ke%1 +svn copy https://freedos.svn.sourceforge.net/svnroot/freedos/kernel/trunk/ https://freedos.svn.sourceforge.net/svnroot/freedos/kernel/tags/ke%1 -m "Tag kernel release %1" +PAUSE +ECHO svn export to get clean tree +if EXIST SOURCE RMDIR /S /Q SOURCE > NUL +svn export https://freedos.svn.sourceforge.net/svnroot/freedos/kernel/tags/ke%1 SOURCE\ke%1 +REM svn export https://freedos.svn.sourceforge.net/svnroot/freedos/kernel/trunk SOURCE\ke%1 + +SET VERSION=%1 +SET LSMRET=SRC +SET LSMFILE=SOURCE\ke%1\docs\fdkernel.lsm +GOTO LSM +:SRC +ECHO zipping source +7z.exe a -tzip -mx9 -mpass15 -r ke%1s.zip SOURCE\* +ECHO creating APPINFO and expected packaging dir structure +ECHO using working configuration file +COPY trunk\CONFIG.BAT SOURCE\ke%1 > NUL +CD SOURCE\ke%1 + +ECHO build and packaging +SET VERSION=%1 (FAT12/FAT16) +SET FAT=16 +SET BZKRET=F16 +GOTO BZK +:F16 +SET VERSION=%1 (FAT12/FAT16/FAT32) +SET FAT=32 +SET BZKRET=F32 +GOTO BZK +:F32 +ECHO clean up +CD ..\.. +RMDIR /S /Q SOURCE > NUL +ECHO Done. +SET BZKRET= +GOTO DONE + + +:BZK +ECHO build kernel %VERSION% +CALL build.bat /D KERNEL_VERSION /V "%1 " 86 upx fat%FAT% +DEL BIN\K??86??.sys +SET LSMRET=BZK_2 +SET LSMFILE=docs\fdkernel.lsm +GOTO LSM +:BZK_2 +SET LSMRET= +ECHO zipping FAT%FAT% release version +7z.exe a -tzip -mx9 -mpass15 -r ..\..\ke%1_86f%FAT%.zip BIN\* DOCS\* +ECHO restructuring and zipping update package +DEL BIN\K??86??.* > NUL +MKDIR DOC +MKDIR DOC\KERNEL +COPY DOCS\* DOC\KERNEL\ +MKDIR APPINFO +MOVE DOC\KERNEL\*.lsm APPINFO\ +7z.exe a -tzip -mx9 -mpass15 -r ..\..\kernel%FAT%.zip APPINFO\* BIN\* DOC\* +ECHO cleaning up between builds +CALL clobber.bat +RMDIR /S /Q DOC +RMDIR /S /Q APPINFO +GOTO %BZKRET% + +:LSM +ECHO Begin3>%LSMFILE% +ECHO Title: The FreeDOS Kernel>>%LSMFILE% +ECHO Version: %VERSION%>>%LSMFILE% +ECHO Entered-date: %DATE%>>%LSMFILE% +ECHO Description: The FreeDOS Kernel>>%LSMFILE% +ECHO Keywords: kernel, FreeDOS, DOS, MSDOS>>%LSMFILE% +ECHO Author: (developers: can be reached on the freedos-kernel mailing list)>>%LSMFILE% +ECHO Maintained-by: freedos-kernel@lists.sourceforge.net>>%LSMFILE% +ECHO Primary-site: http://freedos.sourceforge.net/kernel/>>%LSMFILE% +ECHO Alternate-site: http://www.fdos.org/kernel/>>%LSMFILE% +ECHO Alternate-site: https://freedos.svn.sourceforge.net/svnroot/freedos>>%LSMFILE% +ECHO Original-site: http://www.gcfl.net/pub/FreeDOS/kernel>>%LSMFILE% +ECHO Platforms: DOS, FreeDOS, DOSEMU (OpenWatcom C or Turbo C, NASM, UPX)>>%LSMFILE% +ECHO Copying-policy: GPL2>>%LSMFILE% +ECHO End>>%LSMFILE% +SET LSMFILE= +SET VERSION= +GOTO %LSMRET% + +:USAGE +ECHO Tag and build release kernels - usage: RELEASE {VERSION} e.g. RELEASE 2039 +:DONE diff --git a/bin/autoexec.bat b/bin/autoexec.bat index 87c9305..54f3e64 100644 --- a/bin/autoexec.bat +++ b/bin/autoexec.bat @@ -1,3 +1,3 @@ -@echo off -echo Welcome to FreeDOS (http://www.freedos.org)! -path=a:\ +@echo off +echo Welcome to FreeDOS (http://www.freedos.org)! +path=a:\ diff --git a/bin/install.bat b/bin/install.bat index ea04766..259d09b 100644 --- a/bin/install.bat +++ b/bin/install.bat @@ -1,36 +1,36 @@ -@echo off -rem -rem Create a distribution floppy -rem -rem $Header$ - -set D=A: -if "%1" == "b:" set D=B: -if "%1" == "B:" set D=B: -if "%1" == "b" set D=B: -if "%1" == "B" set D=B: - -echo This utility will create a distribution floppy on the disk in drive %D% -pause - -rem try to transfer system files -- abort if it cannot. -sys %D% -if errorlevel 1 goto out - -rem copy remaining files -echo copying remaining files... -echo copying autoexec.bat... -copy autoexec.bat %D% -echo copying config.sys.. -copy config.sys %D% -echo copying sys.com.. -copy sys.com %D% -label %D% freedos - -rem exit methods -goto done -:out -echo Floppy creation aborted -:done -set D= - +@echo off +rem +rem Create a distribution floppy +rem +rem $Header$ + +set D=A: +if "%1" == "b:" set D=B: +if "%1" == "B:" set D=B: +if "%1" == "b" set D=B: +if "%1" == "B" set D=B: + +echo This utility will create a distribution floppy on the disk in drive %D% +pause + +rem try to transfer system files -- abort if it cannot. +sys %D% +if errorlevel 1 goto out + +rem copy remaining files +echo copying remaining files... +echo copying autoexec.bat... +copy autoexec.bat %D% +echo copying config.sys.. +copy config.sys %D% +echo copying sys.com.. +copy sys.com %D% +label %D% freedos + +rem exit methods +goto done +:out +echo Floppy creation aborted +:done +set D= + diff --git a/build.bat b/build.bat index d9f5459..a03eb94 100644 --- a/build.bat +++ b/build.bat @@ -1,178 +1,178 @@ -rem @echo off -rem batch file to build everything -rem IF NOTHING COMPILES, CHECK IF YOUR CVS CHECKOUT USES CORRECT DOS LINEBREAKS - -if NOT "%1" == "/?" goto start -echo ":-----------------------------------------------------------------------" -echo ":- Syntax: BUILD [-r] [fat32|fat16] [msc|wc|tc|tcpp|bc] [86|186|386] " -echo ":- [debug] [lfnapi] [/L #] [/D value] [list] [upx] [win] " -echo ":- option case is significant !! " -echo ":- Note: Open Watcom (wc) is the preferred compiler " -echo ":-----------------------------------------------------------------------" -goto end - -:start - -:- assume an error until successful build -set XERROR=1 -if "%XERROR%" == "" goto noenv - -if "%1" == "-r" call clobber.bat -if "%1" == "-r" shift - -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 - -call config.bat -:-if "%LAST%" == "" goto noenv -set dos4g=quiet - -:----------------------------------------------------------------------- -:- following is command line handling -:- options on the commandline overwrite default settings -:----------------------------------------------------------------------- - -:loop_commandline - -if "%1" == "fat32" set XFAT=32 -if "%1" == "fat16" set XFAT=16 - -if "%1" == "msc" set COMPILER=MSCL8 -if "%1" == "wc" set COMPILER=WATCOM -if "%1" == "tc" set COMPILER=TC2 -if "%1" == "tcpp" set COMPILER=TURBOCPP -if "%1" == "bc" set COMPILER=BC - -if "%1" == "86" set XCPU=86 -if "%1" == "186" set XCPU=186 -if "%1" == "386" set XCPU=386 -if "%1" == "x86" goto setCPU - -if "%1" == "upx" set XUPX=upx --8086 --best - -if "%1" == "debug" set ALLCFLAGS=%ALLCFLAGS% -DDEBUG -if "%1" == "lfnapi" set ALLCFLAGS=%ALLCFLAGS% -DWITHLFNAPI - -if "%1" == "win" set ALLCFLAGS=%ALLCFLAGS% -DWIN31SUPPORT -if "%1" == "win" set NASMFLAGS=%NASMFLAGS% -DWIN31SUPPORT - -if "%1" == "list" set NASMFLAGS=%NASMFLAGS% -l$*.lst - -if "%1" == "/L" goto setLoadSeg -if "%1" == "/D" goto setDefine - -:nextOption -shift -if not "%1" == "" goto loop_commandline - -call default.bat -:-if "%LAST%" == "" goto noenv - -:----------------------------------------------------------------------- -:- finally - we are going to compile -:----------------------------------------------------------------------- - -echo USING OPTIONS of C=[%ALLCFLAGS%] ASM=[%NASMFLAGS%] - -echo. -echo Process UTILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -echo. -cd utils -%MAKE% production -if errorlevel 1 goto abort-cd - -echo. -echo Process LIB ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -echo. -cd ..\lib -%MAKE% -if errorlevel 1 goto abort-cd - -echo. -echo Process DRIVERS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -echo. -cd ..\drivers -%MAKE% production -if errorlevel 1 goto abort-cd - -echo. -echo Process BOOT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -echo. -cd ..\boot -%MAKE% production -if errorlevel 1 goto abort-cd - -echo. -echo Process SYS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -echo. -cd ..\sys -%MAKE% production -if errorlevel 1 goto abort-cd -if NOT "%XUPX%" == "" %XUPX% ..\bin\sys.com - -echo. -echo Process KERNEL +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -echo. -cd ..\kernel -%MAKE% production -if errorlevel 1 goto abort-cd - -cd .. - -set XERROR= - -:- if you like, put finalizing commands (like copy to floppy) into build2.bat -if exist build2.bat call build2.bat - -echo. -echo Processing is done. -goto end - -:----------------------------------------------------------------------- - -:setLoadSeg -shift -if "%1" == "" echo you MUST specify load segment eg 0x60 with /L option -if "%1" == "" goto abort -set LOADSEG=%1 -goto nextOption - -:setCPU -shift -if "%1" == "" echo you MUST specify compiler's cpu cmd line argument, eg -5 -if "%1" == "" goto abort -set XCPU_EX=%1 -goto nextOption - -:setDefine -shift -:- Give extra compiler DEFINE flags here -if "%1" == "" echo you MUST specify value to define with /D option -if "%1" == "" echo such as /D DEBUG : extra DEBUG output -if "%1" == "" echo or /D DOSEMU : printf output goes to dosemu log -if "%1" == "" echo or /D WIN31SUPPORT : enable Win 3.x hooks -if "%1" == "" goto abort -if "%2" == "/V" goto :setDefineWithValue -set ALLCFLAGS=%ALLCFLAGS% -D%1 -set NASMFLAGS=%NASMFLAGS% -D%1 -goto nextOption - -:setDefineWithValue -set ALLCFLAGS=%ALLCFLAGS% -D%1=%3 -set NASMFLAGS=%NASMFLAGS% -D%1=%3 -shift -shift -goto nextOption - -:noenv -echo Unable to set necessary environment variables! -goto abort - -:abort-cd -cd .. - -:abort -echo Compilation was aborted! - -:end -call default.bat clearset +rem @echo off +rem batch file to build everything +rem IF NOTHING COMPILES, CHECK IF YOUR CVS CHECKOUT USES CORRECT DOS LINEBREAKS + +if NOT "%1" == "/?" goto start +echo ":-----------------------------------------------------------------------" +echo ":- Syntax: BUILD [-r] [fat32|fat16] [msc|wc|tc|tcpp|bc] [86|186|386] " +echo ":- [debug] [lfnapi] [/L #] [/D value] [list] [upx] [win] " +echo ":- option case is significant !! " +echo ":- Note: Open Watcom (wc) is the preferred compiler " +echo ":-----------------------------------------------------------------------" +goto end + +:start + +:- assume an error until successful build +set XERROR=1 +if "%XERROR%" == "" goto noenv + +if "%1" == "-r" call clobber.bat +if "%1" == "-r" shift + +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 + +call config.bat +:-if "%LAST%" == "" goto noenv +set dos4g=quiet + +:----------------------------------------------------------------------- +:- following is command line handling +:- options on the commandline overwrite default settings +:----------------------------------------------------------------------- + +:loop_commandline + +if "%1" == "fat32" set XFAT=32 +if "%1" == "fat16" set XFAT=16 + +if "%1" == "msc" set COMPILER=MSCL8 +if "%1" == "wc" set COMPILER=WATCOM +if "%1" == "tc" set COMPILER=TC2 +if "%1" == "tcpp" set COMPILER=TURBOCPP +if "%1" == "bc" set COMPILER=BC + +if "%1" == "86" set XCPU=86 +if "%1" == "186" set XCPU=186 +if "%1" == "386" set XCPU=386 +if "%1" == "x86" goto setCPU + +if "%1" == "upx" set XUPX=upx --8086 --best + +if "%1" == "debug" set ALLCFLAGS=%ALLCFLAGS% -DDEBUG +if "%1" == "lfnapi" set ALLCFLAGS=%ALLCFLAGS% -DWITHLFNAPI + +if "%1" == "win" set ALLCFLAGS=%ALLCFLAGS% -DWIN31SUPPORT +if "%1" == "win" set NASMFLAGS=%NASMFLAGS% -DWIN31SUPPORT + +if "%1" == "list" set NASMFLAGS=%NASMFLAGS% -l$*.lst + +if "%1" == "/L" goto setLoadSeg +if "%1" == "/D" goto setDefine + +:nextOption +shift +if not "%1" == "" goto loop_commandline + +call default.bat +:-if "%LAST%" == "" goto noenv + +:----------------------------------------------------------------------- +:- finally - we are going to compile +:----------------------------------------------------------------------- + +echo USING OPTIONS of C=[%ALLCFLAGS%] ASM=[%NASMFLAGS%] + +echo. +echo Process UTILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +echo. +cd utils +%MAKE% production +if errorlevel 1 goto abort-cd + +echo. +echo Process LIB ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +echo. +cd ..\lib +%MAKE% +if errorlevel 1 goto abort-cd + +echo. +echo Process DRIVERS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +echo. +cd ..\drivers +%MAKE% production +if errorlevel 1 goto abort-cd + +echo. +echo Process BOOT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +echo. +cd ..\boot +%MAKE% production +if errorlevel 1 goto abort-cd + +echo. +echo Process SYS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +echo. +cd ..\sys +%MAKE% production +if errorlevel 1 goto abort-cd +if NOT "%XUPX%" == "" %XUPX% ..\bin\sys.com + +echo. +echo Process KERNEL +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +echo. +cd ..\kernel +%MAKE% production +if errorlevel 1 goto abort-cd + +cd .. + +set XERROR= + +:- if you like, put finalizing commands (like copy to floppy) into build2.bat +if exist build2.bat call build2.bat + +echo. +echo Processing is done. +goto end + +:----------------------------------------------------------------------- + +:setLoadSeg +shift +if "%1" == "" echo you MUST specify load segment eg 0x60 with /L option +if "%1" == "" goto abort +set LOADSEG=%1 +goto nextOption + +:setCPU +shift +if "%1" == "" echo you MUST specify compiler's cpu cmd line argument, eg -5 +if "%1" == "" goto abort +set XCPU_EX=%1 +goto nextOption + +:setDefine +shift +:- Give extra compiler DEFINE flags here +if "%1" == "" echo you MUST specify value to define with /D option +if "%1" == "" echo such as /D DEBUG : extra DEBUG output +if "%1" == "" echo or /D DOSEMU : printf output goes to dosemu log +if "%1" == "" echo or /D WIN31SUPPORT : enable Win 3.x hooks +if "%1" == "" goto abort +if "%2" == "/V" goto :setDefineWithValue +set ALLCFLAGS=%ALLCFLAGS% -D%1 +set NASMFLAGS=%NASMFLAGS% -D%1 +goto nextOption + +:setDefineWithValue +set ALLCFLAGS=%ALLCFLAGS% -D%1=%3 +set NASMFLAGS=%NASMFLAGS% -D%1=%3 +shift +shift +goto nextOption + +:noenv +echo Unable to set necessary environment variables! +goto abort + +:abort-cd +cd .. + +:abort +echo Compilation was aborted! + +:end +call default.bat clearset diff --git a/buildall.bat b/buildall.bat index 4422b30..61356d5 100644 --- a/buildall.bat +++ b/buildall.bat @@ -1,110 +1,110 @@ -@echo off -rem IF NOTHING COMPILES, CHECK IF YOUR CVS CHECKOUT USES CORRECT DOS LINEBREAKS - -:- $Id: buildall.bat 1305 2006-10-31 21:13:02Z bartoldeman $ - -:---------------------------------------------------------- -:- batch file to build _many_ KERNELS, hope build works. -:- takes 3 minutes on my(TE) Win2K/P700. your milage may vary :-) -:---------------------------------------------------------- - -if "%1" == "$SUMMARY" goto summary - -set onerror=if not "%XERROR%" == "" goto daswarwohlnix - -:***** MSCL kernels - -call config.bat -set dos4g=quiet - -if "%MS_BASE%" == "" goto no_ms -call build -r msc 386 fat16 -%ONERROR% -call build -r msc 186 fat16 -%ONERROR% -call build -r msc 86 fat16 -%ONERROR% -call build -r msc 386 fat32 -%ONERROR% -call build -r msc 186 fat32 -%ONERROR% -call build -r msc 86 fat32 -%ONERROR% -:no_ms - -:***** TC 2.01 kernels - -if "%TC2_BASE%" == "" goto no_tc -call build -r tc 186 fat16 -%ONERROR% -call build -r tc 86 fat16 -%ONERROR% -call build -r tc 186 fat32 -%ONERROR% -call build -r tc 86 fat32 -%ONERROR% -:no_tc - -:***** (Open) Watcom kernels - -if not "%COMPILER%" == "WATCOM" goto no_wc -call build -r wc 386 fat32 -%ONERROR% -call build -r wc 386 fat16 -%ONERROR% -call build -r wc 86 fat32 -%ONERROR% -call build -r wc 86 fat16 -%ONERROR% -:no_wc - -:***** now rebuild the default kernel - -call build -r - -:************************************************************** -:* now we build a summary of all kernels HMA size + total size -:* Yes, I know - "mit Linux waer das nicht passiert" :-) -:* at least, it's possible with standard DOS tools -:************************************************************** - -set Sumfile=bin\ksummary.txt -set TempSumfile=bin\tsummary.txt - -:****echo >%TempSumfile% Summary of all kernels build -:****echo.|date >>%TempSumfile% -:****echo.|time >>%TempSumfile% -:****for %%i in (bin\k*.map) do call %0 $SUMMARY %%i - -if exist %Sumfile% del %Sumfile% -if exist %TempSumfile% del %TempSumfile% ->ktemp.bat -for %%i in (bin\k*.map) do echo call %0 $SUMMARY %%i >>ktemp.bat -sort ktemps.bat -call ktemps.bat -del ktemp.bat -del ktemps.bat - -echo >>%Sumfile% Summary of all kernels build -echo.|date >>%Sumfile% -echo.|time >>%Sumfile% -find <%TempSumfile% "H" >>%Sumfile% -del %TempSumfile% - -set TempSumfile= -set Sumfile= -goto end - -:summary -echo H************************************************* %2 >>%TempSumfile% -find<%2 " HMA_TEXT"|find/V "HMA_TEXT_START"|find/V "HMA_TEXT_END">>%TempSumfile% -find<%2 " STACK">>%TempSumfile% -goto end - -:************* done with summary ********************************* - -:daswarwohlnix -echo Sorry, something didn't work as expected :-( -set ONERROR= - -:end +@echo off +rem IF NOTHING COMPILES, CHECK IF YOUR CVS CHECKOUT USES CORRECT DOS LINEBREAKS + +:- $Id: buildall.bat 1305 2006-10-31 21:13:02Z bartoldeman $ + +:---------------------------------------------------------- +:- batch file to build _many_ KERNELS, hope build works. +:- takes 3 minutes on my(TE) Win2K/P700. your milage may vary :-) +:---------------------------------------------------------- + +if "%1" == "$SUMMARY" goto summary + +set onerror=if not "%XERROR%" == "" goto daswarwohlnix + +:***** MSCL kernels + +call config.bat +set dos4g=quiet + +if "%MS_BASE%" == "" goto no_ms +call build -r msc 386 fat16 +%ONERROR% +call build -r msc 186 fat16 +%ONERROR% +call build -r msc 86 fat16 +%ONERROR% +call build -r msc 386 fat32 +%ONERROR% +call build -r msc 186 fat32 +%ONERROR% +call build -r msc 86 fat32 +%ONERROR% +:no_ms + +:***** TC 2.01 kernels + +if "%TC2_BASE%" == "" goto no_tc +call build -r tc 186 fat16 +%ONERROR% +call build -r tc 86 fat16 +%ONERROR% +call build -r tc 186 fat32 +%ONERROR% +call build -r tc 86 fat32 +%ONERROR% +:no_tc + +:***** (Open) Watcom kernels + +if not "%COMPILER%" == "WATCOM" goto no_wc +call build -r wc 386 fat32 +%ONERROR% +call build -r wc 386 fat16 +%ONERROR% +call build -r wc 86 fat32 +%ONERROR% +call build -r wc 86 fat16 +%ONERROR% +:no_wc + +:***** now rebuild the default kernel + +call build -r + +:************************************************************** +:* now we build a summary of all kernels HMA size + total size +:* Yes, I know - "mit Linux waer das nicht passiert" :-) +:* at least, it's possible with standard DOS tools +:************************************************************** + +set Sumfile=bin\ksummary.txt +set TempSumfile=bin\tsummary.txt + +:****echo >%TempSumfile% Summary of all kernels build +:****echo.|date >>%TempSumfile% +:****echo.|time >>%TempSumfile% +:****for %%i in (bin\k*.map) do call %0 $SUMMARY %%i + +if exist %Sumfile% del %Sumfile% +if exist %TempSumfile% del %TempSumfile% +>ktemp.bat +for %%i in (bin\k*.map) do echo call %0 $SUMMARY %%i >>ktemp.bat +sort ktemps.bat +call ktemps.bat +del ktemp.bat +del ktemps.bat + +echo >>%Sumfile% Summary of all kernels build +echo.|date >>%Sumfile% +echo.|time >>%Sumfile% +find <%TempSumfile% "H" >>%Sumfile% +del %TempSumfile% + +set TempSumfile= +set Sumfile= +goto end + +:summary +echo H************************************************* %2 >>%TempSumfile% +find<%2 " HMA_TEXT"|find/V "HMA_TEXT_START"|find/V "HMA_TEXT_END">>%TempSumfile% +find<%2 " STACK">>%TempSumfile% +goto end + +:************* done with summary ********************************* + +:daswarwohlnix +echo Sorry, something didn't work as expected :-( +set ONERROR= + +:end diff --git a/clean.bat b/clean.bat index 0fd3797..d755585 100644 --- a/clean.bat +++ b/clean.bat @@ -1,37 +1,37 @@ -@echo off - -:- batch file to clean everything -:- $Id: clean.bat 1181 2006-05-20 20:45:59Z mceric $ - -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 end - -call config.bat -call default.bat - -cd utils -%MAKE% clean - -cd ..\lib -%MAKE% clean - -cd ..\drivers -%MAKE% clean - -cd ..\boot -%MAKE% clean - -cd ..\sys -%MAKE% clean - -cd ..\kernel -%MAKE% clean - -cd ..\hdr -if exist *.bak del *.bak - -cd .. -if exist *.bak del *.bak - -:end -default.bat clearset +@echo off + +:- batch file to clean everything +:- $Id: clean.bat 1181 2006-05-20 20:45:59Z mceric $ + +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 end + +call config.bat +call default.bat + +cd utils +%MAKE% clean + +cd ..\lib +%MAKE% clean + +cd ..\drivers +%MAKE% clean + +cd ..\boot +%MAKE% clean + +cd ..\sys +%MAKE% clean + +cd ..\kernel +%MAKE% clean + +cd ..\hdr +if exist *.bak del *.bak + +cd .. +if exist *.bak del *.bak + +:end +default.bat clearset diff --git a/clobber.bat b/clobber.bat index 5a8bfb8..1d4b5c7 100644 --- a/clobber.bat +++ b/clobber.bat @@ -1,43 +1,43 @@ -@echo off - -:- batch file to clobber everything -:- $Id: clobber.bat 1181 2006-05-20 20:45:59Z mceric $ - -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 end - -call config.bat -call default.bat - -cd utils -%MAKE% clobber - -cd ..\lib -%MAKE% clobber - -cd ..\drivers -%MAKE% clobber - -cd ..\boot -%MAKE% clobber - -cd ..\sys -%MAKE% clobber - -cd ..\kernel -%MAKE% clobber - -cd ..\hdr -if exist *.bak del *.bak - -cd ..\bin -if exist sys.com del sys.com -if exist country.sys del country.sys - -cd .. -if exist *.bak del *.bak -if exist status.me del status.me - - -:end -default.bat clearset +@echo off + +:- batch file to clobber everything +:- $Id: clobber.bat 1181 2006-05-20 20:45:59Z mceric $ + +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 end + +call config.bat +call default.bat + +cd utils +%MAKE% clobber + +cd ..\lib +%MAKE% clobber + +cd ..\drivers +%MAKE% clobber + +cd ..\boot +%MAKE% clobber + +cd ..\sys +%MAKE% clobber + +cd ..\kernel +%MAKE% clobber + +cd ..\hdr +if exist *.bak del *.bak + +cd ..\bin +if exist sys.com del sys.com +if exist country.sys del country.sys + +cd .. +if exist *.bak del *.bak +if exist status.me del status.me + + +:end +default.bat clearset diff --git a/config.b b/config.b index 655e2c1..f277daa 100644 --- a/config.b +++ b/config.b @@ -1,123 +1,123 @@ -:- -:- batch file that is included in all other batch files for configuration -:- - -:-**************************************************************** -:- NOTICE! You must edit and rename this file to CONFIG.BAT! * -:-**************************************************************** - -:-********************************************************************* -:- determine your compiler settings -:- -:- you have to -:- search for XNASM - and set the path for NASM -:- search for COMPILER - and set your compiler -:- search for ??_BASE - and set the path to your compiler -:- -:-********************************************************************* - -:-********************************************************************** -:-- define NASM executable - remember - it should not be protected -:- mode DJGPP version if you're using Windows NT/2k/XP to compile -:- because DJGPP-nasm crashes when using protected mode Borland's -:- make under Windows NT/2k/XP -:-********************************************************************** - -set XNASM=nasm - -:********************************************************************** -:- define your COMPILER type here, pick one of them -:********************************************************************** - -:- Turbo C 2.01 -:- set COMPILER=TC2 -:- Turbo C++ 1.01 -:- set COMPILER=TURBOCPP -:- Turbo C 3.0 -:- set COMPILER=TC3 -:- Borland C 3.1 -set COMPILER=BC3 -:- Borland C -:- set COMPILER=BC5 -:- Microsoft C -:- set COMPILER=MSCL8 -:- Watcom C -:- set COMPILER=WATCOM - -:-********************************************************************** -:-- where is the BASE dir of your compiler(s) ?? -:-********************************************************************** - -:- set TC2_BASE=c:\tc201 -:- set TP1_BASE=c:\tcpp -:- set TC3_BASE=c:\tc3 -set BC3_BASE=c:\bc -:- set BC5_BASE=c:\bc5 -:- set MS_BASE=c:\msvc - -:- if WATCOM maybe you need to set your WATCOM environment variables -:- and path -:- if not \%WATCOM% == \ goto watcom_defined -:- set WATCOM=c:\watcom -:- set PATH=%PATH%;%WATCOM%\binw -:watcom_defined - -:-********************************************************************** -:- where is UPX and which options to use? -:-********************************************************************** -set XUPX=upx --8086 --best -:- or use set XUPX= -:- if you don't want to use it - -:-********************************************************************** -:- (optionally) which linker to use: -:- (otherwise will be determined automatically) -:- -:- WARNING TLINK needs to be in your PATH! -:-********************************************************************** - -:- Turbo Link -:- set XLINK=tlink /m/c/s/l -:- Microsoft Link -:- set XLINK=d:\qb\link /ma -:- set XLINK=%MS_BASE%\bin\link /ONERROR:NOEXE /ma /nologo -:- WATCOM Link (wlinker is a batch file calling ms2wlink and wlink) -:- set XLINK=..\utils\wlinker /ma /nologo - -:- set path for Turbo Link - use OLDPATH to restore normal path -:- set OLDPATH=%PATH% -:- set PATH=%PATH%;%TC2_BASE% - -:********************************************************************** -:* optionally define your MAKE type here, if not then -:* it will be automatically determined, pick one of them -:* use MS nmake if you want to compile with MSCL -:********************************************************************** - -:- Borland MAKE -:- set MAKE=%TC2_BASE%\make -:- Watcom MAKE in MS mode -:- set MAKE=%WATCOM%\binw\wmake /ms -:- Microsoft MAKE -:- set MAKE=%MS_BASE%\bin\nmake /nologo - -:********************************************************************** -:* select your default target: required CPU and what FAT system to support -:********************************************************************** - -:- set XCPU=86 -:- set XCPU=186 -set XCPU=386 - -:- set XFAT=16 -set XFAT=32 - -:- Give extra compiler DEFINE flags here -:- such as -DDEBUG : extra DEBUG output -:- -DDOSEMU : printf output goes to dosemu log -:- set ALLCFLAGS=-DDEBUG - - -:- -:- $Id: config.b 864 2004-04-11 12:21:25Z bartoldeman $ -:- +:- +:- batch file that is included in all other batch files for configuration +:- + +:-**************************************************************** +:- NOTICE! You must edit and rename this file to CONFIG.BAT! * +:-**************************************************************** + +:-********************************************************************* +:- determine your compiler settings +:- +:- you have to +:- search for XNASM - and set the path for NASM +:- search for COMPILER - and set your compiler +:- search for ??_BASE - and set the path to your compiler +:- +:-********************************************************************* + +:-********************************************************************** +:-- define NASM executable - remember - it should not be protected +:- mode DJGPP version if you're using Windows NT/2k/XP to compile +:- because DJGPP-nasm crashes when using protected mode Borland's +:- make under Windows NT/2k/XP +:-********************************************************************** + +set XNASM=nasm + +:********************************************************************** +:- define your COMPILER type here, pick one of them +:********************************************************************** + +:- Turbo C 2.01 +:- set COMPILER=TC2 +:- Turbo C++ 1.01 +:- set COMPILER=TURBOCPP +:- Turbo C 3.0 +:- set COMPILER=TC3 +:- Borland C 3.1 +set COMPILER=BC3 +:- Borland C +:- set COMPILER=BC5 +:- Microsoft C +:- set COMPILER=MSCL8 +:- Watcom C +:- set COMPILER=WATCOM + +:-********************************************************************** +:-- where is the BASE dir of your compiler(s) ?? +:-********************************************************************** + +:- set TC2_BASE=c:\tc201 +:- set TP1_BASE=c:\tcpp +:- set TC3_BASE=c:\tc3 +set BC3_BASE=c:\bc +:- set BC5_BASE=c:\bc5 +:- set MS_BASE=c:\msvc + +:- if WATCOM maybe you need to set your WATCOM environment variables +:- and path +:- if not \%WATCOM% == \ goto watcom_defined +:- set WATCOM=c:\watcom +:- set PATH=%PATH%;%WATCOM%\binw +:watcom_defined + +:-********************************************************************** +:- where is UPX and which options to use? +:-********************************************************************** +set XUPX=upx --8086 --best +:- or use set XUPX= +:- if you don't want to use it + +:-********************************************************************** +:- (optionally) which linker to use: +:- (otherwise will be determined automatically) +:- +:- WARNING TLINK needs to be in your PATH! +:-********************************************************************** + +:- Turbo Link +:- set XLINK=tlink /m/c/s/l +:- Microsoft Link +:- set XLINK=d:\qb\link /ma +:- set XLINK=%MS_BASE%\bin\link /ONERROR:NOEXE /ma /nologo +:- WATCOM Link (wlinker is a batch file calling ms2wlink and wlink) +:- set XLINK=..\utils\wlinker /ma /nologo + +:- set path for Turbo Link - use OLDPATH to restore normal path +:- set OLDPATH=%PATH% +:- set PATH=%PATH%;%TC2_BASE% + +:********************************************************************** +:* optionally define your MAKE type here, if not then +:* it will be automatically determined, pick one of them +:* use MS nmake if you want to compile with MSCL +:********************************************************************** + +:- Borland MAKE +:- set MAKE=%TC2_BASE%\make +:- Watcom MAKE in MS mode +:- set MAKE=%WATCOM%\binw\wmake /ms +:- Microsoft MAKE +:- set MAKE=%MS_BASE%\bin\nmake /nologo + +:********************************************************************** +:* select your default target: required CPU and what FAT system to support +:********************************************************************** + +:- set XCPU=86 +:- set XCPU=186 +set XCPU=386 + +:- set XFAT=16 +set XFAT=32 + +:- Give extra compiler DEFINE flags here +:- such as -DDEBUG : extra DEBUG output +:- -DDOSEMU : printf output goes to dosemu log +:- set ALLCFLAGS=-DDEBUG + + +:- +:- $Id: config.b 864 2004-04-11 12:21:25Z bartoldeman $ +:- diff --git a/default.bat b/default.bat index b7fe75d..845c832 100644 --- a/default.bat +++ b/default.bat @@ -1,85 +1,85 @@ -@echo off -:- $Id: default.bat 1482 2009-07-11 16:59:43Z perditionc $ - -:- with option clearset, clears all config.bat-made environment variables -:- without options, MAKE / LINK / ... are set to defaults based on COMPILER ... - -if "%1" == "clearset" goto clearset - -:----------------------------------------------------------------------- - -if not "%COMPILER%" == "" goto skip_cc - -set COMPILER=WATCOM - -echo No compiler specified, defaulting to Open Watcom - -:skip_cc - -:----------------------------------------------------------------------- - -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%" == "BC3" set MAKE=%BC3_BASE%\bin\make -if "%COMPILER%" == "BC5" set MAKE=%BC5_BASE%\bin\make -if "%COMPILER%" == "WATCOM" set MAKE=wmake /ms /h -if "%COMPILER%" == "MSCL8" set MAKE=%MS_BASE%\bin\nmake /nologo - -echo Make is %MAKE%. - -:skip_make - -:----------------------------------------------------------------------- - -if not "%XLINK%" == "" goto skip_xlink - -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%" == "BC3" set XLINK=%BC3_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 - -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= -set ALLCFLAGS= -set CFLAGS= -set XCPU= -set XCPU_EX= -set XFAT= -set XLINK= -set TC2_BASE= -set TP1_BASE= -set TC3_BASE= -set BC3_BASE= -set BC5_BASE= -set MS_BASE= -set XNASM= -set NASMFLAGS= -set XUPX= -set UPXOPT= -set LOADSEG= - -:end +@echo off +:- $Id: default.bat 1482 2009-07-11 16:59:43Z perditionc $ + +:- with option clearset, clears all config.bat-made environment variables +:- without options, MAKE / LINK / ... are set to defaults based on COMPILER ... + +if "%1" == "clearset" goto clearset + +:----------------------------------------------------------------------- + +if not "%COMPILER%" == "" goto skip_cc + +set COMPILER=WATCOM + +echo No compiler specified, defaulting to Open Watcom + +:skip_cc + +:----------------------------------------------------------------------- + +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%" == "BC3" set MAKE=%BC3_BASE%\bin\make +if "%COMPILER%" == "BC5" set MAKE=%BC5_BASE%\bin\make +if "%COMPILER%" == "WATCOM" set MAKE=wmake /ms /h +if "%COMPILER%" == "MSCL8" set MAKE=%MS_BASE%\bin\nmake /nologo + +echo Make is %MAKE%. + +:skip_make + +:----------------------------------------------------------------------- + +if not "%XLINK%" == "" goto skip_xlink + +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%" == "BC3" set XLINK=%BC3_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 + +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= +set ALLCFLAGS= +set CFLAGS= +set XCPU= +set XCPU_EX= +set XFAT= +set XLINK= +set TC2_BASE= +set TP1_BASE= +set TC3_BASE= +set BC3_BASE= +set BC5_BASE= +set MS_BASE= +set XNASM= +set NASMFLAGS= +set XUPX= +set UPXOPT= +set LOADSEG= + +:end diff --git a/tests/absread/build.bat b/tests/absread/build.bat index d33930e..3c643e6 100644 --- a/tests/absread/build.bat +++ b/tests/absread/build.bat @@ -1,2 +1,2 @@ -@ECHO OFF -wcl -e3-we-wx-zq-os-s-zp1-mt-bt=DOS absread.c +@ECHO OFF +wcl -e3-we-wx-zq-os-s-zp1-mt-bt=DOS absread.c diff --git a/utils/echoto.bat b/utils/echoto.bat index f9bf118..ec186cc 100644 --- a/utils/echoto.bat +++ b/utils/echoto.bat @@ -1,12 +1,12 @@ -@echo off -set FILE=%1 -set STR=%2 - -:loop -shift -if "%2" == "" goto end -set STR=%STR% %2 -goto loop -:end - -echo %STR%>> %FILE% +@echo off +set FILE=%1 +set STR=%2 + +:loop +shift +if "%2" == "" goto end +set STR=%STR% %2 +goto loop +:end + +echo %STR%>> %FILE% diff --git a/utils/proto.bat b/utils/proto.bat index 569e415..b57c208 100644 --- a/utils/proto.bat +++ b/utils/proto.bat @@ -1 +1 @@ -for %%f in ( %1 %2 %3 %4 %5 %6 %7 %8 %9 ) do mkptypes %%f >>proto.h +for %%f in ( %1 %2 %3 %4 %5 %6 %7 %8 %9 ) do mkptypes %%f >>proto.h diff --git a/utils/rmfiles.bat b/utils/rmfiles.bat index c60c64b..a4a052e 100644 --- a/utils/rmfiles.bat +++ b/utils/rmfiles.bat @@ -1,10 +1,10 @@ -@echo off -:loop_commandline - -if \%1 == \ goto done_with_commandline -if exist %1 del %1>nul -shift -goto loop_commandline - -:done_with_commandline - +@echo off +:loop_commandline + +if \%1 == \ goto done_with_commandline +if exist %1 del %1>nul +shift +goto loop_commandline + +:done_with_commandline + diff --git a/utils/wlinker.bat b/utils/wlinker.bat index 2a602e0..9d25845 100644 --- a/utils/wlinker.bat +++ b/utils/wlinker.bat @@ -1,4 +1,4 @@ -@echo off -ms2wlink %1 %2 %3 %4 %5 %6 %7 %8 %9 ,,,, > kernel.lnk -echo op map,statics,verbose >> kernel.lnk -call wlink @kernel.lnk +@echo off +ms2wlink %1 %2 %3 %4 %5 %6 %7 %8 %9 ,,,, > kernel.lnk +echo op map,statics,verbose >> kernel.lnk +call wlink @kernel.lnk