-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
530 lines (416 loc) · 16.8 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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
%.o: %.c
# cc64 sources and binaries
commonsrcs_ascii = $(wildcard src/common/*.fth)
commonsrcs = $(patsubst src/common/%, %, $(commonsrcs_ascii))
cc64srcs_ascii = $(wildcard src/cc64/*.fth)
cc64srcs = $(patsubst src/cc64/%, %, $(cc64srcs_ascii))
peddisrcs_ascii = $(wildcard src/peddi/*.fth)
peddisrcs = $(patsubst src/peddi/%, %, $(peddisrcs_ascii))
cc64srcs_c64 = $(patsubst %, c64files/%, $(cc64srcs) $(commonsrcs))
cc64srcs_c16 = $(patsubst %, c16files/%, $(cc64srcs) $(commonsrcs))
cc64srcs_x16 = $(patsubst %, x16files/%, $(cc64srcs) $(commonsrcs))
peddisrcs_c64 = $(patsubst %, c64files/%, $(peddisrcs) $(commonsrcs))
peddisrcs_c16 = $(patsubst %, c16files/%, $(peddisrcs) $(commonsrcs))
cc64_binaries = cc64 cc64pe peddi
cc64_c64_t64_files = $(patsubst %, autostart-c64/%.T64, $(cc64_binaries))
cc64_c16_t64_files = $(patsubst %, autostart-c16/%.T64, $(cc64_binaries))
profiler_binaries = cc64time cc64prof cc64pftm
profiler_t64_files = $(patsubst %, autostart-c64/%.T64, $(profiler_binaries))
# runtime, lib and sample files
rt_files = \
rt-c64-08-9f.h rt-c64-08-9f.i rt-c64-08-9f.o \
rt-c16-10-7f.h rt-c16-10-7f.i rt-c16-10-7f.o \
rt-x16-08-9e.h rt-x16-08-9e.i rt-x16-08-9e.o
lib_files = \
libc-c64.h libc-c64.i libc-c64.o \
libc-c16.h libc-c16.i libc-c16.o \
libc-x16.h libc-x16.i libc-x16.o
libc_headers = ctype.h stdio.h stdlib.h string.h
sample_files = $(patsubst src/samples/%, %, $(wildcard src/samples/*.c))
# c64files content
c64dir_content = $(cc64_binaries) $(rt_files) $(lib_files) \
$(libc_headers) $(sample_files) c-charset
c64dir_files = $(patsubst %, c64files/% , $(c64dir_content))
# c16files content
c16dir_content = $(cc64_binaries) $(rt_files) $(lib_files) \
$(libc_headers) $(sample_files) c-charset
c16dir_files = $(patsubst %, c16files/% , $(c16dir_content))
# x16files content
x16dir_content = cc64 $(rt_files) $(lib_files) \
$(libc_headers) $(sample_files) c-charset
x16dir_files = $(patsubst %, x16files/% , $(x16dir_content))
# PETSCII sources and VolksForth bases for manual recompile
recompile_dir = recompile-cc64
recompile_srcs = $(patsubst %, $(recompile_dir)/%, \
$(cc64srcs) $(peddisrcs) $(commonsrcs))
recompile_forths = $(patsubst forth/%, $(recompile_dir)/%, \
$(wildcard forth/v4th*))
# Forth binaries
forth_binaries = devenv-uF83
forth_t64_files = $(patsubst %, autostart-c64/%.T64, $(forth_binaries))
# Location of emulators' ROM files containing their chargen
vice_c64_chargen = ~/.config/vice/C64/chargen
vice_c16_kernal = ~/.config/vice/PLUS4/kernal
x16emu_rom = $(shell emulator/which-x16emu-rom.sh)
c_charset_roms = $(patsubst %, emulator/% , \
c64-c-chargen c16-c-kernal x16-c-rom.bin)
all: c64 c16 x16 etc
release: cc64-doc.zip \
cc64-c64files.zip cc64-c64files.d64 \
cc64-c16files.zip cc64-c16files.d64 \
cc64-x16files.zip cc64-x16files-sdcard.zip cc64-x16files.d64 \
$(recompile_dir).zip
rm -rf release
mkdir release
cp -p $^ release/
.SECONDARY:
c64: cc64-c64-t64 $(c64dir_files) cc64-c64files.zip cc64-c64files.d64
c16: cc64-c16-t64 $(c16dir_files) cc64-c16files.zip cc64-c16files.d64
x16: $(x16dir_files) cc64-x16files.zip cc64-x16files-sdcard.zip \
cc64-x16files.d64
cc64-c64-t64: $(cc64_c64_t64_files) $(profiler_t64_files)
cc64-c16-t64: $(cc64_c16_t64_files)
cc64-c64files.zip: $(c64dir_files) COPYING
rm -f $@
zip -r $@ $^
cc64-c16files.zip: $(c16dir_files) COPYING
rm -f $@
zip -r $@ $^
cc64-x16files.zip: $(x16dir_files) COPYING
rm -f $@
zip -r $@ $^
cc64-c64files.d64: $(c64dir_files) tmp/copying
rm -f $@
c1541 -format cc64-c64,cc d64 $@
c1541 -attach $@ $(patsubst %, -write c64files/%, $(cc64_binaries))
c1541 -attach $@ -write c64files/rt-c64-08-9f.h rt-c64-08-9f.h,s
c1541 -attach $@ -write c64files/rt-c64-08-9f.i
c1541 -attach $@ -write c64files/rt-c64-08-9f.o
c1541 -attach $@ -write c64files/rt-c16-10-7f.h rt-c16-10-7f.h,s
c1541 -attach $@ -write c64files/rt-c16-10-7f.i
c1541 -attach $@ -write c64files/rt-c16-10-7f.o
c1541 -attach $@ -write c64files/rt-x16-08-9e.h rt-x16-08-9e.h,s
c1541 -attach $@ -write c64files/rt-x16-08-9e.i
c1541 -attach $@ -write c64files/rt-x16-08-9e.o
c1541 -attach $@ -write c64files/libc-c64.h libc-c64.h,s
c1541 -attach $@ -write c64files/libc-c64.i
c1541 -attach $@ -write c64files/libc-c64.o
c1541 -attach $@ -write c64files/libc-c16.h libc-c16.h,s
c1541 -attach $@ -write c64files/libc-c16.i
c1541 -attach $@ -write c64files/libc-c16.o
c1541 -attach $@ -write c64files/libc-x16.h libc-x16.h,s
c1541 -attach $@ -write c64files/libc-x16.i
c1541 -attach $@ -write c64files/libc-x16.o
c1541 -attach $@ -write c64files/c-charset
c1541 -attach $@ -write c64files/helloworld-c64.c helloworld-c64.c,s
c1541 -attach $@ -write c64files/kernal-io-c64.c kernal-io-c64.c,s
c1541 -attach $@ -write c64files/helloworld-c16.c helloworld-c16.c,s
c1541 -attach $@ -write c64files/kernal-io-c16.c kernal-io-c16.c,s
c1541 -attach $@ -write c64files/helloworld-x16.c helloworld-x16.c,s
c1541 -attach $@ -write c64files/sieve-c64.c sieve-c64.c,s
c1541 -attach $@ -write c64files/vccc2023-c64.c vccc2023-c64.c,s
c1541 -attach $@ -write c64files/vccc2023-c16.c vccc2023-c16.c,s
c1541 -attach $@ -write c64files/vccc2023-x16.c vccc2023-x16.c,s
c1541 -attach $@ -write tmp/copying
cc64-c16files.d64: $(c16dir_files) tmp/copying
rm -f $@
c1541 -format cc64-c16,cc d64 $@
c1541 -attach $@ $(patsubst %, -write c16files/%, $(cc64_binaries))
c1541 -attach $@ -write c16files/rt-c64-08-9f.h rt-c64-08-9f.h,s
c1541 -attach $@ -write c16files/rt-c64-08-9f.i
c1541 -attach $@ -write c16files/rt-c64-08-9f.o
c1541 -attach $@ -write c16files/rt-c16-10-7f.h rt-c16-10-7f.h,s
c1541 -attach $@ -write c16files/rt-c16-10-7f.i
c1541 -attach $@ -write c16files/rt-c16-10-7f.o
c1541 -attach $@ -write c16files/rt-x16-08-9e.h rt-x16-08-9e.h,s
c1541 -attach $@ -write c16files/rt-x16-08-9e.i
c1541 -attach $@ -write c16files/rt-x16-08-9e.o
c1541 -attach $@ -write c16files/libc-c64.h libc-c64.h,s
c1541 -attach $@ -write c16files/libc-c64.i
c1541 -attach $@ -write c16files/libc-c64.o
c1541 -attach $@ -write c16files/libc-c16.h libc-c16.h,s
c1541 -attach $@ -write c16files/libc-c16.i
c1541 -attach $@ -write c16files/libc-c16.o
c1541 -attach $@ -write c16files/libc-x16.h libc-x16.h,s
c1541 -attach $@ -write c16files/libc-x16.i
c1541 -attach $@ -write c16files/libc-x16.o
c1541 -attach $@ -write c16files/c-charset
c1541 -attach $@ -write c16files/helloworld-c64.c helloworld-c64.c,s
c1541 -attach $@ -write c16files/kernal-io-c64.c kernal-io-c64.c,s
c1541 -attach $@ -write c16files/helloworld-c16.c helloworld-c16.c,s
c1541 -attach $@ -write c16files/kernal-io-c16.c kernal-io-c16.c,s
c1541 -attach $@ -write c16files/helloworld-x16.c helloworld-x16.c,s
c1541 -attach $@ -write c16files/sieve-c64.c sieve-c64.c,s
c1541 -attach $@ -write c16files/vccc2023-c64.c vccc2023-c64.c,s
c1541 -attach $@ -write c16files/vccc2023-c16.c vccc2023-c16.c,s
c1541 -attach $@ -write c16files/vccc2023-x16.c vccc2023-x16.c,s
c1541 -attach $@ -write tmp/copying
cc64-x16files.d64: $(x16dir_files) tmp/copying
rm -f $@
c1541 -format cc64-x16,cc d64 $@
c1541 -attach $@ -write x16files/cc64 cc64
c1541 -attach $@ -write x16files/rt-c64-08-9f.h rt-c64-08-9f.h,s
c1541 -attach $@ -write x16files/rt-c64-08-9f.i
c1541 -attach $@ -write x16files/rt-c64-08-9f.o
c1541 -attach $@ -write x16files/rt-c16-10-7f.h rt-c16-10-7f.h,s
c1541 -attach $@ -write x16files/rt-c16-10-7f.i
c1541 -attach $@ -write x16files/rt-c16-10-7f.o
c1541 -attach $@ -write x16files/rt-x16-08-9e.h rt-x16-08-9e.h,s
c1541 -attach $@ -write x16files/rt-x16-08-9e.i
c1541 -attach $@ -write x16files/rt-x16-08-9e.o
c1541 -attach $@ -write x16files/libc-c64.h libc-c64.h,s
c1541 -attach $@ -write x16files/libc-c64.i
c1541 -attach $@ -write x16files/libc-c64.o
c1541 -attach $@ -write x16files/libc-c16.h libc-c16.h,s
c1541 -attach $@ -write x16files/libc-c16.i
c1541 -attach $@ -write x16files/libc-c16.o
c1541 -attach $@ -write x16files/libc-x16.h libc-x16.h,s
c1541 -attach $@ -write x16files/libc-x16.i
c1541 -attach $@ -write x16files/libc-x16.o
c1541 -attach $@ -write x16files/c-charset
c1541 -attach $@ -write x16files/helloworld-c64.c helloworld-c64.c,s
c1541 -attach $@ -write x16files/kernal-io-c64.c kernal-io-c64.c,s
c1541 -attach $@ -write x16files/helloworld-c16.c helloworld-c16.c,s
c1541 -attach $@ -write x16files/kernal-io-c16.c kernal-io-c16.c,s
c1541 -attach $@ -write x16files/helloworld-x16.c helloworld-x16.c,s
c1541 -attach $@ -write x16files/sieve-c64.c sieve-c64.c,s
c1541 -attach $@ -write x16files/vccc2023-c64.c vccc2023-c64.c,s
c1541 -attach $@ -write x16files/vccc2023-c16.c vccc2023-c16.c,s
c1541 -attach $@ -write x16files/vccc2023-x16.c vccc2023-x16.c,s
c1541 -attach $@ -write tmp/copying
cc64-x16files-sdcard.zip: $(x16dir_files) emulator/copy-to-sd-img.sh \
emulator/mk-sdcard.sh emulator/sdcard.sfdisk tmp/copying
rm -f x16files.img $@
emulator/mk-sdcard.sh emulator/sdcard.sfdisk x16files.img
mformat -i x16files.img -F
emulator/copy-to-sd-img.sh x16files.img $(x16dir_files)
mcopy -i x16files.img tmp/copying ::COPYING
zip $@ x16files.img
tmp/copying: COPYING
test -d tmp || mkdir tmp
ascii2petscii $< $@
cc64-doc.zip: $(wildcard *.md) COPYING
zip $@ $^
etc: $(forth_t64_files) emulator/c-char-rom-gen
# PETSCII sources and VolksForth bases for manual recompile
recompile_dir = recompile-cc64
recompile_srcs = $(patsubst %, $(recompile_dir)/%, \
$(cc64srcs) $(peddisrcs) $(commonsrcs))
recompile_forths = $(patsubst forth/%, $(recompile_dir)/%, \
$(wildcard forth/v4th*))
$(recompile_dir).zip: COPYING recompile-readme \
$(recompile_dir)/0readme $(recompile_srcs) $(recompile_forths)
rm -f $@
zip -r $@ $^
$(recompile_dir)/%.fth: src/*/%.fth
test -d $(recompile_dir) || mkdir $(recompile_dir)
ascii2petscii $< $@
$(recompile_dir)/%: forth/%
test -d $(recompile_dir) || mkdir $(recompile_dir)
cp $< $@
recompile-readme: doc/recompile-readme
cp $< $@
$(recompile_dir)/0readme: doc/recompile-readme
test -d $(recompile_dir) || mkdir $(recompile_dir)
ascii2petscii $< $@
clean:
rm -f c64files/*.fth c16files/*.fth x16files/*.fth
rm -f c64files/*.log c16files/*.log x16files/*.log
rm -f x16files.img recompile-readme
rm -f [cx][16][64]files/notdone cc64-doc.zip
rm -rf release tmp/*
rm -rf $(recompile_dir) $(recompile_dir).zip
rm -rf lib/cbmfiles/*
rm -f c[16][64]files/cc64size autostart-c[16][64]/cc64size.T64
$(MAKE) -C emulator clean
$(MAKE) -C tests/e2e clean
$(MAKE) -C tests/integration clean
$(MAKE) -C tests/lib clean
$(MAKE) -C tests/peddi clean
$(MAKE) -C tests/unit clean
veryclean: clean
rm -f c64files/*
rm -f c64files.d64 c64files.zip
rm -f c16files/*
rm -f c16files.d64 c16files.zip
rm -f x16files/*
rm -f x16files.zip
rm -f emulator/c-char-rom-gen
rm -f autostart-c64/*.T64 autostart-c16/*.T64
rm -f runtime/*
# Convenience rule for interactive debugging/developing:
# Provide all Forth sources in c64files/ in PETSCII format.
petscii64: $(cc64srcs_c64) $(peddisrcs_c64)
test64: autostart-c64/cc64.T64
$(MAKE) -C tests/unit tests
$(MAKE) -C tests/e2e fasttests64
$(MAKE) -C tests/integration tests
$(MAKE) -C tests/lib tests
alltests: sut
$(MAKE) -C tests/e2e alltests
$(MAKE) -C tests/unit tests
$(MAKE) -C tests/integration tests
$(MAKE) -C tests/peddi tests
$(MAKE) -C tests/lib alltests
fasttests: sut
$(MAKE) -C tests/e2e fasttests
$(MAKE) -C tests/unit tests
$(MAKE) -C tests/integration tests
$(MAKE) -C tests/peddi tests
$(MAKE) -C tests/lib alltests
slowtests: sut
$(MAKE) -C tests/e2e slowtests
$(MAKE) -C tests/unit tests
$(MAKE) -C tests/integration tests
$(MAKE) -C tests/peddi tests
$(MAKE) -C tests/lib alltests
fastcrosstests: sut
$(MAKE) -C tests/e2e fastcrosstests
slowcrosstests: sut
$(MAKE) -C tests/e2e slowcrosstests
proftests: sut
$(MAKE) -C tests/e2e proftests
sut: autostart-c64/cc64.T64 autostart-c16/cc64.T64 x16files/cc64 \
autostart-c64/cc64pe.T64 autostart-c16/cc64pe.T64 \
autostart-c64/peddi.T64 autostart-c16/peddi.T64 \
autostart-c64/cc64prof.T64 \
$(c64dir_files) $(c16dir_files) $(x16dir_files) $(c_charset_roms)
# cc64 build rules
%files/cc64: $(cc64srcs_c64) $(cc64srcs_c16) \
emulator/build-binary.sh emulator/run-in-vice.sh \
autostart-%/vf-build-base.T64
emulator/build-binary.sh $* cc64
%files/cc64pe: \
$(cc64srcs_c64) $(cc64srcs_c16) \
$(peddisrcs_c64) $(peddisrcs_c16) \
emulator/build-binary.sh emulator/run-in-vice.sh \
autostart-%/vf-build-base.T64
emulator/build-binary.sh $* cc64pe
%files/peddi: $(peddisrcs_c64) $(peddisrcs_c16) \
emulator/build-binary.sh emulator/run-in-vice.sh \
autostart-%/vf-build-base.T64
emulator/build-binary.sh $* peddi
x16files/cc64: $(cc64srcs_x16) \
emulator/build-binary.sh emulator/run-in-x16emu.sh \
x16files/vf-build-base
emulator/build-binary.sh x16 cc64
c64files/cc64prof: $(cc64srcs_c64) \
emulator/build-binary.sh emulator/run-in-vice.sh \
autostart-c64/vf-build-base.T64
emulator/build-binary.sh c64 cc64prof
c64files/cc64time: $(cc64srcs_c64) \
emulator/build-binary.sh emulator/run-in-vice.sh \
autostart-c64/vf-build-base.T64
emulator/build-binary.sh c64 cc64time
c64files/cc64pftm: $(cc64srcs_c64) \
emulator/build-binary.sh emulator/run-in-vice.sh \
autostart-c64/vf-build-base.T64
emulator/build-binary.sh c64 cc64pftm
%files/cc64size: $(cc64srcs_c64) $(cc64srcs_c16) \
emulator/build-binary.sh emulator/run-in-vice.sh \
autostart-%/vf-build-base.T64
emulator/build-binary.sh $* cc64size
# X16 sizes rule disabled because X16 doesn't have enough regular RAM
# for the profiler on top of cc64.
# x16files/cc64size: $(cc64srcs_x16) \
# emulator/build-binary.sh emulator/run-in-x16emu.sh \
# x16files/vf-build-base
# emulator/build-binary.sh x16 cc64size
# profiler bucket size rule
%-buckets.sizes: autostart-%/cc64size.T64 \
emulator/run-in-%emu.sh
rm -f $*files/buckets.sizes
emulator/run-in-$*emu.sh cc64size \
"logfile buckets.sizes sizes logclose dos s0:notdone"
petscii2ascii $*files/buckets.sizes $@
# build base rules
c64files/vf-build-base: forth/v4th-c64
cp $< $@
c16files/vf-build-base: forth/v4th-c16+
cp $< $@
x16files/vf-build-base: forth/v4th-x16
cp $< $@
$(recompile_dir)/%: forth/%
cp $< $@
# Runtime module rules
runtime/%.o runtime/%.h runtime/%.i: src/runtime/*
test -d tmp || mkdir tmp
acme -f cbm -l tmp/$*.sym -o runtime/$*.o \
-I src/runtime src/runtime/$*.a
awk -f src/runtime/generate_runtime_h.awk -F '$$' \
tmp/$*.sym > runtime/$*.h
acme -f cbm -l tmp/$*.staticsym -o tmp/$*.j \
-Dcc64_generate_statics=1 \
-I src/runtime src/runtime/$*.a
init_skip=`awk -f src/runtime/extract_init_skip.awk -F '$$' \
tmp/$*.staticsym` && \
echo $$init_skip && \
dd if=tmp/$*.j of=runtime/$*.i bs=$$init_skip skip=1
# Library rules
libc_files = $(sort $(wildcard src/lib/*.c) $(wildcard src/lib/*/*.c))
lib/libc-c64.c: $(libc_files) runtime/*
echo '#include <lib-cio-c64.h>' | cat - $(libc_files) >$@
lib/libc-c16.c: $(libc_files) runtime/*
echo '#include <lib-cio-c16.h>' | cat - $(libc_files) >$@
lib/libc-x16.c: $(libc_files) runtime/*
echo '#include <lib-cio-x16.h>' | cat - $(libc_files) >$@
lib/libc-%.h lib/libc-%.i lib/libc-%.o: lib/libc-%.c \
autostart-c64/cc64.T64 \
runtime/lib-cio-%.h runtime/lib-cio-%.i runtime/lib-cio-%.o
emulator/compile-lib.sh libc-$*
lib_libc_headers = $(patsubst %, lib/% , $(libc_headers))
libc_headers_src = $(patsubst %, src/lib/include/% , $(libc_headers))
$(lib_libc_headers): $(libc_headers_src)
lib/%.h: src/lib/include/%.h
cp $< $@
# Charset rules
c64files/c-charset: src/runtime/c-charset-c64.a
test -d tmp || mkdir tmp
acme -f cbm -l tmp/c-charset-c64.sym -o $@ $<
c16files/c-charset: src/runtime/c-charset-c16.a
test -d tmp || mkdir tmp
acme -f cbm -l tmp/c-charset-c16.sym -o $@ $<
x16files/c-charset: src/runtime/c-charset-x16.a
test -d tmp || mkdir tmp
acme -f cbm -l tmp/c-charset-x16.sym -o $@ $<
emulator/c-char-rom-gen: src/runtime/c-char-rom-gen.a
acme -f cbm -o $@ $<
emulator/c64-c-chargen: $(vice_c64_chargen)
patch-c-charset -n 2048 -i 3072 $< $@
touch -m -r $< $@
emulator/c16-c-kernal: $(vice_c16_kernal)
patch-c-charset -n 5120 $< $@
touch -m -r $< $@
emulator/x16-c-rom.bin: $(x16emu_rom)
patch-c-charset -n 99328 $< $@
touch -m -r $< $@
# Generic T64 tape image rules
autostart-c64/%.T64: c64files/%
bin2t64 $< $@
autostart-c64/%.T64: forth/%
bin2t64 $< $@
autostart-c16/%.T64: c16files/%
bin2t64 $< $@
autostart-c16/%.T64: forth/%
bin2t64 $< $@
autostart-x16/%.T64: x16files/%
bin2t64 $< $@
# Generic rules to populate c64files/, c16files/, x16files/
c64files/%: src/*/%
emulator/copy-to-emu.sh $< $@
c16files/%: src/*/%
emulator/copy-to-emu.sh $< $@
x16files/%: src/*/%
emulator/copy-to-emu.sh $< $@
c64files/%: lib/%
emulator/copy-to-emu.sh $< $@
c16files/%: lib/%
emulator/copy-to-emu.sh $< $@
x16files/%: lib/%
emulator/copy-to-emu.sh $< $@
c64files/%: runtime/%
emulator/copy-to-emu.sh $< $@
c16files/%: runtime/%
emulator/copy-to-emu.sh $< $@
x16files/%: runtime/%
emulator/copy-to-emu.sh $< $@