PROG=msauth ASRCS=msauth.asm APP=${PROG}.app PS=${ASRCS:%.asm=%.p} RLSTS=${ASRCS:%.asm=%.lst} LSTS=${ASRCS:%.asm=%.l} IMG=${PROG}.img S19=${PROG}.srec CROSS=../../asl/ AFLAGS=-i ../include/dl150 -cpu datalink AS=${CROSS}asl ${AFLAGS} P2BIN=${CROSS}p2bin default:${APP} ${LSTS} ${S19} .PRECIOUS:${APP} ${LSTS} %.srec:%.img srec_cat $< -binary -o $@ head -n -1 $@ > $@.tmp mv -f $@.tmp $@ %.img:%.p ${P2BIN} $< $@ -r 0x0-\$$ %.app:%.p ${P2BIN} $< $@ -r 0x110-\$$ %.lst %.p:%.asm ${AS} -L ${@:%.p=%.lst} -o $@ $< %.l:%.lst awk '{ if (($$1!="(1)") && ($$1!=" ") && NF) { print }}' < $< > $@ || /bin/rm -f $@ clean: /bin/rm -f ${APP} ${PS} ${LSTS} ${RLSTS} ${S19}