-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
37 lines (29 loc) · 822 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
31
32
33
34
35
36
37
#
# "gnu" or "intel"
#
tools = intel
ifeq ($(tools),gnu)
compiler = g++
flags = -Ofast -fopenmp -pipe -flto -std=c++2a -march=native -mcpu=native # -ggdb
fWarn = -Wall -Wextra -pedantic
libs = -larmadillo
else ifeq ($(tools),intel)
compiler = icpc
flags = -Ofast -parallel -align -march=native -mcpu=native -qopenmp -std=c++20 # -ggdb
fWarn = -pedantic -w2 -wd383,1419,1599,11074,11076
libs = -larmadillo -qmkl
else
$(error Unknown toolchain?)
endif
.PHONY: all clean cleanresults ccc format
all: main.cpp TimeSeries.o
$(compiler) $(flags) $(fWarn) -o main *.o main.cpp ${libs}
TimeSeries.o: TimeSeries.cpp TimeSeries.hpp
$(compiler) $(flags) $(fWarn) -c TimeSeries.cpp
clean:
rm -f ./main ./*.o
cleanresults:
rm -f ./*.h5
ccc: clean cleanresults
format:
clang-format -i ./*.cpp ./*.hpp