1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-27 08:38:05 +11:00
collapseos/arch/8086/pcat/Makefile

40 lines
686 B
Makefile
Raw Normal View History

# See /doc/hw/8086/pcat.txt
TARGET = disk.bin
BASE = ../../..
CDIR = $(BASE)/cvm
BLKPACK = $(BASE)/tools/blkpack
STAGE = $(CDIR)/stage
2020-10-26 01:27:52 +11:00
EMUL = $(BASE)/emul/8086/pcat
2020-06-13 04:01:24 +10:00
.PHONY: all
all: $(TARGET)
os.bin: xcomp.fs $(STAGE) blkfs
$(STAGE) blkfs < xcomp.fs > $@
$(BLKPACK):
2020-10-26 01:27:52 +11:00
$(MAKE) -C $(BASE)/tools
2020-06-13 04:01:24 +10:00
blkfs: $(BLKPACK) blk.fs
cat $(BASE)/blk.fs blk.fs | $(BLKPACK) > $@
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-10-26 01:27:52 +11:00
$(EMUL):
$(MAKE) -C $(BASE)/emul/8086
2020-06-13 04:01:24 +10:00
.PHONY: emul
2020-10-26 01:27:52 +11:00
emul: $(TARGET) $(EMUL)
$(EMUL) $(TARGET)
.PHONY: clean
clean:
rm *.bin