summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-04-08 14:23:06 -0400
committerFreya Murphy <freya@freyacat.org>2025-04-08 14:23:20 -0400
commit0aab9ee1355070d37cae92c27814e4e2793c3278 (patch)
treecc224a7960595ca45479ca7ac3a6ed642b21c85f
parentadd grub and xorriso for making bootable disks (diff)
downloadcomus-0aab9ee1355070d37cae92c27814e4e2793c3278.tar.gz
comus-0aab9ee1355070d37cae92c27814e4e2793c3278.tar.bz2
comus-0aab9ee1355070d37cae92c27814e4e2793c3278.zip
fix makefile
-rw-r--r--Makefile11
1 files 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/*")