-CPM.BIN: IPL.BIN BIOS.BIN CPM.SYS
- dd conv=sync bs=128 count=1 if=IPL.BIN > tmpCPM.BIN
- dd conv=sync bs=128 count=44 if=CPM.SYS >> tmpCPM.BIN
- dd conv=sync bs=128 count=7 if=BIOS.BIN >> tmpCPM.BIN
+ifeq "$(OS)" "Windows_NT"
+ PLATFORM=win32
+else
+ PLATFORM=Linux
+endif
+
+
+#Location of M80/L80
+ifeq ($(PLATFORM),Linux)
+ CPMBIN = /usr/local/lib/cpm/bin80
+else
+ CPMBIN = C:/cpmbin
+endif
+
+
+diskimage: CPM.BIN cpmdsk/*
+ mkfs.cpm -f $(IMGFORMAT) -b CPM.BIN -L test diskimage
+ cd cpmdsk; for x in *; do cpmcp -f $(IMGFORMAT) ../diskimage $$x 0:$$x; done; cd ..
+
+CPM.BIN: IPL.BIN BIOS.BIN $(CPMSYS)
+ dd conv=sync bs=118 count=1 if=IPL.BIN > tmpCPM.BIN &&\
+ echo -n "<CPM_Disk>" >> tmpCPM.BIN &&\
+ dd conv=sync bs=128 count=44 if=$(CPMSYS) >> tmpCPM.BIN &&\
+ dd conv=sync bs=128 count=7 if=BIOS.BIN >> tmpCPM.BIN &&\