Hi!

- RMFILES.BAT: for DEL added ">NUL" - under 4DOS/NDOS DEL shows names of
  deleted files.
- removed PROTO.BAT and INDENT.

- all batch files now check if environment is enough; this prevents wrong
  actions in case of small environment.
- DEFAULT.BAT renamed to DEFAULTS.BAT, for all "call <batchfile>" added
  suffix .BAT; this solves compatability problem with 4DOS (where DEFAULT
  is a built-in command).
- CONFIG.B: added possibility to define librarian.
- CONFIG.B: added "MAKER -S" as choice for MAKE.
- CLOBBER.BAT now uses CLEAN.BAT for its job; this eases to update cleaning
  code because no code duplication.

- *.MAK: removed space after "=" in macros definitions; this makes command
  lines shorter.
- common definitions from makefiles moved to GENERIC.MAK (directories) and
  CONFIG.B/DEFAULTS.BAT (LINK, NASM, LIBUTIL, etc).
- GENERIC.MAK: XCPU=86 and XFAT=32 are defined here, if these environment
  doesn't contains these variables; this allows to reduce count of variables
  in environment.

- KERNEL\MAKEFILE: removed unneccessary macroses; rule for KERNEL.RES now
  depends from configuration files, not from object files and libraries
  (this allows to create KERNEL.RES file once, not at each compilation).

PS: Bart! Why you not answer how to handle your patches from FREEDOS-CVS
correctly?!

PPS: mscl8.mak defines INCLUDE and LIB, watcom.mak defines INCLUDE and
EDPATH - are they somewhat useful? MS and Watcom uses environment variables,
but macroses inside makefiles shouldn't affect them.
--- Begin Message ---
diff -ruNp old/build.bat new/build.bat
--- old/build.bat       2004-03-27 01:42:32.000000000 +0000
+++ new/build.bat       2004-03-31 13:26:04.000000000 +0000
@@ -3,18 +3,22 @@
 :- batch file to build everything
 :- $Id$
 
+:-----------------------------------------------------------------------
 :- Syntax: BUILD [-r] [fat32|fat16] [msc|wc|tc|tcpp] [86|186|386]
 :- option case is significant !!
+:-----------------------------------------------------------------------
 
-if "%1" == "-r" call clobber
-if "%1" == "-r" shift
+set XERROR=1
+if "%XERROR%" == "" goto noenv
 
-set XERROR=
+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
+call config.bat
+if "%LAST%" == "" goto noenv
 
 :-----------------------------------------------------------------------
 :- following is command line handling
@@ -41,7 +45,8 @@ if not "%1" == "" goto loop_commandline
 if "%COMPILER%" == "" echo you MUST define a COMPILER variable in CONFIG.BAT
 if "%COMPILER%" == "" goto abort
 
-call default
+call defaults.bat
+if "%LAST%" == "" goto noenv
 
 :-----------------------------------------------------------------------
 :- finally - we are going to compile
@@ -91,10 +96,11 @@ if errorlevel 1 goto abort-cd
 
 cd ..
 
-:- if you like, put some finalizing commands (like copy to floppy)
-:- into build2.bat
+:- if you like, put finalizing commands (like copy to floppy) into build2.bat
+
+set XERROR=
 
-if exist build2.bat call build2
+if exist build2.bat call build2.bat
 
 echo.
 echo Processing is done.
@@ -104,9 +110,9 @@ goto end
 
 :abort-cd
 cd ..
+:noenv
 :abort
 echo Compilation was aborted!
-set XERROR=1
 
 :end
-default clearset
+defaults.bat clearset
diff -ruNp old/buildall.bat new/buildall.bat
--- old/buildall.bat    2004-03-27 01:42:32.000000000 +0000
+++ new/buildall.bat    2004-03-31 13:25:20.000000000 +0000
@@ -3,62 +3,54 @@
 :- $Id$
 
 :----------------------------------------------------------
-:- batch file to build _many_ KERNELS, hope build works
+:- 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
+call config.bat
+if "%LAST%" == "" goto end
 
 :***** MSCL kernels
 
-call config.bat
+if "%MSCL8_BASE%" == "" goto no_ms
+                   call build.bat -r msc 386 fat16
+if "%XERROR%" == "" call build.bat -r msc 186 fat16
+if "%XERROR%" == "" call build.bat -r msc  86 fat16
+if "%XERROR%" == "" call build.bat -r msc 386 fat32
+if "%XERROR%" == "" call build.bat -r msc 186 fat32
+if "%XERROR%" == "" call build.bat -r msc  86 fat32
 
-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%
+if not "%XERROR%" == "" goto daswarwohlnix
 :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%
+                   call build.bat -r tc 186 fat16
+if "%XERROR%" == "" call build.bat -r tc  86 fat16
+if "%XERROR%" == "" call build.bat -r tc 186 fat32
+if "%XERROR%" == "" call build.bat -r tc  86 fat32
+
+if not "%XERROR%" == "" goto daswarwohlnix
 :no_tc
 
 :***** (Open) Watcom kernels
 
 if "%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%
+                   call build.bat -r wc 386 fat32
+if "%XERROR%" == "" call build.bat -r wc 386 fat16
+if "%XERROR%" == "" call build.bat -r wc  86 fat32
+if "%XERROR%" == "" call build.bat -r wc  86 fat16
+
+if not "%XERROR%" == "" goto daswarwohlnix
 :no_wc
     
 :***** now rebuild the default kernel
 
-call build -r
+call build.bat -r
+if not "%XERROR%" == "" goto daswarwohlnix
 
 :**************************************************************
 :* now we build a summary of all kernels HMA size + total size
@@ -79,9 +71,9 @@ if exist %TempSumfile% del %TempSumfile%
 >ktemp.bat
 for %%i in (bin\k*.map) do echo call %0 $SUMMARY %%i >>ktemp.bat
 sort <ktemp.bat >ktemps.bat
-call ktemps
-del ktemp.bat
-del ktemps.bat
+call ktemps.bat
+del ktemp.bat>nul
+del ktemps.bat>nul
 
 echo        >>%Sumfile% Summary of all kernels build
 echo.|date  >>%Sumfile% 
@@ -103,6 +95,5 @@ goto end
 
 :daswarwohlnix
 echo Sorry, something didn't work as expected :-(
-set ONERROR=
 
 :end
diff -ruNp old/clean.bat new/clean.bat
--- old/clean.bat       2004-03-27 01:42:32.000000000 +0000
+++ new/clean.bat       2004-03-31 13:37:14.000000000 +0000
@@ -1,37 +1,45 @@
 @echo off
 
-:- batch file to clean everything
+:- batch file to clean and clobber everything
 :- $Id$
 
+if "%1" == "" %0 clean
+goto %1
+goto end
+
+:clean
+:clobber
 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
-call default
+call config.bat
+if not "%LAST%" == "" call defaults.bat
+if     "%LAST%" == "" goto end
 
 cd utils
-%MAKE% clean
+%MAKE% %1
 
 cd ..\lib
-%MAKE% clean
+%MAKE% %1
 
 cd ..\drivers
-%MAKE% clean
+%MAKE% %1
 
 cd ..\boot
-%MAKE% clean
+%MAKE% %1
 
 cd ..\sys
-%MAKE% clean
+%MAKE% %1
 
 cd ..\kernel
-%MAKE% clean
+%MAKE% %1
 
 cd ..\hdr
 if exist *.bak del *.bak
 
 cd ..
 if exist *.bak del *.bak
+if "%1"=="clobber" if exist status.me del status.me
 
 :end
-default clearset
+defaults.bat clearset
diff -ruNp old/clobber.bat new/clobber.bat
--- old/clobber.bat     2004-03-27 01:42:32.000000000 +0000
+++ new/clobber.bat     2004-03-27 05:43:02.000000000 +0000
@@ -1,38 +1 @@
[EMAIL PROTECTED] off
-
-:- batch file to clobber everything
-:- $Id$
-
-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
-call default
-
-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 ..
-if exist *.bak del *.bak
-if exist status.me del status.me
-
-:end
-default clearset
[EMAIL PROTECTED] clobber
\ No newline at end of file
diff -ruNp old/config.b new/config.b
--- old/config.b        2003-09-15 11:50:58.000000000 +0000
+++ new/config.b        2004-03-31 15:33:04.000000000 +0000
@@ -1,119 +1,127 @@
-:-
[EMAIL PROTECTED] off
+
 :- batch file that is included in all other batch files for configuration
-:-
+:- $Id: config.b,v 1.11 2003/07/19 18:12:26 bartoldeman Exp $
 
-:-****************************************************************
-:-  NOTICE!  You must edit and rename this file to CONFIG.BAT!   *
-:-****************************************************************
+:-----------------------------------------------------------------------
+:- 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
+:- determine compiler(s) settings
 :- 
-:-*********************************************************************
+:- you REQUIRED to
+:-   search for NASM     - and set the path to NASM
+:-   search for COMPILER - and set the default compiler type
+:-   search for ??_BASE  - and set the path to compiler(s)
+
+set LAST=
+
+:-----------------------------------------------------------------------
+:- define where to find NASM - remember - it should not be protected
+:- mode DJGPP version if you're using Windows NT/2k/XP to compile.
+:- also: DJGPP-nasm crashes when using protected mode Borland's make
 
-:-**********************************************************************
-:-- define where to find NASM - remember - it should not be protected
-:-  mode DJGPP version if you're using Windows NT/2k/XP to compile
-:-  also: DJGPP-nasm crashes when using protected mode Borland's make
-:-**********************************************************************
-
-set XNASM=c:\bin\nasm16
-
-:**********************************************************************
-:- define your COMPILER type here, pick one of them
-:**********************************************************************
+set NASM=c:\bin\nasm16
+
+:-----------------------------------------------------------------------
+:- define COMPILER type here, pick one of them
 
 :- Turbo C 2.01
 set COMPILER=TC2
 :- Turbo C++ 1.01
-:- set COMPILER=TURBOCPP
+::set COMPILER=TURBOCPP
 :- Turbo C 3.0
-:- set COMPILER=TC3
+::set COMPILER=TC3
 :- Borland C
-:- set COMPILER=BC5
+::set COMPILER=BC5
 :- Microsoft C
-:- set COMPILER=MSCL8
+::set COMPILER=MSCL8
 :- Watcom C
-:- set COMPILER=WATCOM
+::set COMPILER=WATCOM
+
+:-----------------------------------------------------------------------
+:- where is the BASE dir of compiler(s).
+:- should be defined for each installed and used compiler.
 
-:-**********************************************************************
-:-- 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 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
+::set TP1_BASE=c:\tcpp
+::set TC3_BASE=c:\tc3
+::set BC5_BASE=c:\bc5
+::set MSCL8_BASE=c:\msvc
+
+:- For Watcom you may need to set WATCOM environment variable and PATH
+::if not "%WATCOM%" == "" goto watcom_defined
+::set WATCOM=%WATCOM%
+::set OLDPATH=%PATH%
+::set PATH=%PATH%;%WATCOM%\binw
 :watcom_defined
 
-:-**********************************************************************
-:- where is UPX and which options to use?
-:-**********************************************************************
+:-----------------------------------------------------------------------
+:- where is UPX and which options to use
+:- (comment this out if you don't want to use it)
+
 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!
-:-**********************************************************************
+:-----------------------------------------------------------------------
+:- define which linker to use OR it will be determined AUTOMATICALLY.
+:- WARNING TLINK needs to be in PATH!
 
 :- Turbo Link
-:- set XLINK=tlink /m/c/s/l
+::set LINK=tlink/m/c/s/l
 :- Microsoft Link
-:- set XLINK=d:\qb\link /ma
-:- set XLINK=%MS_BASE%\bin\link /ONERROR:NOEXE /ma /nologo
+::set LINK=d:\qb\link/ma
+::set LINK=link/ONERROR:NOEXE /ma /nologo
 :- WATCOM Link (wlinker is a batch file calling ms2wlink and wlink)
-:- set XLINK=..\utils\wlinker /ma /nologo
+::set LINK=..\utils\wlinker/ma/nologo
 
 :- set path for Turbo Link - use OLDPATH to restore normal path
-:- set OLDPATH=%PATH%
-:- set PATH=%PATH%;%TC2_BASE%
+::set OLDPATH=%PATH%
+::set PATH=%PATH%;%TC2_BASE%
+
+:-----------------------------------------------------------------------
+:- define which librarian to use OR it will be determined AUTOMATICALLY.
 
-:**********************************************************************
-:* 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
-:**********************************************************************
+:- Turbo Lib
+::set LIBUTIL=tlib
+::set LIBPLUS=+
+::set LIBTERM=
+:- Microsoft Lib
+::set LIBUTIL=lib/nologo
+::set LIBPLUS=+
+::set LIBTERM=;
+:- WATCOM Lib
+::set LIBUTIL=wlib -q 
+::set LIBPLUS=
+::set LIBTERM=
+
+:-----------------------------------------------------------------------
+:- define which MAKE to use OR it will be determined AUTOMATICALLY.
 
 :- Borland MAKE
-:- set MAKE=%TC2_BASE%\make
+::set MAKE=make
+::set MAKE=maker -S
 :- Watcom MAKE in MS mode
-:- set MAKE=%WATCOM%\binw\wmake /ms
+::set MAKE=wmake/ms
 :- Microsoft MAKE
-:- set MAKE=%MS_BASE%\bin\nmake /nologo
+::set MAKE=nmake/nologo
 
-:**********************************************************************
-:* select your default target: required CPU and what FAT system to support
-:**********************************************************************
-
-set XCPU=86
-:- set XCPU=186
-:- set XCPU=386
+:-----------------------------------------------------------------------
+:- select default target: CPU type (default is 86) and
+:- what FAT system (default is 32) to support
+
+::set XCPU=86
+::set XCPU=186
+::set XCPU=386
 
-set XFAT=16
-:- set XFAT=32
+::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
+::set ALLCFLAGS=-DDEBUG
 
+:-----------------------------------------------------------------------
 
-:-
-:- $Id: config.b,v 1.11 2003/07/19 18:12:26 bartoldeman Exp $
-:-
+set LAST=1
+if not "%LAST%" == "1" defaults.bat clearset
diff -ruNp old/default.bat new/default.bat
--- old/default.bat     2004-03-27 05:20:12.000000000 +0000
+++ new/default.bat     1970-01-01 00:00:00.000000000 +0000
@@ -1,66 +0,0 @@
[EMAIL PROTECTED] off
-
-:- $Id: default.bat,v 1.1 2004/03/27 01:42:33 bartoldeman Exp $
-
-if "%1" == "clearset" goto clearset
-
-:-----------------------------------------------------------------------
-
-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
-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%" == "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=
-if     "%XUPX%" == "" set [EMAIL PROTECTED]
-
-goto end
-
-:-----------------------------------------------------------------------
-
-:clearset
-
-if not "%OLDPATH%" == "" set PATH=%OLDPATH%
-if not "%OLDPATH%" == "" set OLDPATH=
-
-set MAKE=
-set COMPILER=
-set XCPU=
-set XFAT=
-set XLINK=
-set TC2_BASE=
-set TP1_BASE=
-set TC3_BASE=
-set BC5_BASE=
-set MS_BASE=
-set XNASM=
-set XUPX=
-set UPXOPT=
-
-:end
diff -ruNp old/defaults.bat new/defaults.bat
--- old/defaults.bat    1970-01-01 00:00:00.000000000 +0000
+++ new/defaults.bat    2004-03-31 13:35:54.000000000 +0000
@@ -0,0 +1,90 @@
[EMAIL PROTECTED] off
+
+:- $Id: defaults.bat,v 1.1 2004/03/27 01:42:33 bartoldeman Exp $
+
+set LAST=
+if "%1" == "clearset" goto clearset
+
+:-----------------------------------------------------------------------
+
+if "%COMPILER%" == "TC2"      set BASE=%TC2_BASE%
+if "%COMPILER%" == "TURBOCPP" set BASE=%TP1_BASE%
+if "%COMPILER%" == "TC3"      set BASE=%TC3_BASE%
+if "%COMPILER%" == "BC5"      set BASE=%BC5_BASE%
+if "%COMPILER%" == "WATCOM"   set BASE=%WATCOM%
+if "%COMPILER%" == "MSCL8"    set BASE=%MSCL8_BASE%
+if "%BASE%"     == ""         goto clearset
+
+:-----------------------------------------------------------------------
+
+if not "%LINK%" == "" goto skip_link
+
+set LINK=%BASE%\bin\tlink/m/c
+if "%COMPILER%" == "TC2"      set LINK=%BASE%\tlink/m/c
+if "%COMPILER%" == "WATCOM"   set LINK=..\utils\wlinker/ma/nologo
+if "%COMPILER%" == "MSCL8"    set LINK=%BASE%\bin\link/ONERROR:NOEXE /ma /nologo
+
+echo Linker is %LINK%
+
+:skip_link
+
+:-----------------------------------------------------------------------
+
+if not "%LIBUTIL%" == "" goto skip_lib
+
+set LIBUTIL=%BASE%\bin\tlib
+set LIBPLUS=+
+set LIBTERM=
+if "%COMPILER%" == "TC2"      set LIBUTIL=%BASE%\tlib
+if "%COMPILER%" == "WATCOM"   set LIBUTIL=wlib -q
+if "%COMPILER%" == "WATCOM"   set LIBPLUS=
+if "%COMPILER%" == "MSCL8"    set LIBUTIL=%BASE%\bin\lib/nologo
+if "%COMPILER%" == "MSCL8"    set LIBTERM=;
+
+echo Librarian is %LIBUTIL%
+
+:skip_lib
+
+:-----------------------------------------------------------------------
+
+if not "%MAKE%" == "" goto skip_make
+
+set MAKE=%BASE%\bin\make
+if "%COMPILER%" == "TC2"      set MAKE=%BASE%\make
+if "%COMPILER%" == "WATCOM"   set MAKE=wmake/ms /h
+if "%COMPILER%" == "MSCL8"    set MAKE=%BASE%\bin\nmake/nologo
+
+echo Make is %MAKE%
+
+:skip_make
+
+:-----------------------------------------------------------------------
+
+set LAST=1
+if "%LAST%" == "1" goto end
+
+:-----------------------------------------------------------------------
+
+:clearset
+
+set XCPU=
+set XFAT=
+set COMPILER=
+set TC2_BASE=
+set TP1_BASE=
+set TC3_BASE=
+set BC5_BASE=
+set MSCL8_BASE=
+set BASE=
+set LINK=
+set LIBUTIL=
+set LIBPLUS=
+set LIBTERM=
+set MAKE=
+set NASM=
+set XUPX=
+
+if not "%OLDPATH%" == "" set PATH=%OLDPATH%
+set OLDPATH=
+
+:end
diff -ruNp old/kernel/makefile new/kernel/makefile
--- old/kernel/makefile 2004-01-25 22:37:20.000000000 +0000
+++ new/kernel/makefile 2004-03-31 15:20:06.000000000 +0000
@@ -6,15 +6,7 @@
 
 !include "../mkfiles/generic.mak"
 
-RELEASE = 1.00
-
-# Compiler and Options 
-
-INCLUDE=..\hdr
-LIB=    $(COMPILERBASE)\lib
-
-LIBPATH = .
-#AFLAGS      = /Mx /DSTANDALONE=1 /I..\HDR
+CONFIGURATION=turboc.cfg makefile ..\mkfiles\generic.mak ..\mkfiles\$(COMPILER).mak
 
 LIBS        =..\lib\device.lib ..\lib\libm.lib
 #INITCFLAGS =$(ALLCFLAGS) -zAINIT -zCINIT_TEXT -zDIB -zRID -zTID -zPIGROUP -zBIB \
@@ -35,7 +27,7 @@ OBJS1=kernel.obj entry.obj io.obj consol
 sysclk.obj
 OBJS2=asmsupt.obj execrh.obj nlssupt.obj procsupt.obj dosidle.obj int2f.obj \
 nls_hc.obj
-OBJS3= apisupt.obj intr.obj irqstack.obj blockio.obj chario.obj systime.obj \
+OBJS3=apisupt.obj intr.obj irqstack.obj blockio.obj chario.obj systime.obj \
 error.obj
 OBJS4=break.obj dosfns.obj fatdir.obj fatfs.obj fattab.obj fcbfns.obj \
 inthndlr.obj
@@ -43,7 +35,7 @@ OBJS5=ioctl.obj dosnames.obj memmgr.obj 
 OBJS6=prf.obj misc.obj strings.obj syspack.obj lfnapi.obj
 OBJS7=main.obj config.obj initoem.obj inithma.obj dyninit.obj iprf.obj \
 initdisk.obj initclk.obj
-OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) $(OBJS6) $(OBJS7)
+OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) $(OBJS6) $(OBJS7)
 
 #               *Explicit Rules*
 
@@ -69,7 +61,7 @@ clean:
 
 ECHOTO=..\utils\echoto
 
-kernel.res: $(OBJS) $(LIBS)
+kernel.res: $(CONFIGURATION)
        -$(RM) kernel.res
        $(ECHOTO) kernel.res $(OBJS1)+
        $(ECHOTO) kernel.res $(OBJS2)+
@@ -119,16 +111,13 @@ dosidle.obj: dosidle.asm segs.inc
 # XXX: Special handling for initialization modules -- this is required because
 # TC 2.01 cannot handle `#pragma option' like TC 3 can. -- ror4
 
-INITHEADERS=init-mod.h init-dat.h 
-
-CONFIGURATION = turboc.cfg makefile ..\mkfiles\generic.mak ..\mkfiles\$(COMPILER).MAK
+INITHEADERS=init-mod.h init-dat.h
 
-HEADERS=\
-    $(HDR)portab.h $(HDR)device.h $(HDR)mcb.h $(HDR)pcb.h \
-    $(HDR)fat.h $(HDR)fcb.h $(HDR)tail.h $(HDR)time.h $(HDR)process.h \
-    $(HDR)dcb.h $(HDR)sft.h $(HDR)cds.h $(HDR)exe.h $(HDR)fnode.h     \
-    $(HDR)dirmatch.h $(HDR)file.h $(HDR)clock.h $(HDR)kbd.h $(HDR)error.h  \
-    $(HDR)version.h  globals.h proto.h dyndata.h 
+HEADERS=$(HDR)portab.h $(HDR)device.h $(HDR)mcb.h $(HDR)pcb.h \
+$(HDR)fat.h $(HDR)fcb.h $(HDR)tail.h $(HDR)time.h $(HDR)process.h \
+$(HDR)dcb.h $(HDR)sft.h $(HDR)cds.h $(HDR)exe.h $(HDR)fnode.h \
+$(HDR)dirmatch.h $(HDR)file.h $(HDR)clock.h $(HDR)kbd.h $(HDR)error.h \
+$(HDR)version.h  globals.h proto.h dyndata.h
 
 # XXX: I generated these using `gcc -MM' and `sed', so they may not be
 # completely correct... -- ror4
diff -ruNp old/mkfiles/bc5.mak new/mkfiles/bc5.mak
--- old/mkfiles/bc5.mak 2003-06-15 12:50:06.000000000 +0000
+++ new/mkfiles/bc5.mak 2004-03-27 09:54:58.000000000 +0000
@@ -4,15 +4,8 @@
 
 # Use these for Borland C++
 
-COMPILERPATH=$(BC5_BASE)
-COMPILERBIN=$(COMPILERPATH)\bin
-CC=$(COMPILERBIN)\bcc -c
-CL=$(COMPILERBIN)\bcc
-INCLUDEPATH=$(COMPILERPATH)\include
-LIBUTIL=$(COMPILERBIN)\tlib
-LIBPATH=$(COMPILERPATH)\lib
-LIBTERM=  
-LIBPLUS=+
+CC=$(BINPATH)\bcc -c
+CL=$(BINPATH)\bcc
 
 TINY=-lt
 CFLAGST=-L$(LIBPATH) -mt -a- -k- -f- -ff- -O -Z -d
@@ -22,9 +15,9 @@ TARGET=KBC
 
 # used for building the library
 
-CLIB=$(COMPILERPATH)\lib\cs.lib
+CLIB=$(LIBPATH)\cs.lib
 MATH_EXTRACT=*H_LDIV *H_LLSH *H_LURSH *F_LXMUL
-MATH_INSERT=+H_LDIV +H_LLSH +H_LURSH +F_LXMUL
+MATH_INSERT =+H_LDIV +H_LLSH +H_LURSH +F_LXMUL
 
 #
 # heavy stuff - building the kernel
diff -ruNp old/mkfiles/generic.mak new/mkfiles/generic.mak
--- old/mkfiles/generic.mak     2004-01-25 22:20:34.000000000 +0000
+++ new/mkfiles/generic.mak     2004-03-31 15:00:22.000000000 +0000
@@ -5,43 +5,52 @@
 #* TARGETOPT : options, handled down to the compiler
 #**********************************************************************
 
-TARGETOPT=-1-
+!ifndef XFAT
+XFAT=32
+!endif
+!if $(XFAT) == 32
+ALLCFLAGS=$(ALLCFLAGS) -DWITHFAT32
+NASMFLAGS=$(NASMFLAGS) -DWITHFAT32
+!endif
 
+NASMFLAGS=$(NASMFLAGS) -i../hdr/
+
+TARGETOPT=-1-
+!ifndef XCPU
+XCPU=86
+!endif
 !if $(XCPU) == 186
 TARGETOPT=-1
 !endif
 !if $(XCPU) == 386
 TARGETOPT=-3
+NASMFLAGS=$(NASMFLAGS) -DI386
 !endif
 
-!if $(XFAT) == 32
-ALLCFLAGS=$(ALLCFLAGS) -DWITHFAT32
-NASMFLAGS=$(NASMFLAGS) -DWITHFAT32
-!endif
-
-NASM=$(XNASM)
-!if $(XCPU) == 386
-NASMFLAGS   = $(NASMFLAGS) -i../hdr/ -DI386
+!ifndef XUPX
[EMAIL PROTECTED]
+UPXOPT=
 !else
-NASMFLAGS   = $(NASMFLAGS) -i../hdr/
+UPXOPT=-U
 !endif
-
-LINK=$(XLINK)
-
 [EMAIL PROTECTED]
 
+BINPATH=$(BASE)\bin
+INCLUDEPATH=$(BASE)\include
+LIBPATH=$(BASE)\lib
+
 !include "..\mkfiles\$(COMPILER).mak"
 
 THETARGET=$(TARGET)$(XCPU)$(XFAT)
 RM=..\utils\rmfiles
 
+#               *Implicit Rules*
+
 .asm.obj :
        $(NASM) -D$(COMPILER) $(NASMFLAGS) -f obj $*.asm
 
-#               *Implicit Rules*
 .c.obj :
        $(CC) $(CFLAGS) $*.c
 
 .cpp.obj :
        $(CC) $(CFLAGS) $*.cpp
-
diff -ruNp old/mkfiles/mscl8.mak new/mkfiles/mscl8.mak
--- old/mkfiles/mscl8.mak       2003-08-28 21:37:20.000000000 +0000
+++ new/mkfiles/mscl8.mak       2004-03-27 09:55:04.000000000 +0000
@@ -3,31 +3,19 @@
 #
 
 # Use these for MSCV 1.52
-COMPILERPATH=$(MS_BASE)
-COMPILERBIN=$(COMPILERPATH)\bin
-INCLUDEPATH=$(COMPILERPATH)\include
-CC=$(COMPILERBIN)\cl -c
-CL=$(COMPILERBIN)\cl
+
+CC=$(BINPATH)\cl -c
+CL=$(BINPATH)\cl
+
+INCLUDE=$(BASE)\include
+LIB=$(BASE)\lib
+
 TINY=
 CFLAGST=/Fm /AT /Os /Zp1
 CFLAGSC=/Fm /AL /Os /Zp1
-LIBPATH=$(COMPILERPATH)\lib
-LIB=$(COMPILERPATH)\lib
-INCLUDE=$(COMPILERPATH)\include
-LIBUTIL=$(COMPILERBIN)\lib /nologo
-LIBPLUS=+
-LIBTERM=;
-INCLUDE=$(COMPILERPATH)\include
-LIB=$(COMPILERPATH)\lib
-
-# used for building the library
-
-CLIB=$(COMPILERPATH)\lib\slibce.lib
-MATH_EXTRACT=*aflmul *aFlshl *aFNauldi *aFulrem *aFulshr *aFuldiv *aFlrem *aFldiv
-MATH_INSERT= +aflmul +aFlshl +aFNauldi +aFulrem +aFulshr +aFuldiv +aFlrem +aFldiv
 
 TARGETOPT=
-!if $(XCPU) == 186    
+!if $(XCPU) == 186
 TARGETOPT=-G1
 !endif
 !if $(XCPU) == 386
@@ -36,12 +24,16 @@ TARGETOPT=-G3
 
 TARGET=KMS
 
+# used for building the library
+
+CLIB=$(LIBPATH)\slibce.lib
+MATH_EXTRACT=*aflmul *aFlshl *aFNauldi *aFulrem *aFulshr *aFuldiv *aFlrem *aFldiv
+MATH_INSERT =+aflmul +aFlshl +aFNauldi +aFulrem +aFulshr +aFuldiv +aFlrem +aFldiv
+
 #
 # heavy stuff - building
 
-
 ALLCFLAGS=-I..\hdr $(TARGETOPT) $(ALLCFLAGS) -nologo -Zl -Fc -WX -Gr -f- -Os -Gs -Ob1 
-OV4 -Gy -Oe -Zp1
-
 INITCFLAGS=$(ALLCFLAGS) -NTINIT_TEXT -AT
 CFLAGS=$(ALLCFLAGS) -NTHMA_TEXT
-INITPATCH = ..\utils\patchobj _DATA=IDATA DATA=ID BSS=ID DGROUP=I_GROUP CONST=IC
+INITPATCH=..\utils\patchobj _DATA=IDATA DATA=ID BSS=ID DGROUP=I_GROUP CONST=IC
diff -ruNp old/mkfiles/tc2.mak new/mkfiles/tc2.mak
--- old/mkfiles/tc2.mak 2003-09-18 22:43:02.000000000 +0000
+++ new/mkfiles/tc2.mak 2004-03-27 09:55:18.000000000 +0000
@@ -1,18 +1,12 @@
 #
-# TURBOC.MAK - kernel copiler options for TURBOC
+# TC2.MAK - kernel copiler options for Turbo C
 #
 
 # Use these for Turbo C 2.01
 
-COMPILERPATH=$(TC2_BASE)
-COMPILERBIN=$(COMPILERPATH)
-CC=$(COMPILERBIN)\tcc -c
-CL=$(COMPILERBIN)\tcc
-INCLUDEPATH=$(COMPILERPATH)\include
-LIBUTIL=$(COMPILERBIN)\tlib
-LIBPATH=$(COMPILERPATH)\lib
-LIBTERM=  
-LIBPLUS=+
+BINPATH=$(BASE)
+CC=$(BINPATH)\tcc -c
+CL=$(BINPATH)\tcc
 
 TINY=-lt
 CFLAGST=-L$(LIBPATH) -mt -a- -k- -f- -ff- -O -Z -d
@@ -22,9 +16,9 @@ TARGET=KTC
 
 # used for building the library
 
-CLIB=$(COMPILERPATH)\lib\cs.lib
+CLIB=$(LIBPATH)\cs.lib
 MATH_EXTRACT=*LDIV *LXMUL *LURSH *LLSH *LRSH
-MATH_INSERT=+LDIV +LXMUL  +LURSH +LLSH +LRSH
+MATH_INSERT =+LDIV +LXMUL +LURSH +LLSH +LRSH
 
 #
 # heavy stuff - building the kernel
diff -ruNp old/mkfiles/tc3.mak new/mkfiles/tc3.mak
--- old/mkfiles/tc3.mak 2003-06-15 12:52:14.000000000 +0000
+++ new/mkfiles/tc3.mak 2004-03-27 09:55:24.000000000 +0000
@@ -4,15 +4,8 @@
 
 # Use these for Turbo C 3.0
 
-COMPILERPATH=$(TC3_BASE)
-COMPILERBIN=$(COMPILERPATH)\bin
-CC=$(COMPILERBIN)\tcc -c
-CL=$(COMPILERBIN)\tcc
-INCLUDEPATH=$(COMPILERPATH)\include
-LIBUTIL=$(COMPILERBIN)\tlib
-LIBPATH=$(COMPILERPATH)\lib
-LIBTERM=  
-LIBPLUS=+
+CC=$(BINPATH)\tcc -c
+CL=$(BINPATH)\tcc
 
 TINY=-lt
 CFLAGST=-L$(LIBPATH) -mt -a- -k- -f- -ff- -O -Z -d
@@ -22,9 +15,9 @@ TARGET=KT3
 
 # used for building the library
 
-CLIB=$(COMPILERPATH)\lib\cs.lib
+CLIB=$(LIBPATH)\cs.lib
 MATH_EXTRACT=*H_LDIV *H_LLSH *H_LURSH *F_LXMUL
-MATH_INSERT=+H_LDIV +H_LLSH +H_LURSH +F_LXMUL
+MATH_INSERT =+H_LDIV +H_LLSH +H_LURSH +F_LXMUL
 
 #
 # heavy stuff - building the kernel
diff -ruNp old/mkfiles/turbocpp.mak new/mkfiles/turbocpp.mak
--- old/mkfiles/turbocpp.mak    2003-06-15 13:33:50.000000000 +0000
+++ new/mkfiles/turbocpp.mak    2004-03-27 09:55:28.000000000 +0000
@@ -4,15 +4,8 @@
 
 # Use these for Turbo CPP 1.01
 
-COMPILERPATH=$(TP1_BASE)
-COMPILERBIN=$(COMPILERPATH)\bin
-CC=$(COMPILERBIN)\tcc -c
-CL=$(COMPILERBIN)\tcc
-INCLUDEPATH=$(COMPILERPATH)\include
-LIBUTIL=$(COMPILERBIN)\tlib
-LIBPATH=$(COMPILERPATH)\lib
-LIBTERM=  
-LIBPLUS=+
+CC=$(BINPATH)\tcc -c
+CL=$(BINPATH)\tcc
 
 TINY=-lt
 CFLAGST=-L$(LIBPATH) -mt -a- -k- -f- -ff- -O -Z -d
@@ -22,9 +15,9 @@ TARGET=KTP
 
 # used for building the library
 
-CLIB=$(COMPILERPATH)\lib\cs.lib
+CLIB=$(LIBPATH)\cs.lib
 MATH_EXTRACT=*H_LDIV *H_LLSH *H_LURSH *F_LXMUL
-MATH_INSERT=+H_LDIV +H_LLSH +H_LURSH +F_LXMUL
+MATH_INSERT =+H_LDIV +H_LLSH +H_LURSH +F_LXMUL
 
 #
 # heavy stuff - building the kernel
diff -ruNp old/mkfiles/watcom.mak new/mkfiles/watcom.mak
--- old/mkfiles/watcom.mak      2003-09-18 22:43:02.000000000 +0000
+++ new/mkfiles/watcom.mak      2004-03-31 14:26:08.000000000 +0000
@@ -3,23 +3,18 @@
 #
 
 # Use these for WATCOM 11.0c
-COMPILERPATH=$(WATCOM)
+
 CC=*wcc
 CL=wcl
-INCLUDEPATH=$(COMPILERPATH)\H
-INCLUDE=$(COMPILERPATH)\h 
-EDPATH=$(COMPILERPATH)\EDDAT
+INCLUDEPATH=$(BASE)\H
+LIBPATH=$(BASE)\lib286
+
+INCLUDE=$(BASE)\h
+EDPATH=$(BASE)\EDDAT
 
-!if $(XCPU) != 186
-!if $(XCPU) != 386
+!if $(XCPU) < 186
 TARGETOPT=-0
 !endif
-!endif
-
-LIBPATH=$(COMPILERPATH)\lib286
-LIBUTIL=wlib -q 
-LIBPLUS=
-LIBTERM=
 
 TINY=-mt
 CFLAGST=-zq-zp1-os-s-we-e3-wx
@@ -29,30 +24,25 @@ TARGET=KWC
 
 # used for building the library
 
-CLIB=$(COMPILERPATH)\lib286\dos\clibm.lib
-
-# we use our own ones, which override these ones when linking.
-#  
-
+CLIB=$(LIBPATH)\dos\clibm.lib
 MATH_EXTRACT=*i4m
-MATH_INSERT=+i4m
-
+MATH_INSERT =+i4m
 
 #
-# heavy stuff - building  
+# heavy stuff - building
 #
 # -e=<num>      set limit on number of error messages
 # -ms           small memory model (small code/small data)
-# -j            change char default from unsigned to signed   
+# -j            change char default from unsigned to signed
 #-nc=<id>      set code class name
 #-nd=<id>      set data segment name
 #-nm=<file>    set module name
-#-nt=<id>      set name of text segment  
+#-nt=<id>      set name of text segment
 # -g=<id>       set code group name
 # -os           -> favor code size over execution time in optimizations
-# -s            remove stack overflow checks  
-# -w=<num>      set warning level number 
-# -we           treat all warnings as errors   
+# -s            remove stack overflow checks
+# -w=<num>      set warning level number
+# -we           treat all warnings as errors
 # -ze           enable extensions (i.e., near, far, export, etc.)
 # -zl           remove default library information
 # -zp=<num>     pack structure members with alignment {1,2,4,8,16}
@@ -65,4 +55,3 @@ ALLCFLAGS=-I..\hdr $(TARGETOPT) $(ALLCFL
 INITCFLAGS=$(ALLCFLAGS)-ntINIT_TEXT-ndI
 CFLAGS=$(ALLCFLAGS)-ntHMA_TEXT
 INITPATCH=..\utils\patchobj __U4D=_IU4D __U4M=_IU4M
-
diff -ruNp old/utils/indent.ini new/utils/indent.ini
--- old/utils/indent.ini        2001-11-18 18:18:12.000000000 +0000
+++ new/utils/indent.ini        1970-01-01 00:00:00.000000000 +0000
@@ -1,18 +0,0 @@
--kr
--di2
--nbc
--nfca
--bl
--bli0
--ss
--npcs
--ncs
--nbs
--i2
--ci4
--nce
--sob
--nut
--nbad
--cli2
--hnl
diff -ruNp old/utils/proto.bat new/utils/proto.bat
--- old/utils/proto.bat 2001-11-17 23:26:44.000000000 +0000
+++ new/utils/proto.bat 1970-01-01 00:00:00.000000000 +0000
@@ -1,2 +0,0 @@
-for %%f in ( %1 %2 %3 %4 %5 %6 %7 %8 %9 ) do mkptypes %%f >>proto.h
-
diff -ruNp old/utils/rmfiles.bat new/utils/rmfiles.bat
--- old/utils/rmfiles.bat       2002-01-23 22:29:40.000000000 +0000
+++ new/utils/rmfiles.bat       2004-03-27 06:10:04.000000000 +0000
@@ -2,9 +2,8 @@
 :loop_commandline
 
 if \%1 == \ goto done_with_commandline
-if exist %1 del %1
+if exist %1 del %1>nul
 shift
 goto loop_commandline
 
 :done_with_commandline
-

--- End Message ---

Reply via email to