-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
182 lines (135 loc) · 6.15 KB
/
Makefile
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
CC=g++
BUILD=build
SRC=src
BIN=bin
INCLUDE=include
TEST=test
MKDIR_P=mkdir -p
NNLS_CHROMA=nnls-chroma-1.1
MIDIFILE=midifile
MIDIFILE_INC=$(MIDIFILE)/include
MIDIFILE_SRC=$(MIDIFILE)/src-library
TESTS = test_key test_pitchclass test_keyprofile \
test_keytransition test_hiddenmarkovmodel test_chromagram
CFLAGS=-I$(INCLUDE) --std=c++11 -O3
LFLAGS=-O3
ADDITIONAL_LIBRARIES=-lsndfile -lvamp-hostsdk -ldl
.PHONY: directories clean
all: directories justkeydding
test: directories $(TESTS)
directories: $(BUILD) $(BIN)
$(BUILD):
$(MKDIR_P) $(BUILD)
$(BIN):
$(MKDIR_P) $(BIN)
clean:
rm -R $(BUILD)
rm -R $(BIN)
$(BUILD)/midi.o: $(SRC)/midi.cc
$(CC) -c -o $(BUILD)/midi.o $(SRC)/midi.cc \
$(CFLAGS) -I$(MIDIFILE_INC)
$(BUILD)/Binasc.o: $(MIDIFILE_SRC)/Binasc.cpp
$(CC) -c -o $(BUILD)/Binasc.o $(MIDIFILE_SRC)/Binasc.cpp \
$(CFLAGS) -I$(MIDIFILE_INC)
$(BUILD)/MidiEvent.o: $(MIDIFILE_SRC)/MidiEvent.cpp
$(CC) -c -o $(BUILD)/MidiEvent.o $(MIDIFILE_SRC)/MidiEvent.cpp \
$(CFLAGS) -I$(MIDIFILE_INC)
$(BUILD)/MidiEventList.o: $(MIDIFILE_SRC)/MidiEventList.cpp
$(CC) -c -o $(BUILD)/MidiEventList.o $(MIDIFILE_SRC)/MidiEventList.cpp \
$(CFLAGS) -I$(MIDIFILE_INC)
$(BUILD)/MidiFile.o: $(MIDIFILE_SRC)/MidiFile.cpp
$(CC) -c -o $(BUILD)/MidiFile.o $(MIDIFILE_SRC)/MidiFile.cpp \
$(CFLAGS) -I$(MIDIFILE_INC)
$(BUILD)/MidiMessage.o: $(MIDIFILE_SRC)/MidiMessage.cpp
$(CC) -c -o $(BUILD)/MidiMessage.o $(MIDIFILE_SRC)/MidiMessage.cpp \
$(CFLAGS) -I$(MIDIFILE_INC)
justkeydding: $(BUILD)/justkeydding.o \
$(BUILD)/key.o $(BUILD)/pitchclass.o \
$(BUILD)/keyprofile.o $(BUILD)/keytransition.o \
$(BUILD)/chromagram.o $(BUILD)/hiddenmarkovmodel.o \
$(BUILD)/NNLSChroma.o $(BUILD)/NNLSBase.o \
$(BUILD)/chromamethods.o $(BUILD)/nnls.o \
$(BUILD)/midi.o $(BUILD)/Binasc.o \
$(BUILD)/MidiEvent.o $(BUILD)/MidiEventList.o \
$(BUILD)/MidiFile.o $(BUILD)/MidiMessage.o
$(CC) -o $(BIN)/justkeydding $(BUILD)/justkeydding.o \
$(BUILD)/key.o $(BUILD)/pitchclass.o $(BUILD)/keyprofile.o \
$(BUILD)/keytransition.o $(BUILD)/chromagram.o \
$(BUILD)/hiddenmarkovmodel.o $(BUILD)/NNLSChroma.o \
$(BUILD)/NNLSBase.o $(BUILD)/chromamethods.o $(BUILD)/nnls.o \
$(BUILD)/midi.o $(BUILD)/Binasc.o $(BUILD)/MidiEvent.o \
$(BUILD)/MidiEventList.o $(BUILD)/MidiFile.o $(BUILD)/MidiMessage.o \
$(LFLAGS) $(ADDITIONAL_LIBRARIES)
$(BUILD)/justkeydding.o: $(SRC)/justkeydding.cc
$(CC) -c -o$(BUILD)/justkeydding.o $(SRC)/justkeydding.cc \
$(CFLAGS) -I$(NNLS_CHROMA) -I$(MIDIFILE_INC)
test_key: $(BUILD)/test_key.o $(BUILD)/key.o
$(CC) -o $(BIN)/test_key $(BUILD)/test_key.o \
$(BUILD)/key.o $(LFLAGS)
$(BUILD)/test_key.o: $(TEST)/test_key.cc
$(CC) -c -o $(BUILD)/test_key.o $(TEST)/test_key.cc $(CFLAGS)
$(BUILD)/key.o: $(SRC)/key.cc
$(CC) -c -o $(BUILD)/key.o $(SRC)/key.cc $(CFLAGS)
test_pitchclass: $(BUILD)/test_pitchclass.o $(BUILD)/pitchclass.o
$(CC) -o $(BIN)/test_pitchclass $(BUILD)/test_pitchclass.o \
$(BUILD)/pitchclass.o $(LFLAGS)
$(BUILD)/test_pitchclass.o: $(TEST)/test_pitchclass.cc
$(CC) -c -o $(BUILD)/test_pitchclass.o \
$(TEST)/test_pitchclass.cc $(CFLAGS)
$(BUILD)/pitchclass.o: $(SRC)/pitchclass.cc
$(CC) -c -o $(BUILD)/pitchclass.o $(SRC)/pitchclass.cc $(CFLAGS)
test_keyprofile: $(BUILD)/test_keyprofile.o $(BUILD)/keyprofile.o \
$(BUILD)/pitchclass.o $(BUILD)/key.o
$(CC) -o $(BIN)/test_keyprofile $(BUILD)/test_keyprofile.o \
$(BUILD)/keyprofile.o $(BUILD)/pitchclass.o $(BUILD)/key.o $(LFLAGS)
$(BUILD)/test_keyprofile.o: $(TEST)/test_keyprofile.cc
$(CC) -c -o $(BUILD)/test_keyprofile.o \
$(TEST)/test_keyprofile.cc $(CFLAGS)
$(BUILD)/keyprofile.o: $(SRC)/keyprofile.cc
$(CC) -c -o $(BUILD)/keyprofile.o $(SRC)/keyprofile.cc $(CFLAGS)
test_keytransition: $(BUILD)/test_keytransition.o $(BUILD)/keytransition.o \
$(BUILD)/key.o $(BUILD)/pitchclass.o
$(CC) -o $(BIN)/test_keytransition $(BUILD)/test_keytransition.o \
$(BUILD)/keytransition.o $(BUILD)/key.o $(BUILD)/pitchclass.o $(LFLAGS)
$(BUILD)/test_keytransition.o: $(TEST)/test_keytransition.cc
$(CC) -c -o $(BUILD)/test_keytransition.o \
$(TEST)/test_keytransition.cc $(CFLAGS)
$(BUILD)/keytransition.o: $(SRC)/keytransition.cc
$(CC) -c -o $(BUILD)/keytransition.o $(SRC)/keytransition.cc $(CFLAGS)
test_hiddenmarkovmodel: $(BUILD)/test_hiddenmarkovmodel.o \
$(BUILD)/pitchclass.o $(BUILD)/key.o $(BUILD)/keytransition.o \
$(BUILD)/keyprofile.o $(BUILD)/hiddenmarkovmodel.o
$(CC) -o $(BIN)/test_hiddenmarkovmodel $(BUILD)/test_hiddenmarkovmodel.o \
$(BUILD)/pitchclass.o $(BUILD)/key.o $(BUILD)/keytransition.o \
$(BUILD)/keyprofile.o $(BUILD)/hiddenmarkovmodel.o $(LFLAGS)
$(BUILD)/test_hiddenmarkovmodel.o: $(TEST)/test_hiddenmarkovmodel.cc
$(CC) -c -o $(BUILD)/test_hiddenmarkovmodel.o \
$(TEST)/test_hiddenmarkovmodel.cc $(CFLAGS)
$(BUILD)/hiddenmarkovmodel.o: $(SRC)/hiddenmarkovmodel.cc
$(CC) -c -o $(BUILD)/hiddenmarkovmodel.o \
$(SRC)/hiddenmarkovmodel.cc $(CFLAGS)
test_chromagram: $(BUILD)/test_chromagram.o $(BUILD)/chromagram.o \
$(BUILD)/pitchclass.o $(BUILD)/key.o $(BUILD)/keytransition.o \
$(BUILD)/keyprofile.o $(BUILD)/hiddenmarkovmodel.o \
$(BUILD)/NNLSChroma.o $(BUILD)/NNLSBase.o \
$(BUILD)/chromamethods.o $(BUILD)/nnls.o
$(CC) -o $(BIN)/test_chromagram $(BUILD)/test_chromagram.o \
$(BUILD)/chromagram.o $(BUILD)/pitchclass.o $(BUILD)/key.o \
$(BUILD)/keytransition.o $(BUILD)/keyprofile.o \
$(BUILD)/hiddenmarkovmodel.o $(BUILD)/NNLSChroma.o \
$(BUILD)/NNLSBase.o $(BUILD)/chromamethods.o $(BUILD)/nnls.o \
$(LFLAGS) $(ADDITIONAL_LIBRARIES)
$(BUILD)/test_chromagram.o: $(TEST)/test_chromagram.cc
$(CC) -c -o $(BUILD)/test_chromagram.o \
$(TEST)/test_chromagram.cc $(CFLAGS) -I$(NNLS_CHROMA)
$(BUILD)/NNLSChroma.o: $(NNLS_CHROMA)/NNLSChroma.cpp
$(CC) -c -o $(BUILD)/NNLSChroma.o $(NNLS_CHROMA)/NNLSChroma.cpp
$(BUILD)/NNLSBase.o: $(NNLS_CHROMA)/NNLSBase.cpp
$(CC) -c -o $(BUILD)/NNLSBase.o $(NNLS_CHROMA)/NNLSBase.cpp
$(BUILD)/chromamethods.o: $(NNLS_CHROMA)/chromamethods.cpp
$(CC) -c -o $(BUILD)/chromamethods.o $(NNLS_CHROMA)/chromamethods.cpp
$(BUILD)/nnls.o: $(NNLS_CHROMA)/nnls.c
$(CC) -c -o $(BUILD)/nnls.o $(NNLS_CHROMA)/nnls.c
$(BUILD)/chromagram.o: $(SRC)/chromagram.cc
$(CC) -c -o $(BUILD)/chromagram.o $(SRC)/chromagram.cc \
$(CFLAGS) -I$(NNLS_CHROMA) -D_VAMP_PLUGIN_IN_HOST_NAMESPACE