30 lines
1021 B
Makefile
30 lines
1021 B
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 --target=.cargo/target-protected-i386.json --package oxide
|
|
|
|
BOOTLOADER ?= grub
|
|
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)
|
|
run-qemu-nographic: $(KERNELFILE)
|
|
qemu-system-x86_64 -nographic -kernel $(KERNELFILE)
|