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 $@