From 0aab9ee1355070d37cae92c27814e4e2793c3278 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Tue, 8 Apr 2025 14:23:06 -0400 Subject: fix makefile --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index fe068f9..5f08319 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,11 @@ UNAME := $(shell uname) +GRUB = grub-mkrescue +ifeq ($(UNAME), Darwin) + GRUB = x86_64-elf-grub-mkrescue +endif + QEMU = qemu-system-x86_64 QEMUOPTS = -cdrom bin/os.iso \ -no-reboot \ @@ -32,8 +37,8 @@ bin/os.iso: build mkdir -p bin/iso/boot/grub cp config/grub.cfg bin/iso/boot/grub cp bin/kernel bin/iso/boot - grub-mkrescue -o bin/os.iso bin/iso 2>/dev/null + $(GRUB) -o bin/os.iso bin/iso 2>/dev/null fmt: - clang-format -i $(shell find -type f -name "*.[ch]") - sed -i 's/[ \t]*$$//' $(shell find -type f -name "*.[chS]" -or -name "*.ld") + clang-format -i $(shell find -type f -name "*.[ch]" -and -not -path "./kernel/old/*") + sed -i 's/[ \t]*$$//' $(shell find -type f -name "*.[chS]" -and -not -path "./kernel/old/*") -- cgit v1.2.3-freya