diff options
Diffstat (limited to 'from_toebes/Makefile')
-rw-r--r-- | from_toebes/Makefile | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/from_toebes/Makefile b/from_toebes/Makefile new file mode 100644 index 0000000..93ce6f1 --- /dev/null +++ b/from_toebes/Makefile @@ -0,0 +1,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} |