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 @ 47:f72a470fe4b5

History | View | Annotate | Download (1.51 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-peakinterpolator
30

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

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

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

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

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

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

    
48
test/test-peakinterpolator: test/TestPeakInterpolator.o $(OBJECTS)
49
	$(CXX) -o $@ $^ $(TEST_LDFLAGS)
50

    
51
clean:		
52
		rm -f $(OBJECTS) test/*.o
53

    
54
distclean:	clean
55
		rm -f $(PLUGIN) $(TESTS)
56

    
57
# DO NOT DELETE
58

    
59
CepstralPitchTracker.o: CepstralPitchTracker.h NoteHypothesis.h
60
libmain.o: CepstralPitchTracker.h NoteHypothesis.h
61
NoteHypothesis.o: NoteHypothesis.h
62
PeakInterpolator.o: PeakInterpolator.h
63
test/TestNoteHypothesis.o: NoteHypothesis.h
64
test/TestPeakInterpolator.o: PeakInterpolator.h