23 lines
399 B
Makefile
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 |