From 32f388956520f85101fe5e16dc2abdc1f602bcf9 Mon Sep 17 00:00:00 2001 From: furtest Date: Sun, 15 Mar 2026 18:01:35 +0100 Subject: [PATCH] Move PHONY tags and fix clean Move the PHONY tags to make them clearer to read. Fix the clean rule so it deletes the build directory. --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e113160..38218a7 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,6 @@ CC_PROBLEMATIC_FLAGS=-Wno-unused-parameter -Wno-unused-variable LD := x86_64-elf-ld -.PHONY: build build-iso debug debug2 run clean - $(ELFFILE): $(BUILDDIR) $(OBJFILES) nasm -f elf64 src/idt/idt.S -o $(BUILDDIR)/idt_stub.o $(LD) -o $(ELFFILE) -T linker.ld $(OBJFILES) $(BUILDDIR)/idt_stub.o @@ -50,16 +48,20 @@ build-iso: limine/limine build iso_root -o pepper.iso ./limine/limine bios-install pepper.iso +.PHONY: debug debug: /usr/bin/qemu-system-x86_64 -drive file=pepper.iso -s -S -d int -D qemu.log -no-reboot -no-shutdown & gdb $(ELFFILE) --command=debug.gdb +.PHONY: debug2 debug2: /usr/bin/qemu-system-x86_64 -drive file=pepper.iso -s -S -d int -no-reboot -no-shutdown & pwndbg $(ELFFILE) --command=debug.gdb +.PHONY: run run: build-iso /usr/bin/qemu-system-x86_64 -cdrom pepper.iso -serial stdio +.PHONY: clean clean: - rm -rf *.o symbols.map symbols.S $(ELFFILE) iso_root pepper.iso limine $(BUILDDIR)/*.o + rm -rf $(BUILDDIR) symbols.map symbols.S $(ELFFILE) iso_root pepper.iso limine