Badloader/Makefile

15 lines
423 B
Makefile
Raw Permalink Normal View History

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
2024-12-03 01:36:24 +00:00
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