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 ".."
|
|
23 BIN=a09 v09 $(SIM_BIN) v09.rom
|
|
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
|
|
35 v09: v09.o engine.o io.o os9disass.o
|
|
36 $(CC) -o v09 $(CFLAGS) v09.o engine.o io.o os9disass.o
|
|
37
|
|
38 v09.o: v09.c v09.h
|
|
39 $(CC) -c $(CFLAGS) $(V09FLAGS) v09.c
|
|
40
|
|
41 os9disass.o : os9/os9disass.c
|
|
42 $(CC) -c -DNO_MAIN -Wno-format-security $(CFLAGS) $(V09FLAGS) $< -o os9disass.o
|
|
43
|
|
44 engine.o: engine.c v09.h
|
|
45 $(CC) -c $(CFLAGS) $(V09FLAGS) engine.c
|
|
46
|
|
47 io.o: io.c v09.h
|
|
48 $(CC) -c $(CFLAGS) $(V09FLAGS) io.c
|
|
49
|
|
50 v09.rom: makerom monitor.s
|
|
51 ./makerom <monitor.s
|
|
52
|
|
53 monitor.s: monitor.asm
|
|
54 ./a09 -s monitor.s -l monitor.lst monitor.asm
|
|
55
|
|
56 mon2.s: mon2.asm
|
|
57 ./a09 -s mon2.s -l mon2.lst mon2.asm
|
|
58
|
|
59 makerom: makerom.c
|
|
60 $(CC) -o makerom makerom.c
|
|
61
|
|
62 # ------------------------------------
|
|
63
|
|
64 v09s: v09s.c
|
|
65
|
|
66 v09st: v09s.c
|
|
67 $(CC) $(CFLAGS) -DTRACE -o $@ $<
|
|
68
|
|
69 # ------------------------------------
|
|
70
|
|
71 install:
|
|
72 -for bin in $(BIN); do \
|
|
73 [ -r $$bin ] && cp -p $$bin .. && echo "installing ../$$bin ..." ;\
|
|
74 done ;\
|
|
75 exit 0
|
|
76
|
|
77 # ------------------------------------
|
|
78
|
|
79 cleanall: clean
|
|
80 rm -f $(TARGETS) $(OTHER)
|
|
81 (cd ..; rm -f $(BIN) )
|
|
82
|
|
83 clean:
|
|
84 rm -f core *.BAK *.o *.lst
|
|
85
|
|
86 # ------------------------------------
|
|
87
|