-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
32 lines (27 loc) · 1.21 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
.DEFAULT_GOAL := all
CXX := clang++
CXXFLAGS := -O3 -Isrc -I eigen
ifeq ($(CXX),g++)
OMPFLAGS := -fopenmp
else ifeq ($(CXX),clang++)
OMPFLAGS += -fopenmp=libomp
endif
ABIFLAG := 0
POPLARFLAGS :=-std=c++17 -L/opt/poplar/lib64 -lpoplar
# Compile benchmark and test. We could create and link against a re-usable
# library, but will leave for now.
all:
$(CXX) $(CXXFLAGS) $(OPTFLAGS) src/test.cpp src/TrackGenerator.cpp src/KalmanFilter.cpp -o trackr_test
$(CXX) $(CXXFLAGS) $(OPTFLAGS) src/benchmark.cpp src/TrackGenerator.cpp src/KalmanFilter.cpp -o trackr_benchmark
$(CXX) $(CXXFLAGS) $(OMPFLAGS) $(OPTFLAGS) src/benchmark_omp.cpp src/TrackGenerator.cpp src/KalmanFilter.cpp -o trackr_benchmark_omp
# Compile benchmark and test for IPU.
ipu:
$(CXX) $(CXXFLAGS) -D_GLIBCXX_USE_CXX11_ABI=$(ABIFLAG) $(POPLARFLAGS) $(OPTFLAGS) src/benchmark_ipu.cpp src/TrackGenerator.cpp src/KalmanFilterIPU.cpp -o trackr_benchmark_ipu
$(CXX) $(CXXFLAGS) -D_GLIBCXX_USE_CXX11_ABI=$(ABIFLAG) $(POPLARFLAGS) $(OPTFLAGS) src/test_ipu.cpp src/TrackGenerator.cpp src/KalmanFilterIPU.cpp -o trackr_test_ipu
# Remove binaries.
clean:
rm -f trackr_test
rm -f trackr_benchmark
rm -f trackr_benchmark_omp
rm -f trackr_test_ipu
rm -f trackr_benchmark_ipu