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