diff options
author | Freya Murphy <freya@freyacat.org> | 2025-04-19 16:36:51 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-04-19 16:37:54 -0400 |
commit | 472ec944d2ed81d0304cc6cac80946a6a44776be (patch) | |
tree | f6cae641c143a0b45bb289d9d9fc6145706025b0 /Makefile | |
parent | set mmap limit (diff) | |
download | comus-472ec944d2ed81d0304cc6cac80946a6a44776be.tar.gz comus-472ec944d2ed81d0304cc6cac80946a6a44776be.tar.bz2 comus-472ec944d2ed81d0304cc6cac80946a6a44776be.zip |
UEFI and republicans
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -10,7 +10,7 @@ CPP ?= cpp CPPFLAGS += -Ikernel/include -CFLAGS += -O0 +CFLAGS += -O2 CFLAGS += -std=c11 CFLAGS += -Wall -Wextra -pedantic CFLAGS += -fno-pie -fno-stack-protector @@ -42,6 +42,13 @@ QEMUOPTS = -cdrom $(BIN)/$(ISO) \ -m 4G \ -name kern +GRUB = grub-mkrescue + +ifdef UEFI +QEMU = qemu-system-x86_64-uefi +GRUB = grub-mkrescue-uefi +endif + qemu: $(BIN)/$(ISO) $(QEMU) $(QEMUOPTS) @@ -88,7 +95,7 @@ $(BIN)/$(ISO): $(BIN)/$(KERNEL) mkdir -p $(BIN)/iso/boot/grub cp config/grub.cfg $(BIN)/iso/boot/grub cp $(BIN)/$(KERNEL) $(BIN)/iso/boot - grub-mkrescue -o $(BIN)/$(ISO) bin/iso 2>/dev/null + $(GRUB) -o $(BIN)/$(ISO) bin/iso 2>/dev/null fmt: clang-format -i $(shell find -type f -name "*.[ch]" -and -not -path "./kernel/old/*") |