mirror of
https://git.missingno.dev/kolibrios-nvme-driver/
synced 2024-11-09 10:00:26 +01:00
33 lines
900 B
Makefile
33 lines
900 B
Makefile
MCOPY := mcopy
|
|
QEMU := qemu-system-i386
|
|
NVME_INC := ./drivers/nvme/nvme.inc ./drivers/nvme/lib.inc ./drivers/nvme/command.inc
|
|
NVME_ASM := ./drivers/nvme/nvme.asm
|
|
NVME_SYS := ./drivers/nvme/nvme.sys
|
|
MEMORY := 128
|
|
IMAGE := kolibri.img
|
|
DRIVE := nvm.img
|
|
|
|
all: $(NVME_SYS)
|
|
.PHONY: all
|
|
|
|
install: $(NVME_SYS)
|
|
@cd ./drivers/nvme && $(MAKE)
|
|
@$(MCOPY) -moi kolibri.img $(NVME_SYS) ::DRIVERS/NVME.SYS
|
|
.PHONY: install
|
|
|
|
run: $(NVME_SYS)
|
|
$(QEMU) -m $(MEMORY) -fda $(IMAGE) -boot a -drive file=$(DRIVE),if=none,id=nvm -device nvme,serial=deadbeef,drive=nvm
|
|
.PHONY: run
|
|
|
|
debug: $(NVME_SYS)
|
|
$(QEMU) -s -m $(MEMORY) -fda $(IMAGE) -boot a -drive file=$(DRIVE),if=none,id=nvm -device nvme,serial=deadbeef,drive=nvm
|
|
.PHONY: debug
|
|
|
|
$(NVME_SYS): $(NVME_ASM) $(NVME_INC)
|
|
@cd ./drivers/nvme && $(MAKE)
|
|
@$(MCOPY) -moi kolibri.img $(NVME_SYS) ::DRIVERS/NVME.SYS
|
|
|
|
clean:
|
|
@cd ./drivers/nvme && $(MAKE) clean
|
|
.PHONY: clean
|