-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (41 loc) · 972 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
38
39
40
41
42
43
44
45
46
47
48
49
CXX = icpc
CXXFLAGS = -std=c++11 -Wall -Wextra -O3 -qopenmp
LDFLAGS = -std=c++11 -qopenmp
TARGET =
ifdef ISA
ifeq ($(ISA),mic)
TARGET = -mmic
else
ifeq ($(ISA),avx)
TARGET = -xavx
else
ifeq ($(ISA),avx2)
TARGET = -xCORE-AVX2
else
TARGET = -xavx
endif # avx2
endif # avx
endif # mic
else
TARGET = -xCORE-AVX2
endif # empty
CXXFLAGS += $(TARGET)
LDFLAGS += $(TARGET)
# Use default MKL path
#CXXFLAGS += -mkl -DMKL
#LDFLAGS += -mkl -DMKL
# Define your own MKL path
#MKL = -DMKL
#ifdef MKL
#MKL_INSTALL_PATH = /home/yourname/yourmklpath
#MKLINCLUDES = -DMKL -I$(MKL_INSTALL_PATH)/include
#MKLLIBS = -L$(MKL_INSTALL_PATH)/lib/intel64 -mkl -lmkl_core -lmkl_intel_lp64 -lmkl_intel_thread
##MKLLIBS = -L$(MKL_INSTALL_PATH)/lib/mic -mkl -lmkl_core -lmkl_intel_lp64 -lmkl_intel_thread
#CXXFLAGS += $(MKLINCLUDES)
#LDFLAGS += $(MKLLIBS)
#endif
all: sptrans.out
sptrans.out: main.cpp
$(CXX) ${CXXFLAGS} $(LDFLAGS) $^ -o $@
clean:
rm -rf sptrans.out