From 50b809c7d8cf90c49fe4d51deea7fc32e64b682d Mon Sep 17 00:00:00 2001 From: Bjoern Doebel Date: Mon, 10 Aug 2020 21:57:01 +0200 Subject: [PATCH] Makefile: fix dependencies All the run-style targets depend on a valid ISO file being created, so let's make that explicit. Signed-off-by: Bjoern Doebel fixup! Makefile: fix dependencies --- Makefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 1b1ac7c5..7964bf55 100644 --- a/Makefile +++ b/Makefile @@ -90,8 +90,7 @@ QEMU_PARAMS_DEBUG := -s & ISO_FILE := boot.iso -.PHONY: iso -iso: all +$(ISO_FILE): all @echo "GEN ISO" $(ISO_FILE) @ $(GRUB_FILE) --is-x86-multiboot $(TARGET) || { echo "Multiboot not supported"; exit 1; } @ cp $(TARGET) grub/boot/ @@ -99,20 +98,20 @@ iso: all @ $(XORRISO) -as mkisofs -U -b boot.img -no-emul-boot -boot-load-size 4 -boot-info-table -o $(ISO_FILE) grub 2>> /dev/null .PHONY: boot -boot: all +boot: $(ISO_FILE) @echo "QEMU START" @$(QEMU_BIN) -cdrom $(ISO_FILE) $(QEMU_PARAMS) .PHONY: boot_debug -boot_debug: all iso +boot_debug: $(ISO_FILE) $(QEMU_BIN) -cdrom $(ISO_FILE) $(QEMU_PARAMS) $(QEMU_PARAMS_DEBUG) .PHONY: run -run: all +run: $(TARGET) $(QEMU_BIN) -kernel $(TARGET) $(QEMU_PARAMS) $(QEMU_PARAMS_KERNEL) .PHONY: debug -debug: all +debug: $(TARGET) $(QEMU_BIN) -kernel $(TARGET) $(QEMU_PARAMS) $(QEMU_PARAMS_KERNEL) $(QEMU_PARAMS_DEBUG) .PHONY: gdb