Improve Makefile #15

Merged
xamidev merged 5 commits from furtest/pepperOS:makefile into main 2026-03-15 21:17:44 +01:00
Showing only changes of commit 32f3889565 - Show all commits

View File

@@ -11,8 +11,6 @@ CC_PROBLEMATIC_FLAGS=-Wno-unused-parameter -Wno-unused-variable
LD := x86_64-elf-ld LD := x86_64-elf-ld
.PHONY: build build-iso debug debug2 run clean
$(ELFFILE): $(BUILDDIR) $(OBJFILES) $(ELFFILE): $(BUILDDIR) $(OBJFILES)
nasm -f elf64 src/idt/idt.S -o $(BUILDDIR)/idt_stub.o nasm -f elf64 src/idt/idt.S -o $(BUILDDIR)/idt_stub.o
$(LD) -o $(ELFFILE) -T linker.ld $(OBJFILES) $(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 iso_root -o pepper.iso
./limine/limine bios-install pepper.iso ./limine/limine bios-install pepper.iso
.PHONY: debug
debug: debug:
/usr/bin/qemu-system-x86_64 -drive file=pepper.iso -s -S -d int -D qemu.log -no-reboot -no-shutdown & /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 gdb $(ELFFILE) --command=debug.gdb
.PHONY: debug2
debug2: debug2:
/usr/bin/qemu-system-x86_64 -drive file=pepper.iso -s -S -d int -no-reboot -no-shutdown & /usr/bin/qemu-system-x86_64 -drive file=pepper.iso -s -S -d int -no-reboot -no-shutdown &
pwndbg $(ELFFILE) --command=debug.gdb pwndbg $(ELFFILE) --command=debug.gdb
.PHONY: run
run: build-iso run: build-iso
/usr/bin/qemu-system-x86_64 -cdrom pepper.iso -serial stdio /usr/bin/qemu-system-x86_64 -cdrom pepper.iso -serial stdio
.PHONY: clean
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