109 lines
3.9 KiB
Batchfile
109 lines
3.9 KiB
Batchfile
@echo off
|
|
set nasm_path=C:\nasm
|
|
set djgpp_path=C:\DJGPP\bin
|
|
|
|
@echo Building Hardware Abstraction Layer...
|
|
set objpath=..\objects
|
|
set incpath=../include
|
|
del %objpath%\hal.o
|
|
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I%incpath% -c -o %objpath%/hal.o hal.c
|
|
if not exist %objpath%\hal.o goto error
|
|
|
|
set objpath=..\..\objects
|
|
set incpath=../../include
|
|
|
|
goto cmos
|
|
|
|
:error
|
|
@echo.
|
|
@echo There have been build errors. Building halted.
|
|
@pause
|
|
exit
|
|
|
|
:cmos
|
|
cd cmos
|
|
@echo * Compiling CMOS...
|
|
del %objpath%\cmos.o
|
|
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I%incpath% -c -o %objpath%/cmos.o cmos.c
|
|
if not exist %objpath%\cmos.o goto error
|
|
cd..
|
|
|
|
:cpu
|
|
cd cpu
|
|
@echo * Compiling Central Processing Unit...
|
|
del %objpath%\cpu.o
|
|
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I%incpath% -c -o %objpath%/cpu.o cpu.c
|
|
if not exist %objpath%\cpu.o goto error
|
|
|
|
cd..
|
|
|
|
:gdt
|
|
cd gdt
|
|
@echo * Compiling Global Descriptor Table...
|
|
del %objpath%\gdt.o
|
|
del %objpath%\gdt_asm.o
|
|
%nasm_path%\nasm.exe -f aout -o %objpath%/gdt_asm.o gdt.asm
|
|
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I%incpath% -c -o %objpath%/gdt.o gdt.c
|
|
if not exist %objpath%\gdt.o goto error
|
|
if not exist %objpath%\gdt_asm.o goto error
|
|
cd..
|
|
|
|
:idt
|
|
cd idt
|
|
@echo * Compiling Interrupt Descriptor Table...
|
|
del %objpath%\idt.o
|
|
del %objpath%\idt_asm.o
|
|
%nasm_path%\nasm.exe -f aout -o %objpath%/idt_asm.o idt.asm
|
|
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I%incpath% -c -o %objpath%/idt.o idt.c
|
|
if not exist %objpath%\idt.o goto error
|
|
if not exist %objpath%\idt_asm.o goto error
|
|
cd..
|
|
|
|
:irq
|
|
cd irq
|
|
@echo * Compiling Interrupt ReQuests...
|
|
del %objpath%\irq.o
|
|
del %objpath%\irq_asm.o
|
|
%nasm_path%\nasm.exe -f aout -o %objpath%/irq_asm.o irq.asm
|
|
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I%incpath% -c -o %objpath%/irq.o irq.c
|
|
if not exist %objpath%\irq.o goto error
|
|
if not exist %objpath%\irq_asm.o goto error
|
|
cd..
|
|
|
|
:isrs
|
|
cd isrs
|
|
@echo * Compiling Interrupt Service Routines...
|
|
del %objpath%\isrs_asm.o
|
|
del %objpath%\isrs.o
|
|
del %objpath%\BSOD.o
|
|
%nasm_path%\nasm.exe -f aout -o %objpath%/isrs_asm.o isrs.asm
|
|
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I%incpath% -c -o %objpath%/isrs.o isrs.c
|
|
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I%incpath% -c -o %objpath%/BSOD.o BSOD.c
|
|
if not exist %objpath%\isrs_asm.o goto error
|
|
if not exist %objpath%\isrs.o goto error
|
|
if not exist %objpath%\BSOD.o goto error
|
|
cd..
|
|
|
|
:keyboard
|
|
cd keyboard
|
|
@echo * Compiling KEYBOARD...
|
|
del %objpath%\keyus.o
|
|
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I%incpath% -c -o %objpath%/keyus.o keyus.c
|
|
if not exist %objpath%\keyus.o goto error
|
|
cd..
|
|
|
|
:pic
|
|
cd pic
|
|
@echo * Compiling Programmable Interrupt Controller...
|
|
del %objpath%\pic.o
|
|
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I%incpath% -c -o %objpath%/pic.o pic.c
|
|
if not exist %objpath%\pic.o goto error
|
|
cd..
|
|
|
|
:pit
|
|
cd pit
|
|
@echo * Compiling Programmable Interval Timer...
|
|
del %objpath%\pit.o
|
|
%djgpp_path%\gcc.exe -Wall -O -fstrength-reduce -fomit-frame-pointer -nostdinc -fno-builtin -I%incpath% -c -o %objpath%/pit.o pit.c
|
|
if not exist %objpath%\pit.o goto error
|
|
cd.. |