forked from jampekka/gazesim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (23 loc) · 885 Bytes
/
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
DEBUG ?= 0
ifeq ($(DEBUG), 1)
CFLAGS=-g -O0 -DEIGEN_DONT_VECTORIZE -DEIGEN_DONT_ALIGN_STATICALLY
else
CFLAGS=-DNDEBUG -Ofast
endif
fast_saccade_detectors.so: fast_saccade_detectors.pyx segmented_regression.hpp
cython2 $<
g++ $(CFLAGS) -I. -std=c++11 -shared `python2-config --includes` `pkg-config --cflags --libs eigen3` -o fast_saccade_detectors.so fast_saccade_detectors.c
iocs_perf: iocs_perf.cpp segmented_regression.hpp
g++ `pkg-config --cflags --libs eigen3` $(CFLAGS) -std=c++11 -o $@ -Wall -g $<
.PHONY: perftest
perftest: iocs_perf
./iocs_perf 1000000 10 1
.PHONY: benchmark
benchmark: benchmark.py fast_saccade_detectors.so gazesim.py saccade_detectors.py
./benchmark.py
.PHONY: iocs_perf.callgrind
iocs_perf.callgrind: iocs_perf
valgrind --tool=callgrind --callgrind-out-file=$@ ./$< 100000 0.1 4
.PHONY: profile
profile: iocs_perf.callgrind
kcachegrind $<