-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
189 lines (160 loc) · 5.74 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
DA65=da65
BUILDDIR=build
ROMNAMES= masIDE \
masMMC_hog_SD \
masMMC_hog_SDT \
masMMC_hog_SD2 \
masMMC_hog_SD2T \
masMMC_hog_SD3 \
masMMC_hog_SD3T \
masBM_XDFS \
masSCSI \
masVFS \
bbcSCSI \
bbcSCSI_AH \
bbcIDE \
elkIDE \
elkSCSI \
bbcSCS2 \
bbcIDEF \
bbcIDE_hog \
bbcIDE_hog_JGH_133r23 \
bbcIDE_hog_DC \
elkSCSI_hog \
elkSCSI_mince \
elkIDE_hog
ROMS=$(addsuffix .rom, $(addprefix $(BUILDDIR)/, $(ROMNAMES)))
TARGETS = $(BUILDDIR)/ $(ROMS) $(BUILDDIR)/adfsroms.ssd
all:: roms ssd compares
roms: $(ROMS)
.PHONY: FORCE
$(BUILDDIR)/%.rom: FORCE
make -C src ROMNAME=${*}
ssd: roms $(BUILDDIR)/adfsroms.ssd
$(BUILDDIR)/adfsroms.ssd:
#dfs tool from https://github.com/dominicbeesley/dfs-0.4
dfs form -80 $@
dfs title $@ "ADFS_DOB"
dfs add -l 0xFFFF8000 -e 0xFFFF8000 -f "ELKM100" $@ $(BUILDDIR)/elkSCSI_mince.rom
dfs add -l 0xFFFF8000 -e 0xFFFF8000 -f "ELKH100" $@ $(BUILDDIR)/elkSCSI_hog.rom
dfs add -l 0xFFFF8000 -e 0xFFFF8000 -f "ADFS100" $@ $(BUILDDIR)/elkSCSI.rom
dfs add -l 0xFFFF8000 -e 0xFFFF8000 -f "ADFS103" $@ $(BUILDDIR)/elkIDE.rom
# dfs add -l 0xFFFF8000 -e 0xFFFF8000 -f "ADFS107" $@ elkMMC.rom
dfs add -l 0xFFFF8000 -e 0xFFFF8000 -f "ADFS130" $@ $(BUILDDIR)/bbcSCSI.rom
dfs add -l 0xFFFF8000 -e 0xFFFF8000 -f "ADFSH30" $@ $(BUILDDIR)/bbcSCSI_AH.rom
dfs add -l 0xFFFF8000 -e 0xFFFF8000 -f "ADFS133" $@ $(BUILDDIR)/bbcIDE.rom
# dfs add -l 0xFFFF8000 -e 0xFFFF8000 -f "ADFS137" $@ bbcMMC.rom
dfs add -l 0xFFFF8000 -e 0xFFFF8000 -f "ADFS134" $@ $(BUILDDIR)/bbcSCS2.rom
dfs add -l 0xFFFF8000 -e 0xFFFF8000 -f "ADFS150" $@ $(BUILDDIR)/masSCSI.rom
dfs add -l 0xFFFF8000 -e 0xFFFF8000 -f "ADFS153" $@ $(BUILDDIR)/masIDE.rom
dfs add -l 0xFFFF8000 -e 0xFFFF8000 -f "ADFS13F" $@ $(BUILDDIR)/bbcIDEF.rom
dfs read -w "*.*" -i -d ~/hostfs/roms65 $@
HOG15x_ORGS=$(addsuffix .da.s, $(addprefix compares/org/Hoglet15x/, $(notdir $(filter-out %.md, $(wildcard orgroms/Hoglet15x/*)))))
HOG13x_ORGS=$(addsuffix .da.s, $(addprefix compares/org/Hoglet13x/, $(notdir $(basename $(wildcard orgroms/Hoglet13x/*.rom)))))
COMPARES= compares/org/masIDE.da.s \
compares/org/masSCSI.da.s \
compares/org/masVFS.da.s \
compares/org/bbcIDE.da.s \
compares/org/bbcSCSI.da.s \
compares/org/elkIDE.da.s \
compares/org/elkSCSI.da.s \
compares/new/masIDE.da.s \
compares/new/Hoglet15x/SD.da.s \
compares/new/Hoglet15x/SDT.da.s \
compares/new/Hoglet15x/SD2.da.s \
compares/new/Hoglet15x/SD2T.da.s \
compares/new/Hoglet15x/SD3.da.s \
compares/new/Hoglet15x/SD3T.da.s \
compares/new/Hoglet15x/ORIG.da.s \
compares/new/Hoglet15x/IDE.da.s \
compares/new/Hoglet15x/XDFS.da.s \
compares/new/masSCSI.da.s \
compares/new/masVFS.da.s \
compares/new/bbcIDE.da.s \
compares/new/bbcSCSI.da.s \
compares/new/elkIDE.da.s \
compares/new/elkSCSI.da.s \
$(HOG15x_ORGS) \
$(HOG13x_ORGS) \
compares/new/Hoglet13x/ADFS130.da.s \
compares/new/Hoglet13x/ADFS133.da.s \
compares/new/Hoglet13x/DC133.da.s \
compares/new/Hoglet13x/JGH133.da.s \
compares/new/Hoglet13x/ELK100.da.s \
compares/new/Hoglet13x/ELK103.da.s \
compares/new/Hoglet13x/ELK130E.da.s
compares: roms comparedirs $(COMPARES)
comparedirs:
-mkdir -p compares
-mkdir -p compares/org
-mkdir -p compares/org/Hoglet15x
-mkdir -p compares/org/Hoglet13x
-mkdir -p compares/new
-mkdir -p compares/new/Hoglet15x
-mkdir -p compares/new/Hoglet13x
compares/org/Hoglet13x/%.da.s: orgroms/Hoglet13x/%.rom
$(DA65) --comments 4 --start-addr 0x8000 $< >$@
sed -i 1,4d $@
compares/org/Hoglet15x/%.da.s: orgroms/Hoglet15x/%
$(DA65) --cpu 65c02 --comments 4 --start-addr 0x8000 $< >$@
sed -i 1,4d $@
compares/org/masIDE.da.s: orgroms/ADFS153
$(DA65) --cpu 65c02 --comments 4 --start-addr 0x8000 $< >$@
sed -i 1,4d $@
compares/org/masSCSI.da.s: orgroms/ADFS150
$(DA65) --cpu 65c02 --comments 4 --start-addr 0x8000 $< >$@
sed -i 1,4d $@
compares/org/masVFS.da.s: orgroms/VFS170
$(DA65) --cpu 65c02 --comments 4 --start-addr 0x8000 $< >$@
sed -i 1,4d $@
compares/org/bbcSCSI.da.s: orgroms/ADFS130
$(DA65) --comments 4 --start-addr 0x8000 $< >$@
sed -i 1,4d $@
compares/org/bbcIDE.da.s: orgroms/ADFS133
$(DA65) --comments 4 --start-addr 0x8000 $< >$@
sed -i 1,4d $@
compares/org/elkSCSI.da.s: orgroms/ADFS100
$(DA65) --comments 4 --start-addr 0x8000 $< >$@
sed -i 1,4d $@
compares/org/elkIDE.da.s: orgroms/ADFS103
$(DA65) --comments 4 --start-addr 0x8000 $< >$@
sed -i 1,4d $@
compares/new/mas%.da.s: $(BUILDDIR)/mas%.rom
$(DA65) --cpu 65c02 --comments 4 --start-addr 0x8000 $< >$@
sed -i 1,4d $@
compares/new/bbc%.da.s: $(BUILDDIR)/bbc%.rom
$(DA65) --comments 4 --start-addr 0x8000 $< >$@
sed -i 1,4d $@
compares/new/elk%.da.s: $(BUILDDIR)/elk%.rom
$(DA65) --comments 4 --start-addr 0x8000 $< >$@
sed -i 1,4d $@
compares/new/Hoglet15x/%.da.s:$(BUILDDIR)/masMMC_hog_%.rom
$(DA65) --cpu 65c02 --comments 4 --start-addr 0x8000 $< >$@
sed -i 1,4d $@
compares/new/Hoglet15x/%.da.s:$(BUILDDIR)/masBM_%.rom
$(DA65) --cpu 65c02 --comments 4 --start-addr 0x8000 $< >$@
sed -i 1,4d $@
#duplicates of our ROMS to compare against Hoglet's
compares/new/Hoglet15x/ORIG.da.s:compares/new/masSCSI.da.s
cp $< $@
compares/new/Hoglet15x/IDE.da.s:compares/new/masIDE.da.s
cp $< $@
compares/new/Hoglet13x/ADFS130.da.s:compares/new/bbcSCSI.da.s
cp $< $@
compares/new/Hoglet13x/ADFS133.da.s:compares/new/bbcIDE_hog.da.s
cp $< $@
compares/new/Hoglet13x/JGH133.da.s:compares/new/bbcIDE_hog_JGH_133r23.da.s
cp $< $@
compares/new/Hoglet13x/DC133.da.s:compares/new/bbcIDE_hog_DC.da.s
cp $< $@
compares/new/Hoglet13x/ELK100.da.s:compares/new/elkSCSI_hog.da.s
cp $< $@
compares/new/Hoglet13x/ELK103.da.s:compares/new/elkIDE_hog.da.s
cp $< $@
compares/new/Hoglet13x/ELK130E.da.s:compares/new/elkSCSI_mince.da.s
cp $< $@
clean: $(addprefix clean-, $(ROMNAMES))
-rm $(COMPARES)
-rm $(BUILDDIR)/adfsroms.ssd
clean-%:
make -C src clean ROMNAME=${*}