-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGNUmakefile
75 lines (57 loc) · 2.18 KB
/
GNUmakefile
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
# Run from binaries directory
CXX = c++
CXXFLAGS = -std=c++11 -stdlib=libc++ -Wall -D__MACOSX_CORE__
LDFLAGS = -I include -I include/test
OPENCV_LIBS = -L /usr/local/lib/ -lopencv_core -lopencv_highgui -lopencv_video -lopencv_imgproc
BOOST_LIBS = -L /usr/local/lib/ -lboost_timer -lboost_system
STK_LIBS = -L /usr/local/lib -lstk
RM = rm -f
MV = mv a.out
entry_point = main.cpp
main_assemblies = VideoProvider.o HandTracker.o PointAccountant.o SoundGenerator.o BgSoundGenerator.o NoteGenerator.o LinearConverter.o Note.o NoteProvider.o
main_executable = main.lk
test_entry_point = test.cpp
test_assemblies = PointAccountantTest.o LinearConverterTest.o NoteGeneratorTest.o NoteTest.o InterpolationTest.o TrackFileTest.o StatisticsTest.o
test_executable = test.lk
sample_entry_point = sample.cpp
sample_assemblies = TrackFile.o VideoProvider.o
sample_executable = sample.lk
analysis_entry_point = analysis.cpp
analysis_assemblies = Profiler.o TrackFile.o
analysis_executable = analysis.lk
vpath %.hpp include include/test
vpath %.cpp src src/test
%.o: %.cpp %.hpp
$(CXX) -c $< $(CXXFLAGS) $(LDFLAGS) -o $@
all: $(entry_point) $(main_assemblies)
ctags -R .
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OPENCV_LIBS) $(BOOST_LIBS) $(STK_LIBS) $^
$(MV) $(main_executable)
run: all
./$(main_executable)
tests: $(test_entry_point) $(test_assemblies) $(main_assemblies) $(analysis_assemblies) interpolation.hpp statistics.hpp
ctags -R .
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OPENCV_LIBS) $(STK_LIBS) $^
$(MV) $(test_executable)
run_tests: tests
./$(test_executable)
sample: $(sample_entry_point) $(sample_assemblies) interpolation.hpp
ctags -R .
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OPENCV_LIBS) $(BOOST_LIBS) $(STK_LIBS) $^
$(MV) $(sample_executable)
analysis: $(analysis_entry_point) $(analysis_assemblies) $(main_assemblies)
ctags -R .
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OPENCV_LIBS) $(BOOST_LIBS) $(STK_LIBS) $^
$(MV) $(analysis_executable)
run_analysis: analysis
./$(analysis_executable)
clean:
$(RM) $(main_executable)
$(RM) $(main_assemblies)
$(RM) $(test_executable)
$(RM) $(test_assemblies)
$(RM) $(sample_assemblies)
$(RM) $(sample_executable)
$(RM) $(analysis_assemblies)
$(RM) $(analysis_executable)
$(RM) a.out