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 @ 41:16908c2bd781

History | View | Annotate | Download (1.36 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
	   NoteHypothesis.h \
18
	   PeakInterpolator.h
19

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

    
24
PLUGIN_MAIN := libmain.cpp
25

    
26
TESTS := test/test-notehypothesis \
27
         test/test-peakinterpolator
28

    
29
OBJECTS := $(SOURCES:.cpp=.o)
30
OBJECTS := $(OBJECTS:.c=.o)
31

    
32
PLUGIN_OBJECTS := $(OBJECTS) $(PLUGIN_MAIN:.cpp=.o)
33

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

    
37
$(PLUGIN): $(PLUGIN_OBJECTS)
38
	$(CXX) -o $@ $^ $(PLUGIN_LDFLAGS)
39

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

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

    
46
clean:		
47
		rm -f $(OBJECTS) test/*.o
48

    
49
distclean:	clean
50
		rm -f $(PLUGIN) $(TESTS)
51

    
52
# DO NOT DELETE
53

    
54
CepstralPitchTracker.o: CepstralPitchTracker.h NoteHypothesis.h
55
libmain.o: CepstralPitchTracker.h NoteHypothesis.h
56
NoteHypothesis.o: NoteHypothesis.h
57
PeakInterpolator.o: PeakInterpolator.h
58
test/TestNoteHypothesis.o: NoteHypothesis.h
59
test/TestPeakInterpolator.o: PeakInterpolator.h