forked from xamidev/pepperOS
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.
This commit is contained in:
8
Makefile
8
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
|
||||
|
||||
Reference in New Issue
Block a user