NASM ?= nasm build/boot.bin: boot/boot.asm | build $(NASM) -f bin -l build/boot.lst $< -o $@ @test $$(wc -c < $@) -eq 512 || (echo "boot sector is not 512 bytes" && false) build: mkdir -p build run: build/boot.bin qemu-system-x86_64 -drive format=raw,file=build/boot.bin clean: rm -rf build .PHONY: run clean