Files
oxideos/Makefile
javalsai e6b231488d feat: misc
Nicer kernel, now can fetch multiboot2 boot info
2026-02-21 22:12:23 +01:00

32 lines
1.0 KiB
Makefile

OUTIMG = oxideos.iso
.DEFAULT_GOAL = $(OUTIMG)
OXIDE_MULTIBOOT = target/target-protected-i386/release/oxide
RUST_DEP := Cargo.toml Cargo.lock $(shell find .cargo -type f) $(shell find deps -type f)
KERNELFILE = $(OXIDE_MULTIBOOT)
$(KERNELFILE): $(shell find members/oxide -type f) $(RUST_DEP)
cargo b -r --package oxide
BOOTLOADER ?= grub
# Must not contain '/' with current limitations
CMDLINE ?=
include mk/make_bootloader/$(BOOTLOADER).mk
.PHONY: clean \
run-bootloader-qemu run-bootloader-qemu-nographic \
run-qemu run-qemu-nographic
clean: clean-bootloader
rm -rf $(OUTIMG) $(FS_IMG) $(MICROLOADER_MBR) $(MICROLOADER_VBA) $(FS_BOOTPART_IMG)
run-bootloader-qemu: $(OUTIMG)
qemu-system-x86_64 -drive format=raw,file=$(OUTIMG)
run-bootloader-qemu-nographic: $(OUTIMG)
qemu-system-x86_64 -nographic -drive format=raw,file=$(OUTIMG)
# one day qemu will support multiboot2
run-qemu: $(KERNELFILE)
qemu-system-x86_64 -kernel $(KERNELFILE) -append $(CMDLINE)
run-qemu-nographic: $(KERNELFILE)
qemu-system-x86_64 -nographic -kernel $(KERNELFILE) -append $(CMDLINE)