To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / Makefile.inc @ 48:1343ecde267e

History | View | Annotate | Download (1.6 KB)

1

    
2
PLUGIN_EXT	?= .so
3

    
4
CXX	?= g++
5
CC	?= gcc
6

    
7
CFLAGS := $(CFLAGS) 
8
CXXFLAGS := -I. $(CXXFLAGS)
9

    
10
LDFLAGS := $(LDFLAGS) -lvamp-sdk
11
PLUGIN_LDFLAGS := $(LDFLAGS) $(PLUGIN_LDFLAGS)
12
TEST_LDFLAGS := $(LDFLAGS) -lboost_unit_test_framework
13

    
14
PLUGIN := cepstral-pitchtracker$(PLUGIN_EXT)
15

    
16
HEADERS := CepstralPitchTracker.h \
17
           MeanFilter.h \
18
	   NoteHypothesis.h \
19
	   PeakInterpolator.h
20

    
21
SOURCES := CepstralPitchTracker.cpp \
22
	   NoteHypothesis.cpp \
23
	   PeakInterpolator.cpp
24

    
25
PLUGIN_MAIN := libmain.cpp
26

    
27
TESTS := test/test-notehypothesis \
28
         test/test-meanfilter \
29
         test/test-fft \
30
         test/test-peakinterpolator
31

    
32
OBJECTS := $(SOURCES:.cpp=.o)
33
OBJECTS := $(OBJECTS:.c=.o)
34

    
35
PLUGIN_OBJECTS := $(OBJECTS) $(PLUGIN_MAIN:.cpp=.o)
36

    
37
all: $(PLUGIN) $(TESTS)
38
	for t in $(TESTS); do echo "Running $$t"; ./"$$t" || exit 1; done
39

    
40
$(PLUGIN): $(PLUGIN_OBJECTS)
41
	$(CXX) -o $@ $^ $(PLUGIN_LDFLAGS)
42

    
43
test/test-notehypothesis: test/TestNoteHypothesis.o $(OBJECTS)
44
	$(CXX) -o $@ $^ $(TEST_LDFLAGS)
45

    
46
test/test-meanfilter: test/TestMeanFilter.o $(OBJECTS)
47
	$(CXX) -o $@ $^ $(TEST_LDFLAGS)
48

    
49
test/test-fft: test/TestFFT.o $(OBJECTS)
50
	$(CXX) -o $@ $^ $(TEST_LDFLAGS)
51

    
52
test/test-peakinterpolator: test/TestPeakInterpolator.o $(OBJECTS)
53
	$(CXX) -o $@ $^ $(TEST_LDFLAGS)
54

    
55
clean:		
56
		rm -f $(OBJECTS) test/*.o
57

    
58
distclean:	clean
59
		rm -f $(PLUGIN) $(TESTS)
60

    
61
# DO NOT DELETE
62

    
63
CepstralPitchTracker.o: CepstralPitchTracker.h NoteHypothesis.h
64
libmain.o: CepstralPitchTracker.h NoteHypothesis.h
65
NoteHypothesis.o: NoteHypothesis.h
66
PeakInterpolator.o: PeakInterpolator.h
67
test/TestNoteHypothesis.o: NoteHypothesis.h
68
test/TestPeakInterpolator.o: PeakInterpolator.h