luxos/SysCore/lib/compile.bat

52 lines
1.8 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
2021-09-14 15:35:52 +00:00
del %objpath%\stdlib.o
2021-09-14 15:34:14 +00:00
del %objpath%\time.o
2021-09-14 15:35:52 +00:00
del %objpath%\ctype.o
2021-09-14 15:34:14 +00:00
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
2021-09-14 15:35:52 +00:00
@echo * Compiling CTYPE.C ...
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I%incpath% -c -o %objpath%/ctype.o ctype.c
@echo * Compiling STDLIB.C ...
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I%incpath% -c -o %objpath%/stdlib.o stdlib.c
2021-09-14 15:34:14 +00:00
@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
2021-09-14 15:35:52 +00:00
if not exist %objpath%\ctype.o goto error
if not exist %objpath%\stdlib.o goto error
2021-09-14 15:34:14 +00:00
if not exist %objpath%\time.o goto error