X-Git-Url: http://cloudbase.mooo.com/gitweb/avrcpm.git/blobdiff_plain/db568140f48e404231f1b9d5b99680073c94bf49..4c7c1e1a4b78cc8e0389e7c18c8c7fe97b4d3a93:/avrcpm/cpm/Makefile diff --git a/avrcpm/cpm/Makefile b/avrcpm/cpm/Makefile index 7de02d2..19485f3 100644 --- a/avrcpm/cpm/Makefile +++ b/avrcpm/cpm/Makefile @@ -1,6 +1,5 @@ #WARNING! Do not run a 'make install' unless you know what you're doing. -INSTALLDISK=/dev/sdb diskimage: cpm.bin cpmdsk/* mkfs.cpm -f avrcpm -b cpm.bin -L test diskimage @@ -9,32 +8,68 @@ diskimage: cpm.bin cpmdsk/* cpm.bin: ipl.bin bios.bin CPM.SYS dd conv=sync bs=128 count=1 if=ipl.bin > cpm.bin dd conv=sync bs=128 count=44 if=CPM.SYS >> cpm.bin - dd conv=sync bs=128 count=6 if=bios.bin >> cpm.bin + dd conv=sync bs=128 count=7 if=bios.bin >> cpm.bin -ipl.bin: ipl.asm - z80asm ipl.asm -o ipl.bin -lipl.lst -bios.bin: bios.asm - z80asm bios.asm -o bios.bin -lbios.lst +bios.prn bios.rel : avrcpm.lib cfgacpm.lib +ipl.prn ipl.rel : cfgacpm.lib + +%.rel: %.mac + zxcc m80 -=$< + + +%.prn: %.mac + zxcc m80 -,$@=$< + +%.bin: %.rel + zxcc l80 -$<,$@/N/E + +.PHONY: clean installcpm install help clean: - rm -f bios.lst bios.bin - rm -f ipl.lst ipl.bin + rm -f bios.lst bios.bin bios.prn bios.rel + rm -f ipl.lst ipl.bin ipl.prn ipl.rel rm -f cpm.bin diskimage -installcpm: cpm.bin dummy - sudo dd if=cpm.bin of=${INSTALLDISK} bs=128 conv=sync oflag=direct,sync + +installcpm: cpm.bin +ifneq (${DEV},) + sudo dd if=cpm.bin of=${DEV} bs=128 conv=sync oflag=sync sync sleep 1 sync +else + @echo Error: You must specify a device to install to! + @echo " i.e. 'make $@ DEV=/dev/sdb1'" +endif -install: diskimage dummy - sudo dd if=diskimage of=${INSTALLDISK} conv=sync oflag=direct,sync +install: diskimage +ifneq (${DEV},) + sudo dd if=diskimage of=${DEV} conv=sync oflag=direct,sync sync - cpmls -f avrcpm ${INSTALLDISK} + cpmls -f avrcpm ${DEV} sync sleep 1 sync +else + @echo Error: You must specify a device to install to! + @echo " i.e. 'make $@ DEV=/dev/sdb1'" +endif + +help: + @echo -e "The following make targets are supported:\n"\ + " diskimage - Build a complete CP/M image.\n"\ + " cpm.bin - Build CP/M system (IPL+CCP+BDOS+BIOS).\n"\ + "\n"\ + " bios.prn - Make a listing file from bios.asm\n"\ + " ipl.prn - Dito for ipl\n"\ + "\n"\ + " install - Copy diskimage to memory card.\n"\ + " You must specify the card device on the command line.\n"\ + " Example: 'DEV=/dev/sdb1'\n"\ + " installcpm - Like install, but install only the system tracks,\n"\ + " leaving the CP/M file system unaffected.\n"\ + "\n"\ + " clean - Remove intermediate and output files.\n" -dummy: