luxos/SysCore/makeall.bat
2021-09-14 18:34:14 +03:00

59 lines
1.3 KiB
Batchfile

@echo off
set loader_name=loader
set nasm_path=C:\nasm
set djgpp_path=C:\DJGPP\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
rem call compile.bat
cd..
:KernelMemoryManager
cd memory
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..