Makefile
1.3 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Makefile for midiDmon and midiApp
include $(WORKAREA)/PR/PRdefs
#
# Build the sequence bank with the silent sequence
#
MIDIFILES = Silence.mid
SEQFILES = $(MIDIFILES:.mid=.seq)
.SUFFIXES: .mid .seq .sbk
.mid.seq:
$(MIDICVT) -s $< $*.seq
MIDIBANKS = Silence.sbk
$(MIDIBANKS): $(SEQFILES)
$(SBC) -o Silence.sbk $(SEQFILES)
#
# Build the targets
#
TARGETS = rom midiDmon
APP = midiApp
OPTIMIZER = -g
HFILES = midiApp.h
CODEFILES = midiApp.c
CODEOBJECTS = $(CODEFILES:.c=.o)
CODESEGMENT = codesegment.o
DMONFILES = midiDmon.c
DMONOBJECTS = midiDmon.o
DMONINCS = -I. -I$(ROOT)/usr/include/PR -I$(ROOT)/usr/include -I$(ROOT)/usr/include/sys
DMONOPTS = -fullwarn
MIDILIBS = -lmd
DMONFLAGS = -nostdlib -L$(ROOT)/usr/lib -L.
LCINCS = -I. -I$(ROOT)/usr/include/PR
LCOPTS = -fullwarn -non_shared -G 0
LDIRT = $(APP) *~ *.seq *.sbk
LDFLAGS = -nostdlib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR -lultra
default: $(TARGETS)
include $(COMMONRULES)
$(CODESEGMENT): $(CODEOBJECTS)
$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) $(LDFLAGS)
rom $(APP): $(MIDIBANKS) spec $(CODESEGMENT) $(MAKEROM)
$(MAKEROM) -r rom spec
midiDmon: $(DMONOBJECTS)
$(CC) $(DMONOBJECTS) $(DMONFLAGS) $(MIDILIBS) -o $@
midiDmon.o: midiDmon.c $(HFILES)
$(CC) midiDmon.c -c $(DMONINCS) $(DMONOPTS) -o $@