23 lines
651 B
Batchfile
23 lines
651 B
Batchfile
@echo off
|
|
rem The name of the loader assembly file (without extension, must be .asm):
|
|
set loader_name=loader
|
|
|
|
rem NASM and DJGPP executable paths:
|
|
set nasm_path=C:\nasm
|
|
set djgpp_path=C:\DJGPP\bin
|
|
|
|
@echo on
|
|
rem Compile loader
|
|
%nasm_path%\nasm.exe -f aout -o %loader_name%.o %loader_name%.asm
|
|
rem Compile main Kernel
|
|
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o main.o main.c
|
|
rem OTHER GCC/NASM SOURCES GO HERE
|
|
|
|
@echo on
|
|
%djgpp_path%\ld -T link.ld -o kernel.bin %loader_name%.o main.o
|
|
@echo .
|
|
@echo Done!
|
|
|
|
@pause
|
|
copy KERNEL.BIN C:\SHARE
|
|
copy KERNEL.BIN A:\KERNEL.CTA |