blob: 1f5bafb1287e87fe98ff6bfc5333f398b0edcafe (
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
47
48
|
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
EMUL=../../sim68xx/src/boards/sim6805
default:${APP} ${LSTS} ${S19}
.PRECIOUS:${APP} ${LSTS}
%.srec:%.img %.map
#srec_cat -Execution_Start_Address `awk '{if ($$2=="TEST") {print "0x"$$1}}' < ${@:%.srec=%.map} ` ${@:%.srec=%.img} -binary -o $@
srec_cat ${@:%.srec=%.img} -binary -o $@
head -n -1 $@ > $@.tmp
mv -f $@.tmp $@
%.img:%.p
${P2BIN} $< $@ -r 0x0-\$$
%.app:%.p
${P2BIN} $< $@ -r 0x110-\$$
%.map %.lst %.p:%.asm
${AS} -g -L ${@:%.p=%.lst} -o $@ $<
${CROSS}/process_map ${@:%.p=%.map}
%.l:%.lst
awk '{ if (($$1!="(1)") && ($$1!="") && NF) { print }}' < $< > $@ || /bin/rm -f $@
do_test: ${PROG}.srec
${EMUL} $< < emul.script
clean:
/bin/rm -f ${APP} ${PS} ${LSTS} ${RLSTS} ${S19}
|