-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (40 loc) · 1.7 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
BOOST_UBLAS_INCLUDE=/usr/include/
BOOST_UBLAS_CXXFLAGS=-I$(BOOST_UBLAS_INCLUDE) -D NDEBUG -DBOOST_UBLAS_NDEBUG
BLAS_INCLUDE=/opt/Intel/mkl/include
BLAS_LINK=/opt/Intel/mkl/lib/intel64/
BLAS_CXXFLAGS=-isystem $(BLAS_INCLUDE)
BLAS_LDFLAGS=-L$(BLAS_LINK) -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread
BLAZE_INCLUDE=/home/mcopik/Projekty/RWTH/Seminar/blaze-2.3
BLAZE_CXXFLAGS=-I$(BLAZE_INCLUDE)
BLAZE_LINK=/home/mcopik/Projekty/RWTH/Seminar/blaze-2.3/lib
BLAZE_LDFLAGS=-L$(BLAZE_LINK) -lblaze
BLITZ_INCLUDE=/home/mcopik/Projekty/RWTH/Seminar/blitz_install/include
BLITZ_INCLUDE_ICC=/home/mcopik/Projekty/RWTH/Seminar/blitz_icc/include
BLITZ_CXXFLAGS=-I$(BLITZ_INCLUDE)
BLITZ_CXXFLAGS_ICC=-I$(BLITZ_INCLUDE_ICC)
BLITZ_LINK=/home/mcopik/Projekty/RWTH/Seminar/blitz_install/lib
BLITZ_LINK_ICC=/home/mcopik/Projekty/RWTH/Seminar/blitz_icc/lib
BLITZ_LDFLAGS=-L$(BLITZ_LINK) -lblitz
BLITZ_LDFLAGS_ICC=-L$(BLITZ_LINK_ICC) -lblitz
CXXFLAGS=-O3 -mtune=core-avx2 -inline-forceinline -Wall -std=c++11 $(BOOST_UBLAS_CXXFLAGS) $(BLAZE_CXXFLAGS) $(BLAS_CXXFLAGS) $(BLITZ_CXXFLAGS_ICC)
CXX=icc
SRCDIR=src
SRCS=$(wildcard $(SRCDIR)/*.cpp)
OBJS= $(SRCS:$(SRCDIR)/%.cpp=$(TARGET_DIR)/%.o)
#LDFLAGS=$(BOOST_UBLAS_LDFLAGS) $(BLAZE_LDFLAGS) $(BLAS_LDFLAGS) $(BLITZ_LDFLAGS)
LDFLAGS=$(BOOST_UBLAS_LDFLAGS) $(BLAZE_LDFLAGS) $(BLAS_LDFLAGS) $(BLITZ_LDFLAGS_ICC) -fopenmp
TARGET_DIR=bin
TARGET=$(TARGET_DIR)/benchmark
$(TARGET): $(TARGET_DIR) $(OBJS)
$(CXX) $(CXXFLAGS) -o $(TARGET) $(OBJS) $(LDFLAGS)
all: $(TARGET)
debug: CXXFLAGS += -g
debug: $(TARGET)
$(OBJS): $(TARGET_DIR)/%.o : $(SRCDIR)/%.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
.c.o:
$(CXX) $(CXXFLAGS) -c $< -o $@
$(TARGET_DIR):
mkdir -p $(TARGET_DIR)
clean:
rm -f $(OBJS) $(TARGET)