BIOS_SRC = ./bios STAGE3_BIN = $(BUILD_DIR)/stage3.elf $(BUILD_DIR)/bootloader.bin: $(wildcard $(BIOS_SRC)/*.asm) $(STAGE3_BIN) @mkdir -p "$(BUILD_DIR)" nasm \ -f bin \ -o "$@" \ -l "$@.lst" \ -D STAGE3="$(STAGE3_BIN)" \ -i "$(BIOS_SRC)" \ "$(BIOS_SRC)/bootloader.asm"