-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (23 loc) · 1.03 KB
/
Makefile
File metadata and controls
33 lines (23 loc) · 1.03 KB
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
-include config.mk
# config.mk defines: CC, EIGEN_FOUND, and EIGEN_DIR
BUILDPATH=./build/
IPATHS=-I $(EIGEN_DIR)
HEADERS=$(shell find ./CPP -type f -name *.hpp)
TARGETS := $(BUILDPATH)SSEtrick $(BUILDPATH)SSEplain
# If Eigen is found, add the Eigen-dependent targets
ifeq ($(EIGEN_FOUND), 1)
TARGETS += $(BUILDPATH)SSEplainEigen $(BUILDPATH)SSEtrickEigen
endif
$(BUILDPATH)SSEplain: CPP/main.cpp $(HEADERS)
$(CC) -std=c++11 -O3 -march=native -D MODE=MODE_PLAIN CPP/main.cpp -o $(BUILDPATH)SSEplain
$(BUILDPATH)SSEtrick: CPP/main.cpp $(HEADERS)
$(CC) -std=c++11 -O3 -march=native -D MODE=MODE_TRICK CPP/main.cpp -o $(BUILDPATH)SSEtrick
$(BUILDPATH)SSEplainEigen: CPP/main.cpp $(HEADERS)
$(CC) -std=c++11 -O3 -march=native $(IPATHS) -D MODE=MODE_PLAIN_EIGEN CPP/main.cpp -o $(BUILDPATH)SSEplainEigen
$(BUILDPATH)SSEtrickEigen: CPP/main.cpp $(HEADERS)
$(CC) -std=c++11 -O3 -march=native $(IPATHS) -D MODE=MODE_TRICK_EIGEN CPP/main.cpp -o $(BUILDPATH)SSEtrickEigen
.PHONY : all
all: $(TARGETS)
.PHONY : clean
clean:
-rm -rf $(BUILDPATH)*