2
0
mirror of https://git.missingno.dev/kolibrios-nvme-driver/ synced 2025-01-29 16:50:05 +01:00

33 lines
900 B
Makefile
Raw Normal View History

2024-04-20 20:28:06 -04:00
MCOPY := mcopy
QEMU := qemu-system-i386
2024-08-23 07:55:07 -04:00
NVME_INC := ./drivers/nvme/nvme.inc ./drivers/nvme/lib.inc ./drivers/nvme/command.inc
2024-04-20 20:28:06 -04:00
NVME_ASM := ./drivers/nvme/nvme.asm
NVME_SYS := ./drivers/nvme/nvme.sys
2024-06-25 18:37:48 -04:00
MEMORY := 128
IMAGE := kolibri.img
DRIVE := nvm.img
2024-03-28 18:43:18 -04:00
2024-04-20 20:28:06 -04:00
all: $(NVME_SYS)
2024-03-28 18:43:18 -04:00
.PHONY: all
2024-08-19 07:49:09 -04:00
install: $(NVME_SYS)
@cd ./drivers/nvme && $(MAKE)
@$(MCOPY) -moi kolibri.img $(NVME_SYS) ::DRIVERS/NVME.SYS
.PHONY: install
2024-04-20 20:28:06 -04:00
run: $(NVME_SYS)
2024-06-25 18:37:48 -04:00
$(QEMU) -m $(MEMORY) -fda $(IMAGE) -boot a -drive file=$(DRIVE),if=none,id=nvm -device nvme,serial=deadbeef,drive=nvm
2024-03-28 18:43:18 -04:00
.PHONY: run
2024-06-25 18:37:48 -04:00
debug: $(NVME_SYS)
2024-08-18 12:15:56 -04:00
$(QEMU) -s -m $(MEMORY) -fda $(IMAGE) -boot a -drive file=$(DRIVE),if=none,id=nvm -device nvme,serial=deadbeef,drive=nvm
2024-06-25 18:37:48 -04:00
.PHONY: debug
2024-04-20 20:28:06 -04:00
$(NVME_SYS): $(NVME_ASM) $(NVME_INC)
2024-03-28 18:43:18 -04:00
@cd ./drivers/nvme && $(MAKE)
2024-04-20 20:28:06 -04:00
@$(MCOPY) -moi kolibri.img $(NVME_SYS) ::DRIVERS/NVME.SYS
2024-03-28 18:43:18 -04:00
2024-04-20 20:28:06 -04:00
clean:
@cd ./drivers/nvme && $(MAKE) clean
.PHONY: clean