luxos/SysCore/lib/compile.bat

41 lines
1.3 KiB
Batchfile
Raw Normal View History

2021-09-14 15:34:14 +00:00
@echo off
rem NASM and DJGPP executable paths:
set nasm_path=C:\nasm
set djgpp_path=C:\DJGPP\bin
set objpath=..\objects
set incpath=../include
@echo Building Kernel Standard Libraries...
del %objpath%\system.o
del %objpath%\string.o
del %objpath%\conio.o
del %objpath%\time.o
goto build
:error
@echo.
@echo There have been build errors. Building halted.
@pause
exit
:build
@echo * Compiling SYSTEM.C ...
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I%incpath% -c -o %objpath%/system.o system.c
@echo * Compiling STRING.C ...
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I%incpath% -c -o %objpath%/string.o string.c
@echo * Compiling CONIO.C ...
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I%incpath% -c -o %objpath%/conio.o conio.c
@echo * Compiling TIME.C ...
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I%incpath% -c -o %objpath%/time.o time.c
:check
if not exist %objpath%\system.o goto error
if not exist %objpath%\string.o goto error
if not exist %objpath%\conio.o goto error
if not exist %objpath%\time.o goto error