From 2cf75576cd73f335f3023ead4d01c899bf320c1b Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Wed, 16 Jun 2021 02:01:47 +0200 Subject: [PATCH] Merge cpm22.bin and bios.bin into system.bin --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cf1d128..495b32f 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ BUILDDIR=.build -_BIN= cpm22.bin bios.bin +_BIN= system.bin BIN = $(patsubst %,$(BUILDDIR)/%,$(_BIN)) .PHONY: all clean @@ -9,6 +9,9 @@ all: $(BUILDDIR) $(BIN) $(BUILDDIR)/%.bin: src/%.z80 | $(BUILDDIR) @zasm -w -i $< -o $@ +$(BUILDDIR)/system.bin: $(BUILDDIR)/cpm22.bin $(BUILDDIR)/bios.bin | $(BUILDDIR) + @python -c "in1 = open('$(BUILDDIR)/cpm22.bin', 'rb').read(); in2 = open('$(BUILDDIR)/bios.bin', 'rb').read(); f = open('$(BUILDDIR)/system.bin', 'wb'); f.write(in1); f.seek(0x1600); f.write(in2)" + $(BUILDDIR)/%.COM: src/%.z80 | $(BUILDDIR) @zasm -w -i $< -o $@