76 lines
1.5 KiB
Batchfile
76 lines
1.5 KiB
Batchfile
@echo off
|
|
|
|
set loader_name=loader
|
|
set nasm_path=C:\nasm
|
|
set djgpp_path=C:\mingw\bin
|
|
|
|
|
|
@echo ***************** CTA KERNEL *****************
|
|
|
|
goto KernelEntry
|
|
|
|
:error
|
|
@echo.
|
|
@echo There have been build errors. Building halted.
|
|
@pause
|
|
exit
|
|
|
|
:KernelEntry
|
|
del objects\%loader_name%.o
|
|
del objects\main.o
|
|
|
|
@echo.
|
|
@echo Building Kernel entry...
|
|
@echo * Compiling kernel loader...
|
|
%nasm_path%\nasm.exe -f aout -o ./objects/%loader_name%.o %loader_name%.asm
|
|
|
|
@echo * Compiling kernel main...
|
|
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I./include -c -o ./objects/main.o main.c
|
|
if not exist objects\%loader_name%.o goto error
|
|
if not exist objects\main.o goto error
|
|
|
|
@echo.
|
|
|
|
:KernelSTDLIB
|
|
cd lib
|
|
call compile.bat
|
|
@echo.
|
|
cd..
|
|
|
|
:KernelMemoryManager
|
|
cd memory
|
|
call compile.bat
|
|
@echo.
|
|
cd..
|
|
|
|
:KernelDrivers
|
|
cd drivers
|
|
call makeall.bat
|
|
cd..
|
|
|
|
:KernelVIDEO
|
|
cd video
|
|
call compile.bat
|
|
cd..
|
|
|
|
:KernelSHELL
|
|
cd shell
|
|
call compile.bat
|
|
cd..
|
|
|
|
rem here go other sources:
|
|
|
|
rem here go other sources ^
|
|
|
|
:Finish
|
|
cd objects
|
|
@echo Linking...
|
|
del kernel.bin
|
|
%djgpp_path%\ld -T link.ld
|
|
if not exist kernel.bin goto error
|
|
|
|
@echo.
|
|
|
|
echo Copying to floppy drive...
|
|
copy KERNEL.BIN A:\KERNEL.CTA >nul
|
|
cd.. |