# Makefile SRC_DIR = src BUILD_DIR = build BOOTLOADER_SRC = $(SRC_DIR)/boot.s BOOTLOADER_IMG = $(BUILD_DIR)/boot.img QEMU = qemu-system-i386 all: $(BOOTLOADER_IMG) $(BUILD_DIR): mkdir -p $(BUILD_DIR) $(BOOTLOADER_IMG): $(BOOTLOADER_SRC) | $(BUILD_DIR) nasm -f bin $(BOOTLOADER_SRC) -i $(SRC_DIR) -o $(BOOTLOADER_IMG) .PHONY: debug debug: $(QEMU) $(QEMU_FLAGS) -s -S -drive format=raw,file=$(BOOTLOADER_IMG) .PHONY: run run: all $(QEMU) -drive format=raw,file=$(BOOTLOADER_IMG) -display gtk clean: rm -rf $(BUILD_DIR)