-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (43 loc) · 1.63 KB
/
Copy pathMakefile
File metadata and controls
61 lines (43 loc) · 1.63 KB
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
TALIDIR := ../tali
C65 := $(TALIDIR)/tools/c65/c65
TALIUC := $(TALIDIR)/taliforth-uc.bin
TALISYM := $(TALIDIR)/platform/uc/uc-labelmap.txt
PYTHON := python3
all: rom
clean:
rm -f data/*_fpp.fs data/advent.dat data/advent.blk data/advent.rom
rom: data/advent.rom
runtime:
cd $(TALIDIR) && $(MAKE) $(TALIUC)
data/advent.rom: data/advent.blk runtime
echo 'no\nquit\ny\nbye' | \
$(C65) -r $(TALIUC) -m 0xffe0 -b $<
dd bs=1024 skip=64 count=64 if=data/advent.blk > $@
play: rom
$(C65) -r data/advent.rom -m 0xffe0
debug: rom
$(C65) -r data/advent.rom -m 0xffe0 -l $(TALISYM) -gg
data/advent.blk: scripts/advblk.py data/boot_fpp.fs data/advent_fpp.fs data/advent.dat
$(PYTHON) scripts/advblk.py
data/advent.dat: scripts/advpack.py data/advent.json
$(PYTHON) scripts/advpack.py
data/advent.json: scripts/advextract.py
$(PYTHON) scripts/advextract.py
data/advent_fpp.fs: src/*.fs
data/%_fpp.fs: src/%.fs
$(PYTHON) scripts/fpp.py --strip-whitespace --consts-inline $< -o $@
excursions = $(wildcard tests/excursion*.txt)
tests: $(patsubst %.txt,%.fs.log,$(excursions)) $(patsubst %.txt,%.c.log,$(excursions))
tests/excursion6.fs.log: tests/excursion5.fs.log
tests/excursion5.fs.log: tests/excursion3.fs.log # there is currently no 4
tests/excursion3.fs.log: tests/excursion2.fs.log
tests/excursion2.fs.log: tests/excursion1.fs.log
.FORCE:
%.fs.log: %.txt .FORCE
grep -v '#C' $< | sed -E 's/ *(#.*)?$$//' | \
$(C65) -r data/advent.rom -b data/advent.blk -m 0xffe0 | \
$(PYTHON) tests/canonical.py > $@
%.c.log: %.txt .FORCE
grep -v '#F' $< | sed -E 's/ *(#.*)?$$//' | \
../adventure-original/src/advent | \
$(PYTHON) tests/canonical.py > $@