diff options
| author | Freya Murphy <freya@freyacat.org> | 2025-04-19 16:36:51 -0400 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2025-04-20 20:54:31 -0400 |
| commit | df899527e67c6c02fd317eeae25a9e7d7f6b3e8a (patch) | |
| tree | 51af0845215fea734295c126e47665f0a1ffc615 /Makefile | |
| parent | set mmap limit (diff) | |
| download | comus-df899527e67c6c02fd317eeae25a9e7d7f6b3e8a.tar.gz comus-df899527e67c6c02fd317eeae25a9e7d7f6b3e8a.tar.bz2 comus-df899527e67c6c02fd317eeae25a9e7d7f6b3e8a.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/*") |