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