-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.ICC
46 lines (35 loc) · 1.14 KB
/
Makefile.ICC
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
BOOST_UBLAS_INCLUDE=
BOOST_UBLAS_CXXFLAGS=-I$(BOOST_UBLAS_INCLUDE) -D NDEBUG -DBOOST_UBLAS_NDEBUG
BLAS_INCLUDE=
BLAS_LINK=
BLAS_CXXFLAGS=-isystem $(BLAS_INCLUDE)
BLAS_LDFLAGS=-L$(BLAS_LINK) -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -fopenmp
BLAZE_INCLUDE=
BLAZE_CXXFLAGS=-I$(BLAZE_INCLUDE)
BLAZE_LINK=
BLAZE_LDFLAGS=-L$(BLAZE_LINK) -lblaze
BLITZ_INCLUDE=
BLITZ_CXXFLAGS=-I$(BLITZ_INCLUDE)
BLITZ_LINK=
BLITZ_LDFLAGS=-L$(BLITZ_LINK) -lblitz
CXXFLAGS=-O3 -mtune=core-avx2 -inline-forceinline -Wall -std=c++11 $(BOOST_UBLAS_CXXFLAGS) $(BLAZE_CXXFLAGS) $(BLAS_CXXFLAGS) $(BLITZ_CXXFLAGS)
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)
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)