]> cloudbase.mooo.com Git - avrcpm.git/blame - cpm/Makefile
* cpm/ipl.mac
[avrcpm.git] / cpm / Makefile
CommitLineData
fdcfcd44
L
1#WARNING! Do not run a 'make install' unless you know what you're doing.
2
fdcfcd44
L
3
4diskimage: cpm.bin cpmdsk/*
5 mkfs.cpm -f avrcpm -b cpm.bin -L test diskimage
6 cd cpmdsk; for x in *; do cpmcp -f avrcpm ../diskimage $$x 0:$$x; done; cd ..
7
8cpm.bin: ipl.bin bios.bin CPM.SYS
9 dd conv=sync bs=128 count=1 if=ipl.bin > cpm.bin
10 dd conv=sync bs=128 count=44 if=CPM.SYS >> cpm.bin
fc1c8e54 11 dd conv=sync bs=128 count=7 if=bios.bin >> cpm.bin
fdcfcd44 12
fdcfcd44 13
2396f399
L
14bios.prn bios.rel : avrcpm.lib cfgacpm.lib
15ipl.prn ipl.rel : cfgacpm.lib
16
17%.rel: %.mac
18 zxcc m80 -=$<
19
20
21%.prn: %.mac
22 zxcc m80 -,$@=$<
23
24%.bin: %.rel
25 zxcc l80 -$<,$@/N/E
26
27.PHONY: clean installcpm install help
28
fdcfcd44 29clean:
2396f399
L
30 rm -f bios.lst bios.bin bios.prn bios.rel
31 rm -f ipl.lst ipl.bin ipl.prn ipl.rel
fdcfcd44
L
32 rm -f cpm.bin diskimage
33
2396f399
L
34
35installcpm: cpm.bin
36ifneq (${DEV},)
37 sudo dd if=cpm.bin of=${DEV} bs=128 conv=sync oflag=sync
db568140
L
38 sync
39 sleep 1
40 sync
2396f399
L
41else
42 @echo Error: You must specify a device to install to!
43 @echo " i.e. 'make $@ DEV=/dev/sdb1'"
44endif
db568140 45
2396f399
L
46install: diskimage
47ifneq (${DEV},)
48 sudo dd if=diskimage of=${DEV} conv=sync oflag=direct,sync
fdcfcd44 49 sync
2396f399 50 cpmls -f avrcpm ${DEV}
fdcfcd44
L
51 sync
52 sleep 1
53 sync
2396f399
L
54else
55 @echo Error: You must specify a device to install to!
56 @echo " i.e. 'make $@ DEV=/dev/sdb1'"
57endif
58
59help:
60 @echo -e "The following make targets are supported:\n"\
61 " diskimage - Build a complete CP/M image.\n"\
62 " cpm.bin - Build CP/M system (IPL+CCP+BDOS+BIOS).\n"\
63 "\n"\
64 " bios.prn - Make a listing file from bios.asm\n"\
65 " ipl.prn - Dito for ipl\n"\
66 "\n"\
67 " install - Copy diskimage to memory card.\n"\
68 " You must specify the card device on the command line.\n"\
69 " Example: 'DEV=/dev/sdb1'\n"\
70 " installcpm - Like install, but install only the system tracks,\n"\
71 " leaving the CP/M file system unaffected.\n"\
72 "\n"\
73 " clean - Remove intermediate and output files.\n"
fdcfcd44
L
74
75