1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-30 21:18:07 +11:00
collapseos/recipes/pcat/Makefile

35 lines
595 B
Makefile
Raw Normal View History

TARGET = disk.bin
BASE = ../..
CDIR = $(BASE)/cvm
BLKPACK = $(BASE)/tools/blkpack
STAGE = $(CDIR)/stage
2020-06-13 04:01:24 +10:00
.PHONY: all
all: $(TARGET)
os.bin: xcomp.fs $(STAGE) blkfs
$(STAGE) blkfs < xcomp.fs > $@
$(BLKPACK):
$(MAKE) -C ../tools
2020-06-13 04:01:24 +10:00
blkfs: $(BLKPACK)
$(BLKPACK) $(BASE)/blk blk > $@
2020-06-13 04:01:24 +10:00
$(STAGE):
$(MAKE) -C $(CDIR) stage
2020-06-13 04:01:24 +10:00
mbr.bin: mbr.fs $(STAGE) blkfs
cat mbr.fs | $(STAGE) blkfs > $@
$(TARGET): mbr.bin os.bin
cat mbr.bin os.bin > $@
dd if=blkfs of=$@ bs=512 seek=16
2020-06-13 04:01:24 +10:00
.PHONY: emul
emul: $(TARGET)
qemu-system-i386 -drive file=$(TARGET),if=floppy,format=raw
.PHONY: clean
clean:
rm *.bin