14 lines
423 B
Makefile
14 lines
423 B
Makefile
all: bootloader baddos
|
|
|
|
bootloader:
|
|
nasm -f bin main.asm -o badloader.img
|
|
kernel:
|
|
nasm -f elf kernel_entry.asm -o kernel_entry.o
|
|
gcc -m16 -ffreestanding -c kernel.c -o kernel.o
|
|
ld -m elf_i386 -T linker.ld --oformat binary kernel_entry.o kernel.o -o kernel.bin
|
|
baddos: bootloader
|
|
cat badloader.img > baddos.img
|
|
run: bootloader baddos
|
|
qemu-system-x86_64 -drive format=raw,file=baddos.img
|
|
clean:
|
|
rm -f *.o *.img *.bin
|