[Freedos-kernel] patch: batch and make files (diff file)
--- Begin Message --- diff -ruNp 0old/build.bat 0new/build.bat --- 0old/build.bat 2004-03-27 01:42:32.0 + +++ 0new/build.bat 2004-04-03 10:16:14.0 + @@ -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 @@ -51,50 +56,51 @@ echo. echo Process UTILS ++ echo. cd utils -%MAKE% production +call %MAKE% production if errorlevel 1 goto abort-cd echo. echo Process LIB echo. cd ..\lib -%MAKE% +call %MAKE% if errorlevel 1 goto abort-cd echo. echo Process DRIVERS echo. cd ..\drivers -%MAKE% production +call %MAKE% production if errorlevel 1 goto abort-cd echo. echo Process BOOT +++ echo. cd ..\boot -%MAKE% production +call %MAKE% production if errorlevel 1 goto abort-cd echo. echo Process SYS echo. cd ..\sys -%MAKE% production +call %MAKE% production if errorlevel 1 goto abort-cd echo. echo Process KERNEL + echo. cd ..\kernel -%MAKE% production +call %MAKE% production 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 0old/buildall.bat 0new/buildall.bat --- 0old/buildall.bat 2004-03-27 01:42:32.0 + +++ 0new/buildall.bat 2004-03-31 13:25:20.0 + @@ -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 tc86 fat16 -%ONERROR% -call build -r tc 186 fat32 -%ONERROR% -call build -r tc86 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 wc386 fat32 -%ONERROR% -call build -r wc386 fat16 -%ONERROR% -call build -r wc 86 fat32 -%ONERROR% -call build -r wc 86 fat16 -%ONERROR% + call build.bat -
[Freedos-kernel] patch: batch and make files (diff file)
--- Begin Message --- diff -ruNp 0old/buildall.bat 0new/buildall.bat --- 0old/buildall.bat 2004-03-27 01:42:32.0 + +++ 0new/buildall.bat 2004-04-05 04:45:58.0 + @@ -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 tc86 fat16 -%ONERROR% -call build -r tc 186 fat32 -%ONERROR% -call build -r tc86 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 wc386 fat32 -%ONERROR% -call build -r wc386 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 @@ -70,30 +62,30 @@ set Sumfile=bin\ksummary.txt set TempSumfile=bin\tsummary.txt :echo >%TempSumfile% Summary of all kernels build -:echo.|date >>%TempSumfile% -:echo.|time >>%TempSumfile% +: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% +if exist %Sumfile% del %Sumfile%>nul +if exist %TempSumfile% del %TempSumfile%>nul >ktemp.bat for %%i in (bin\k*.map) do echo call %0 $SUMMARY %%i >>ktemp.bat sort 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% -echo.|time >>%Sumfile% +echo.|date >>%Sumfile% +echo.|time >>%Sumfile% find <%TempSumfile% "H" >>%Sumfile% -del %TempSumfile% +del %TempSumfile%>nul set TempSumfile= set Sumfile= goto end -:summary +:summary echo H* %2 >>%TempSumfile% find<%2 " HMA_TEXT"|find/V "HMA_TEXT_START"|find/V "HMA_TEXT_END">>%TempSumfile% find<%2 " STACK">>%TempSumfile% @@ -103,6 +95,5 @@ goto end :daswarwohlnix echo Sorry, something didn't work as expected :-( -set ONERROR= :end diff -ruNp 0old/clean.bat 0new/clean.bat --- 0old/clean.bat 2004-03-27 01:42:32.0 + +++ 0new/clean.bat 2004-04-05 03:36:56.0 + @@ -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 +call %MAKE% %1 cd ..\lib -%MAKE% clean +call %MAKE% %1 cd ..\drivers -%MAKE% clean +call %MAKE% %1 cd ..\boot -%MAKE% clean +call %MAKE% %1 cd ..\sys -%MAKE% clean +call %MAKE% %1 cd ..\kernel -%MAKE% clean +call %MAKE% %1 cd ..\hdr -if exist *.bak del *.bak +if exist *.bak del *.bak>nul cd .. -if exist *.bak del *.bak +if exist *.bak del *.bak>nul +if "%1"=="clobber" if exist status.me del status.me>nul :en
[Freedos-kernel] patch: batch and make files (diff file)
--- Begin Message --- diff -ruNp 0old/buildall.bat 0new/buildall.bat --- 0old/buildall.bat 2004-03-27 01:42:32.0 + +++ 0new/buildall.bat 2004-04-05 04:45:58.0 + @@ -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 tc86 fat16 -%ONERROR% -call build -r tc 186 fat32 -%ONERROR% -call build -r tc86 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 wc386 fat32 -%ONERROR% -call build -r wc386 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 @@ -70,30 +62,30 @@ set Sumfile=bin\ksummary.txt set TempSumfile=bin\tsummary.txt :echo >%TempSumfile% Summary of all kernels build -:echo.|date >>%TempSumfile% -:echo.|time >>%TempSumfile% +: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% +if exist %Sumfile% del %Sumfile%>nul +if exist %TempSumfile% del %TempSumfile%>nul >ktemp.bat for %%i in (bin\k*.map) do echo call %0 $SUMMARY %%i >>ktemp.bat sort 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% -echo.|time >>%Sumfile% +echo.|date >>%Sumfile% +echo.|time >>%Sumfile% find <%TempSumfile% "H" >>%Sumfile% -del %TempSumfile% +del %TempSumfile%>nul set TempSumfile= set Sumfile= goto end -:summary +:summary echo H* %2 >>%TempSumfile% find<%2 " HMA_TEXT"|find/V "HMA_TEXT_START"|find/V "HMA_TEXT_END">>%TempSumfile% find<%2 " STACK">>%TempSumfile% @@ -103,6 +95,5 @@ goto end :daswarwohlnix echo Sorry, something didn't work as expected :-( -set ONERROR= :end diff -ruNp 0old/clean.bat 0new/clean.bat --- 0old/clean.bat 2004-03-27 01:42:32.0 + +++ 0new/clean.bat 2004-04-05 03:36:56.0 + @@ -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 +call %MAKE% %1 cd ..\lib -%MAKE% clean +call %MAKE% %1 cd ..\drivers -%MAKE% clean +call %MAKE% %1 cd ..\boot -%MAKE% clean +call %MAKE% %1 cd ..\sys -%MAKE% clean +call %MAKE% %1 cd ..\kernel -%MAKE% clean +call %MAKE% %1 cd ..\hdr -if exist *.bak del *.bak +if exist *.bak del *.bak>nul cd .. -if exist *.bak del *.bak +if exist *.bak del *.bak>nul +if "%1"=="clobber" if exist status.me del status.me>nul :en
[Freedos-kernel] patch: batch and make files (diff file, 1/2)
--- Begin Message --- diff -ruNp 0old/build.bat 0new/build.bat --- 0old/build.bat 2004-03-27 01:42:32.0 + +++ 0new/build.bat 2004-04-03 10:16:14.0 + @@ -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 @@ -51,50 +56,51 @@ echo. echo Process UTILS ++ echo. cd utils -%MAKE% production +call %MAKE% production if errorlevel 1 goto abort-cd echo. echo Process LIB echo. cd ..\lib -%MAKE% +call %MAKE% if errorlevel 1 goto abort-cd echo. echo Process DRIVERS echo. cd ..\drivers -%MAKE% production +call %MAKE% production if errorlevel 1 goto abort-cd echo. echo Process BOOT +++ echo. cd ..\boot -%MAKE% production +call %MAKE% production if errorlevel 1 goto abort-cd echo. echo Process SYS echo. cd ..\sys -%MAKE% production +call %MAKE% production if errorlevel 1 goto abort-cd echo. echo Process KERNEL + echo. cd ..\kernel -%MAKE% production +call %MAKE% production 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 0old/buildall.bat 0new/buildall.bat --- 0old/buildall.bat 2004-03-27 01:42:32.0 + +++ 0new/buildall.bat 2004-03-31 13:25:20.0 + @@ -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 tc86 fat16 -%ONERROR% -call build -r tc 186 fat32 -%ONERROR% -call build -r tc86 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 wc386 fat32 -%ONERROR% -call build -r wc386 fat16 -%ONERROR% -call build -r wc 86 fat32 -%ONERROR% -call build -r wc 86 fat16 -%ONERROR% + call build.bat -
[Freedos-kernel] patch: batch and make files (diff file, 2/2)
--- Begin Message --- diff -ruNp 0old/kernel/kernel.cfg 0new/kernel/kernel.cfg --- 0old/kernel/kernel.cfg 2001-07-09 23:19:32.0 + +++ 0new/kernel/kernel.cfg 1970-01-01 00:00:00.0 + @@ -1,14 +0,0 @@ --1- --f- --ff- --O --Z --d --k- --vi- --w --wpro --weas --wpre --I..\hdr --v -X- -I. -D__STDC__=0 -DTSC -DDEBUG -DKERNEL -DI86 -DPROTO -DSHWR -DASMSUPT diff -ruNp 0old/kernel/makefile 0new/kernel/makefile --- 0old/kernel/makefile2004-01-25 22:37:20.0 + +++ 0new/kernel/makefile2004-04-03 12:41:04.0 + @@ -6,36 +6,18 @@ !include "../mkfiles/generic.mak" -RELEASE = 1.00 - -# Compiler and Options - -INCLUDE=..\hdr -LIB=$(COMPILERBASE)\lib - -LIBPATH = . -#AFLAGS = /Mx /DSTANDALONE=1 /I..\HDR - -LIBS=..\lib\device.lib ..\lib\libm.lib -#INITCFLAGS =$(ALLCFLAGS) -zAINIT -zCINIT_TEXT -zDIB -zRID -zTID -zPIGROUP -zBIB \ -#-zGIGROUP -zSIGROUP -#CFLAGS =$(ALLCFLAGS) -zAHMA -zCHMA_TEXT +LIBS=..\lib\device.lib ..\lib\libm.lib HDR=../hdr/ -# *Implicit Rules* -# 'standard' compiles - -.c.obj : - $(CC) $(CFLAGS) $< - -# *List Macros* - +# *List Macros* +# only 8 files per definition; this is limitation of DOS batch +# files (only 9 directly accessible parameters). OBJS1=kernel.obj entry.obj io.obj console.obj serial.obj printer.obj dsk.obj \ 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,184 +25,177 @@ 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* -production: ..\bin\kernel.sys +production:..\bin\$(TARGET).sys -..\bin\kernel.sys: kernel.sys +..\bin\$(TARGET).sys: kernel.sys copy kernel.sys ..\bin - copy kernel.sys ..\bin\$(THETARGET).sys - copy kernel.map ..\bin\$(THETARGET).map + copy kernel.sys ..\bin\$(TARGET).sys + copy kernel.map ..\bin\$(TARGET).map kernel.sys:kernel.exe ..\utils\exeflat.exe $(XUPX) kernel.exe ..\utils\exeflat kernel.exe kernel.sys 0x60 -S0x10 -S0x8B $(UPXOPT) -clobber:clean +kernel.exe:$(TARGET).lnk $(OBJS) $(LIBS) + $(LINK) @$(TARGET).lnk; + +clobber: clean -$(RM) kernel.exe kernel.sys status.me clean: - -$(RM) *.res *.obj *.bak *.crf *.xrf *.map *.lst *.cod *.err *.lnk + -$(RM) *.obj *.bak *.crf *.xrf *.map *.lst *.cod *.err *.lnk # XXX: This is a very ugly way of linking the kernel, forced upon us by the # inability of Turbo `make' 2.0 to perform command line redirection. -- ror4 ECHOTO=..\utils\echoto -kernel.res: $(OBJS) $(LIBS) - -$(RM) kernel.res - $(ECHOTO) kernel.res $(OBJS1)+ - $(ECHOTO) kernel.res $(OBJS2)+ - $(ECHOTO) kernel.res $(OBJS3)+ - $(ECHOTO) kernel.res $(OBJS4)+ - $(ECHOTO) kernel.res $(OBJS5)+ - $(ECHOTO) kernel.res $(OBJS6)+ - $(ECHOTO) kernel.res $(OBJS7) - $(ECHOTO) kernel.res kernel.exe - $(ECHOTO) kernel.res kernel.map - $(ECHOTO) kernel.res $(LIBS) - -kernel.exe: kernel.res $(OBJS) $(LIBS) - $(LINK) @kernel.res; +$(TARGET).lnk: turboc.cfg makefile ..\mkfiles\generic.mak ..\mkfiles\$(COMPILER).mak + -$(RM) *.lnk + $(ECHOTO) $(TARGET).lnk $(OBJS1)+ + $(ECHOTO) $(TARGET).lnk $(OBJS2)+ + $(ECHOTO) $(TARGET).lnk $(OBJS3)+ + $(ECHOTO) $(TARGET).lnk $(OBJS4)+ + $(ECHOTO) $(TARGET).lnk $(OBJS5)+ + $(ECHOTO) $(TARGET).lnk $(OBJS6)+ + $(ECHOTO) $(TARGET).lnk $(OBJS7) + $(ECHOTO) $(TARGET).lnk kernel.exe + $(ECHOTO) $(TARGET).lnk kernel.map + $(ECHOTO) $(TARGET).lnk $(LIBS) # *Individual File Dependencies* -kernel.obj: kernel.asm segs.inc ludivmul.inc - -console.obj: console.asm io.inc -printer.obj: printer.asm io.inc +kernel.obj:kernel.asm segs.inc ludivmul.inc$(TARGET).lnk -serial.obj: serial.asm io.inc +console.obj: console.asm io.inc $(TARGET).lnk -entry.obj: entry.asm segs.inc $(HDR)stacks.inc +printer.obj: printer.asm io.inc $(TARGET).lnk -apisupt.obj: apisupt.asm segs.inc +serial.obj:serial.asm io.inc $(TARGET).lnk -execrh.obj: execrh.asm segs.inc +entry.obj: