Mercurial > hg > Members > kono > nitros9-code
comparison level2/mc09l2/modules/makefile @ 3131:e1aadba01e81
Add new Level 2 port for Multicomp09 "mc09l2"
Add infrastructure (directories, makefiles etc).
Target name is mc09l2 to distinguish it from the Level 1
port (target name mc09).
In the code, the name mc09 is used for platform-dependent
code, whether for Level 1 or Level 2.
author | Neal Crook <foofoobedoo@gmail.com> |
---|---|
date | Mon, 05 Dec 2016 17:39:03 +0000 |
parents | |
children | 55004ff56395 |
comparison
equal
deleted
inserted
replaced
3130:e0614e08fa5e | 3131:e1aadba01e81 |
---|---|
1 PORT = mc09 | |
2 include $(NITROS9DIR)/rules.mak | |
3 | |
4 vpath %.asm kernel:$(LEVEL2)/modules:$(LEVEL1)/modules | |
5 | |
6 AFLAGS += -I$(LEVEL1)/modules | |
7 | |
8 CLOCKELIM = -DRTCElim=1 | |
9 CLOCKDISTO2 = -DRTCDsto2=1 | |
10 CLOCKDISTO4 = -DRTCDsto4=1 | |
11 CLOCKBNB = -DRTCBB=1 | |
12 CLOCKSMART = -DRTCSmart=1 -DMPIFlag=1 | |
13 CLOCKHARRIS = -DRTCHarrs=1 | |
14 CLOCKCLOUD9 = -DRTCCloud9=1 | |
15 CLOCKSOFT = -DRTCSoft=1 | |
16 CLOCKMESSEMU = -DRTCMessEmu=1 | |
17 CLOCKJVEMU = -DRTCJVEmu=1 | |
18 TC3FLAGS = $(AFLAGS) -DTC3=1 $(FLAGS) | |
19 IDEFLAGS = $(AFLAGS) -DIDE=1 $(FLAGS) | |
20 SDFLAGS = $(AFLAGS) -DCOCOSDC=1 -DITTYP=128 $(FLAGS) | |
21 | |
22 DEPENDS = ./makefile | |
23 TPB = $(3RDPARTY)/booters | |
24 | |
25 BOOTERS = boot_sdc | |
26 BOOTTRACK = rel_80 $(BOOTERS) krn | |
27 KERNEL = krnp2 krnp3_perr krnp4_regdump ccbkrn | |
28 SYSMODS = ioman init sysgo_dd rominfo vectors | |
29 CLOCKS = clock_50hz clock2_soft clock2_dw mc09clock_50hz | |
30 | |
31 RBF = rbf.mn \ | |
32 rbdw.dr dwio.sb \ | |
33 mc09sdc.dr \ | |
34 rammer.dr r0_8k.dd r0_96k.dd r0_128k.dd r0_192k.dd \ | |
35 dds0_80d.dd s0_80d.dd s1_80d.dd s2_80d.dd s3_80d.dd \ | |
36 myram.dr mr0.dd \ | |
37 ddx0.dd x0.dd x1.dd x2.dd x3.dd | |
38 | |
39 SCF = scf.mn \ | |
40 mc6850.dr \ | |
41 term_mc6850.dt term_mc6850_t0.dt term_mc6850_t1.dt \ | |
42 nil.dd \ | |
43 scdwv.dr term_scdwv.dt n_scdwv.dd \ | |
44 n1_scdwv.dd n2_scdwv.dd n3_scdwv.dd \ | |
45 n4_scdwv.dd n5_scdwv.dd n6_scdwv.dd n7_scdwv.dd \ | |
46 n8_scdwv.dd n9_scdwv.dd n10_scdwv.dd n11_scdwv.dd \ | |
47 n12_scdwv.dd n13_scdwv.dd midi_scdwv.dd \ | |
48 term_z_scdwv.dt z1_scdwv.dd z2_scdwv.dd z3_scdwv.dd \ | |
49 z4_scdwv.dd z5_scdwv.dd z6_scdwv.dd z7_scdwv.dd \ | |
50 | |
51 PIPE = pipeman.mn pipeman_named.mn \ | |
52 piper.dr \ | |
53 pipe.dd | |
54 | |
55 RFM = rfm.mn rfmdrv.dr ddy0.dd y0.dd y1.dd y2.dd y3.dd | |
56 | |
57 # The following macros represent a collection of modules for various | |
58 # kernel tracks and bootfile configurations. | |
59 # | |
60 KERNEL_MC09SD = rel_80 boot_sdc krn | |
61 | |
62 ALLOBJS = $(BOOTTRACK) $(KERNEL) $(SYSMODS) $(CLOCKS) $(RBF) $(SCF) $(PIPE) $(RFM) | |
63 | |
64 all: $(ALLOBJS) | |
65 | |
66 # Kernel | |
67 ccbkrn krn krnp2: | |
68 $(CD) kernel; make $@ | |
69 $(OS9COPY) kernel/$@ . | |
70 | |
71 # Special cases | |
72 | |
73 # CoCo/MC09 SDC Booter | |
74 boot_sdc: boot_sdc.asm | |
75 $(AS) $(ASOUT)$@ $< $(SDFLAGS) | |
76 | |
77 # REL Modules | |
78 rel_80: rel.asm | |
79 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DWidth=80 | |
80 | |
81 # SysGo Modules | |
82 sysgo_dd: sysgo.asm | |
83 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDD=1 | |
84 | |
85 # Serial ports for mc09 | |
86 term_mc6850_t0.dt: term_mc6850.asm | |
87 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DTNum=0 -DHwBASE=0xFFD2 | |
88 | |
89 term_mc6850_t1.dt: term_mc6850.asm | |
90 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DTNum=1 -DHwBASE=0xFFD4 | |
91 | |
92 # SDOFFSET is the high 16 bits of the 24-bit block address at | |
93 # which the disk image starts on the SDcard. It must match | |
94 # the value used in the create_sd_image script. | |
95 dds0_80d.dd: mc09sdcdesc.asm | |
96 $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD80) -DDNum=0 -DSDOFFSET=0x0280 -DDD=1 | |
97 | |
98 s0_80d.dd: mc09sdcdesc.asm | |
99 $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD80) -DDNum=0 -DSDOFFSET=0x0280 | |
100 | |
101 s1_80d.dd: mc09sdcdesc.asm | |
102 $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD80) -DDNum=1 -DSDOFFSET=0x0290 | |
103 | |
104 s2_80d.dd: mc09sdcdesc.asm | |
105 $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD80) -DDNum=2 -DSDOFFSET=0x02A0 | |
106 | |
107 s3_80d.dd: mc09sdcdesc.asm | |
108 $(AS) $< $(ASOUT)$@ $(AFLAGS) $(DSDD80) -DDNum=3 -DSDOFFSET=0x02B0 | |
109 | |
110 # RAM Disk descriptors | |
111 r0_8k.dd: r0.asm | |
112 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DRAMSize=8 | |
113 | |
114 ddr0_8k.dd: r0.asm | |
115 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DRAMSize=8 -DDD=1 | |
116 | |
117 r0_96k.dd: r0.asm | |
118 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DRAMSize=96 | |
119 | |
120 ddr0_96k.dd: r0.asm | |
121 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DRAMSize=96 -DDD=1 | |
122 | |
123 r0_128k.dd: r0.asm | |
124 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DRAMSize=128 | |
125 | |
126 ddr0_128k.dd: r0.asm | |
127 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DRAMSize=128 -DDD=1 | |
128 | |
129 r0_192k.dd: r0.asm | |
130 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DRAMSize=192 | |
131 | |
132 ddr0_192k.dd: r0.asm | |
133 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DRAMSize=192 -DDD=1 | |
134 | |
135 # DriveWire SCF descriptors | |
136 term_scdwv.dt: scdwvdesc.asm | |
137 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=0 | |
138 | |
139 n_scdwv.dd: scdwvdesc.asm | |
140 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=255 | |
141 | |
142 n1_scdwv.dd: scdwvdesc.asm | |
143 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=1 | |
144 | |
145 n2_scdwv.dd: scdwvdesc.asm | |
146 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=2 | |
147 | |
148 n3_scdwv.dd: scdwvdesc.asm | |
149 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=3 | |
150 | |
151 n4_scdwv.dd: scdwvdesc.asm | |
152 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=4 | |
153 | |
154 n5_scdwv.dd: scdwvdesc.asm | |
155 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=5 | |
156 | |
157 n6_scdwv.dd: scdwvdesc.asm | |
158 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=6 | |
159 | |
160 n7_scdwv.dd: scdwvdesc.asm | |
161 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=7 | |
162 | |
163 n8_scdwv.dd: scdwvdesc.asm | |
164 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=8 | |
165 | |
166 n9_scdwv.dd: scdwvdesc.asm | |
167 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=9 | |
168 | |
169 n10_scdwv.dd: scdwvdesc.asm | |
170 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=10 | |
171 | |
172 n11_scdwv.dd: scdwvdesc.asm | |
173 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=11 | |
174 | |
175 n12_scdwv.dd: scdwvdesc.asm | |
176 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=12 | |
177 | |
178 n13_scdwv.dd: scdwvdesc.asm | |
179 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=13 | |
180 | |
181 midi_scdwv.dd: scdwvdesc.asm | |
182 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=14 | |
183 | |
184 term_z_scdwv.dt: scdwvdesc.asm | |
185 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=16 | |
186 | |
187 z1_scdwv.dd: scdwvdesc.asm | |
188 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=17 | |
189 | |
190 z2_scdwv.dd: scdwvdesc.asm | |
191 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=18 | |
192 | |
193 z3_scdwv.dd: scdwvdesc.asm | |
194 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=19 | |
195 | |
196 z4_scdwv.dd: scdwvdesc.asm | |
197 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=20 | |
198 | |
199 z5_scdwv.dd: scdwvdesc.asm | |
200 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=21 | |
201 | |
202 z6_scdwv.dd: scdwvdesc.asm | |
203 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=22 | |
204 | |
205 z7_scdwv.dd: scdwvdesc.asm | |
206 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DAddr=23 | |
207 | |
208 # DriveWire RBF descriptors | |
209 ddx0.dd: dwdesc.asm | |
210 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDD=1 -DDNum=0 | |
211 | |
212 x0.dd: dwdesc.asm | |
213 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDNum=0 | |
214 | |
215 x1.dd: dwdesc.asm | |
216 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDNum=1 | |
217 | |
218 x2.dd: dwdesc.asm | |
219 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDNum=2 | |
220 | |
221 x3.dd: dwdesc.asm | |
222 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDNum=3 | |
223 | |
224 # RFM descriptors | |
225 ddy0.dd: rfmdesc.asm | |
226 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDD=1 -DDNum=0 | |
227 | |
228 y0.dd: rfmdesc.asm | |
229 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDNum=0 | |
230 | |
231 y1.dd: rfmdesc.asm | |
232 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDNum=1 | |
233 | |
234 y2.dd: rfmdesc.asm | |
235 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDNum=2 | |
236 | |
237 y3.dd: rfmdesc.asm | |
238 $(AS) $< $(ASOUT)$@ $(AFLAGS) -DDNum=3 | |
239 | |
240 # Clocks | |
241 clock_60hz: clock.asm | |
242 $(AS) $(AFLAGS) $(ASOUT)$@ $< -DPwrLnFrq=60 | |
243 | |
244 clock_50hz: clock.asm | |
245 $(AS) $(AFLAGS) $(ASOUT)$@ $< -DPwrLnFrq=50 | |
246 | |
247 mc09clock_50hz: mc09clock.asm | |
248 $(AS) $(AFLAGS) $(ASOUT)$@ $< -DPwrLnFrq=50 | |
249 | |
250 clean: | |
251 $(CD) kernel; make $@ | |
252 $(RM) $(ALLOBJS) | |
253 | |
254 showobjs: | |
255 @$(ECHO) $(ALLOBJS) | |
256 | |
257 showboottrack: | |
258 @$(ECHO) $(BOOTTRACK) | |
259 | |
260 showkernel: | |
261 @$(ECHO) $(KERNEL) | |
262 | |
263 showsysmods: | |
264 @$(ECHO) $(SYSMODS) | |
265 | |
266 showclocks: | |
267 @$(ECHO) $(CLOCKS) | |
268 | |
269 showrbf: | |
270 @$(ECHO) $(RBF) | |
271 | |
272 showscf: | |
273 @$(ECHO) $(SCF) | |
274 | |
275 showpipe: | |
276 @$(ECHO) $(PIPE) | |
277 | |
278 identify: | |
279 $(IDENT_SHORT) $(ALLOBJS) |