2020301918-os/Makefile
2022-09-16 18:00:34 +08:00

23 lines
399 B
Makefile

CC = gcc
ASM = nasm
QEMU = qemu
IMG = boot.bin
boot.bin: boot.asm
$(ASM) $< -o $@
compile: boot.bin
.DEFAULT_GOAL=compile
run: compile
$(QEMU) -boot order=c -drive file=$(IMG),format=raw
clean:
rm boot.bin
debug: compile
$(QEMU) -boot order=c -drive file=$(IMG),format=raw -S -s &
gdb -ex 'set tdesc filename target.xml' -ex 'target remote localhost:1234'
.PHONY: compile clean run debug