1
0
Fork 0
Redox-From-Scratch/Makefile

37 lines
642 B
Makefile

BUILD_DIR=./build
export QEMU?=qemu-system-x86_64
# Default rule
.PHONY: default
default: bios
# Remove all build files
.PHONY: clean
clean:
rm -drf $(BUILD_DIR)
cd bootloader; cargo clean
# Make _everything_
.PHONY: all
all: bios
# Make bios bootloader
.PHONY: bios
bios: $(BUILD_DIR)/bios.bin $(BUILD_DIR)/bios.img
qemu: $(BUILD_DIR)/bios.img
$(QEMU) \
-d cpu_reset \
-no-reboot \
-smp 4 -m 2048 \
-chardev stdio,id=debug,signal=off,mux=on \
-serial chardev:debug \
-mon chardev=debug \
-machine q35 \
-net none \
-enable-kvm \
-cpu host \
-drive file="$<",format=raw
include make/filesystem
include make/bios