]> cloudbase.mooo.com Git - z180-stamp.git/blob - z180/Tupfile
Merge branch 'chan-fatfs' into fatfs-integration
[z180-stamp.git] / z180 / Tupfile
1 include_rules
2
3 PROG = hdrom
4 CFBOOT = cfboot
5
6 SRC = init.180
7 SRC += ddtz.180
8 SRC += msgbuf-a.180 conbuf-a.180
9 #SRC += bioscio.180 chario.180
10 SRC += console.180
11 SRC += asci-p.180
12 SRC += romend.180
13
14
15 AS_OPT = MFS
16
17 LN_PROG = 0
18 LN_DATA = C000
19
20
21 ###############################################################################
22 # Executables
23
24 CPMEMU = zxcc
25
26 #AS = $(CPMEMU) ccpline.com
27 AS = $(CPMEMU) slr180.com
28
29
30 ###############################################################################
31
32 !AS-plain = |> $(AS) -%B/$(AS_OPT) |> %B.rel | %B.lst
33
34 !AS = |> ^ $(AS) -%B/$(AS_OPT)^ set +e; OUTPUT=\$(mktemp);\
35 $(AS) -%B/$(AS_OPT) > ${OUTPUT};\
36 grep -q '^ 0 Error(s) Detected' ${OUTPUT}; ERROR=$?;\
37 [ "${ERROR}" != "0" ] && cat ${OUTPUT};\
38 [ "${ERROR}" != "0" ] && rm -f %B.rel;\
39 rm -f ${OUTPUT}; exit ${ERROR} \
40 |> %B.rel | %B.lst
41
42 #!LINK = |> ld80 -o %o -ms %O.map -P $(LN_PROG) -D $(LN_DATA) %f |> | %O.map
43 !LINK = |> ld80 -o %o -ms %O.map -P $(LN_PROG) %f |> | %O.map
44
45 #ifndef DEBUG
46
47 : foreach $(SRC) |> !AS |> {objs}
48 : {objs} |> !LINK |> $(PROG).hex
49 : $(PROG).hex |> srec_cat -o %o -c_array %B -C_COMpressed -include %f -Intel |> $(PROG).c | $(PROG).h
50
51
52 : $(CFBOOT).180 |> $(AS) -%B/HFS |> %B.hex | %B.lst
53 : $(CFBOOT).hex |> srec_cat -o %o -c_array %B -C_COMpressed -include %f -Intel |> $(CFBOOT).c | $(CFBOOT).h
54
55 #COMMAND="$(AS) -%B/$(AS_OPT)"; \
56
57
58 #endif