blob: 93ce6f11b8d2b7649d64c7f0571572d4d35a7a88 (
plain)
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
|
TUTORIALS=hello number update flash passwd dayfind testsnd endoff hexdump promdump spend0 sound1 3ball shipbell pick6
ZAPS=${wildcard */*.zap}
#tipcalc
#datahid2
STAMPS=${foreach appdir,${TUTORIALS},${appdir}/${appdir}.stamp}
APPS=${STAMPS:%.stamp=%.app}
PS=${APPS:%.app=%.p}
LSTS=${APPS:%.app=%.lst}
HEX=${APPS:%.app=%.app.hex} ${APPS:%.app=%.known_good.hex}
ZAPAPPS=${ZAPS:%.zap=%.zap.app}
CROSS=../../asl/
ZAP2APP=../tools/zap2app
AFLAGS=-i ../include/dl150 -cpu datalink
AS=${CROSS}asl ${AFLAGS}
P2BIN=${CROSS}p2bin
default:${STAMPS} ${APPS} ${ZAPAPPS}
%.stamp:%.app.hex %.known_good.hex
diff -uN ${@:%.stamp=%.app.hex} ${@:%.stamp=%.known_good.hex} && touch $@
${HEX}:${ZAPAPPS}
%.hex:%
yes '' | dd bs=272 count=1 | cat - $< | hexdump -C > $@ || /bin/rm -f $@
%.zap.app:%.zap
${ZAP2APP} $< $@
.PRECIOUS:${APPS}
%.app:%.p
${P2BIN} $< $@ -r 0x110-\$$
%.p:%.asm
${AS} -L ${@:%.p=%.lst} -o $@ $<
clean:
/bin/rm -f ${APPS} ${PS} ${LSTS} ${HEX} ${STAMPS} ${ZAPAPPS}
|