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 ".."
|
20
|
23 BIN=a09 v09 v09c $(SIM_BIN) v09.rom
|
0
|
24
|
|
25 TARGETS=$(BIN) $(APPS)
|
|
26
|
|
27 OTHER=monitor.s makerom
|
|
28
|
|
29 all: $(TARGETS)
|
|
30
|
|
31 # ------------------------------------
|
|
32
|
|
33 a09: a09.c os9crc.c
|
|
34
|
20
|
35 v09: v09.o engine.o io.o os9disass.o trace.o
|
|
36 $(CC) -o v09 $(CFLAGS) v09.o engine.o io.o os9disass.o trace.o
|
0
|
37
|
20
|
38 # with Coco MMU
|
|
39 v09c: v09.c engine.c io.c os9disass.o trace.o
|
|
40 $(CC) -o v09c $(CFLAGS) $(V09FLAGS) -DIOPAGE=0xff80 -DUSE_MMU=1 v09.c engine.c io.c os9disass.o trace.o
|
3
|
41
|
0
|
42 v09.o: v09.c v09.h
|
|
43 $(CC) -c $(CFLAGS) $(V09FLAGS) v09.c
|
|
44
|
|
45 os9disass.o : os9/os9disass.c
|
|
46 $(CC) -c -DNO_MAIN -Wno-format-security $(CFLAGS) $(V09FLAGS) $< -o os9disass.o
|
|
47
|
|
48 engine.o: engine.c v09.h
|
|
49 $(CC) -c $(CFLAGS) $(V09FLAGS) engine.c
|
|
50
|
|
51 io.o: io.c v09.h
|
|
52 $(CC) -c $(CFLAGS) $(V09FLAGS) io.c
|
|
53
|
20
|
54 trace.o: trace.c v09.h
|
|
55 $(CC) -c $(CFLAGS) $(V09FLAGS) trace.c
|
|
56
|
0
|
57 v09.rom: makerom monitor.s
|
|
58 ./makerom <monitor.s
|
|
59
|
|
60 monitor.s: monitor.asm
|
|
61 ./a09 -s monitor.s -l monitor.lst monitor.asm
|
|
62
|
|
63 mon2.s: mon2.asm
|
|
64 ./a09 -s mon2.s -l mon2.lst mon2.asm
|
|
65
|
|
66 makerom: makerom.c
|
|
67 $(CC) -o makerom makerom.c
|
|
68
|
|
69 # ------------------------------------
|
|
70
|
|
71 v09s: v09s.c
|
|
72
|
|
73 v09st: v09s.c
|
|
74 $(CC) $(CFLAGS) -DTRACE -o $@ $<
|
|
75
|
|
76 # ------------------------------------
|
|
77
|
|
78 install:
|
|
79 -for bin in $(BIN); do \
|
|
80 [ -r $$bin ] && cp -p $$bin .. && echo "installing ../$$bin ..." ;\
|
|
81 done ;\
|
|
82 exit 0
|
|
83
|
|
84 # ------------------------------------
|
|
85
|
|
86 cleanall: clean
|
|
87 rm -f $(TARGETS) $(OTHER)
|
|
88 (cd ..; rm -f $(BIN) )
|
|
89
|
20
|
90 realclean: cleanall
|
|
91
|
0
|
92 clean:
|
20
|
93 rm -rf core *.BAK *.o *.lst *.dSYM
|
0
|
94
|
|
95 # ------------------------------------
|
|
96
|