0
|
1 #
|
|
2 # Makefile Sim6809
|
|
3 #
|
|
4 # created 1994 by L.C. Benschop
|
|
5 # 2013-10-28 - Jens Diemer: add "clean" section
|
|
6 # 2014-06-25 - J.E. Klasek
|
|
7 #
|
|
8 # copyleft (c) 1994-2014 by the sbc09 team, see AUTHORS for more details.
|
|
9 # license: GNU General Public License version 2, see LICENSE for more details.
|
|
10 #
|
|
11
|
|
12 # CFLAGS=-O3 -fomit-frame-pointer -DTERM_CONTROL
|
|
13 CFLAGS=-g -DTERM_CONTROL
|
|
14
|
|
15 V09FLAGS= -DUSE_TERMIOS #-DBIG_ENDIAN
|
|
16
|
|
17
|
|
18 SIM_BIN=v09s v09st
|
|
19
|
|
20 APPS=mon2.s
|
|
21
|
|
22 # will be installed to ".."
|
22
|
23 BIN=a09 v09 v09c d09 $(SIM_BIN) v09.rom
|
0
|
24
|
|
25 TARGETS=$(BIN) $(APPS)
|
|
26
|
|
27 OTHER=monitor.s makerom
|
|
28
|
|
29 all: $(TARGETS)
|
|
30
|
|
31 # ------------------------------------
|
|
32
|
22
|
33 a09 : a09.o os9crc.o
|
|
34 $(CC) $(CFLAGS) $(V09FLAGS) a09.o os9crc.o -o $@
|
0
|
35
|
22
|
36 v09: v09.o engine.o io.o d09.o trace.o
|
|
37 $(CC) -o v09 $(CFLAGS) v09.o engine.o io.o d09.o trace.o
|
0
|
38
|
20
|
39 # with Coco MMU
|
22
|
40 v09c: v09.c engine.c io.c d09.o trace.o
|
|
41 $(CC) -o v09c $(CFLAGS) $(V09FLAGS) -DIOPAGE=0xff80 -DUSE_MMU=1 v09.c engine.c io.c d09.o trace.c
|
3
|
42
|
22
|
43 a09.o : a09.c
|
|
44 $(CC) -c $(CFLAGS) $(V09FLAGS) $<
|
|
45
|
|
46 v09.o: v09.c
|
|
47 $(CC) -c $(CFLAGS) $(V09FLAGS) $<
|
0
|
48
|
22
|
49 d09 : d09.c
|
|
50 $(CC) -Wno-format-security $(CFLAGS) $(V09FLAGS) $< -o $@
|
|
51
|
|
52 d09.o : d09.c
|
|
53 $(CC) -c -DNO_MAIN -Wno-format-security $(CFLAGS) $(V09FLAGS) $<
|
0
|
54
|
22
|
55 engine.o: engine.c
|
|
56 $(CC) -c $(CFLAGS) $(V09FLAGS) $<
|
0
|
57
|
22
|
58 io.o: io.c
|
|
59 $(CC) -c $(CFLAGS) $(V09FLAGS) $<
|
0
|
60
|
20
|
61 trace.o: trace.c v09.h
|
22
|
62 $(CC) -c $(CFLAGS) $(V09FLAGS) $<
|
20
|
63
|
0
|
64 v09.rom: makerom monitor.s
|
|
65 ./makerom <monitor.s
|
|
66
|
|
67 monitor.s: monitor.asm
|
|
68 ./a09 -s monitor.s -l monitor.lst monitor.asm
|
|
69
|
|
70 mon2.s: mon2.asm
|
|
71 ./a09 -s mon2.s -l mon2.lst mon2.asm
|
|
72
|
|
73 makerom: makerom.c
|
|
74 $(CC) -o makerom makerom.c
|
|
75
|
|
76 # ------------------------------------
|
|
77
|
|
78 v09s: v09s.c
|
22
|
79 $(CC) $(CFLAGS) -o $@ $<
|
0
|
80
|
|
81 v09st: v09s.c
|
|
82 $(CC) $(CFLAGS) -DTRACE -o $@ $<
|
|
83
|
|
84 # ------------------------------------
|
|
85
|
|
86 install:
|
|
87 -for bin in $(BIN); do \
|
|
88 [ -r $$bin ] && cp -p $$bin .. && echo "installing ../$$bin ..." ;\
|
|
89 done ;\
|
|
90 exit 0
|
|
91
|
|
92 # ------------------------------------
|
|
93
|
|
94 cleanall: clean
|
33
|
95 rm -rf $(TARGETS) $(OTHER)
|
|
96 (cd ..; rm -rf $(BIN) )
|
0
|
97
|
20
|
98 realclean: cleanall
|
|
99
|
0
|
100 clean:
|
20
|
101 rm -rf core *.BAK *.o *.lst *.dSYM
|
0
|
102
|
|
103 # ------------------------------------
|
|
104
|
22
|
105 # DO NOT DELETE
|
|
106
|
|
107 engine.o: v09.h
|
|
108 io.o: v09.h
|
|
109 trace.o: v09.h
|
|
110 v09.o: v09.h
|