-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (48 loc) · 1.8 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
# Makefile for Project Timeline
#
# Your compiler
CXX = g++
# Compilation flags
# '-g' turns debugging flags on.
# Not Using O2 flag for optimisation.
CXXFLAGS = -g -I./include -I./src/dlib/all/source.cpp -ljpeg -mavx -lm -lpthread -lX11 -DDLIB_HAVE_BLAS -DNDEBUG -DDLIB_JPEG_SUPPORT -DDLIB_HAVE_AVX -O3 `pkg-config --cflags opencv`
# Linker flags
# When you need to add a library
LDFLAGS = -ljpeg -mavx -lm -lpthread -lX11 `pkg-config --libs opencv` -DDLIB_HAVE_BLAS -DNDEBUG -DDLIB_JPEG_SUPPORT -DDLIB_HAVE_AVX -O3
# all is a target
# $(VAR) gives value of the variable.
# $@ stores the target
# $^ stores the dependency
all: bin/faze
bin/faze: obj/dlib.o obj/fazeModel.o obj/fixedBin.o obj/fazeStream.o obj/pupilDetectionCDF.o obj/pupilDetectionSP.o obj/util.o obj/main.o
$(CXX) -o $@ $^ $(LDFLAGS)
obj/dlib.o: src/dlib/all/source.cpp
mkdir -p obj bin
$(CXX) -c $(CXXFLAGS) -o $@ $<
obj/fazeModel.o: src/fazeModel.cpp
$(CXX) -c $(CXXFLAGS) -o $@ $<
obj/pupilDetectionCDF.o: src/pupilDetectionCDF.cpp
$(CXX) -c $(CXXFLAGS) -o $@ $<
obj/pupilDetectionSP.o: src/pupilDetectionSP.cpp
$(CXX) -c $(CXXFLAGS) -o $@ $<
obj/util.o: src/util.cpp
$(CXX) -c $(CXXFLAGS) -o $@ $<
obj/fazeStream.o: src/fazeStream.cpp
$(CXX) -c $(CXXFLAGS) -o $@ $<
obj/fixedBin.o: src/fixedBin.cpp
$(CXX) -c $(CXXFLAGS) -o $@ $<
#obj/gazeComputationQE.o: src/gazeComputationQE.cpp
# $(CXX) -c $(CXXFLAGS) -o $@ $<
#obj/gazeComputationVA.o: src/gazeComputationVA.cpp
# $(CXX) -c $(CXXFLAGS) -o $@ $<
obj/main.o: src/main.cpp
$(CXX) -c $(CXXFLAGS) -o $@ $<
# .PHONY tells make that 'all' or 'clean' aren't _actually_ files, and always
# execute the compilation action when 'make all' or 'make clean' are used
.PHONY: all oic
# Delete all the temporary files we've created so far
clean:
mv obj/dlib.o .
rm -rf obj/*
mv dlib.o obj/
rm -rf bin/*