collapseos/recipes/pcat/Makefile

28 lines
471 B
Makefile
Raw Normal View History

TARGET = disk.bin
2020-06-12 14:01:24 -04:00
BASEDIR = ../..
EDIR = $(BASEDIR)/emul
STAGE = $(EDIR)/stage
.PHONY: all
all: $(TARGET)
mbr.bin: mbr.fs $(STAGE)
cat mbr.fs | $(STAGE) > $@
os.bin: xcomp.fs $(STAGE)
2020-06-12 14:01:24 -04:00
cat xcomp.fs | $(STAGE) > $@
disk.bin: mbr.bin os.bin
cat mbr.bin os.bin > $@
dd if=$(EDIR)/blkfs of=$@ bs=512 seek=16
2020-06-12 14:01:24 -04:00
$(STAGE):
$(MAKE) -C $(EDIR) stage
.PHONY: emul
emul: $(TARGET)
qemu-system-i386 -drive file=$(TARGET),if=floppy,format=raw
.PHONY: clean
clean:
rm *.bin