-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
41 lines (29 loc) · 899 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
CXX = icpc
CXXFLAGS = -O3 -openmp
MICFLAGS = -opt-prefetch-distance=8 -opt-streaming-stores always
HOSTFLAGS = -opt-prefetch-distance=8
OBJECTS = \
Transpose-sp-CPU.o Transpose-dp-CPU.o\
Main-sp-CPU.o Main-dp-CPU.o\
Transpose-sp-MIC.o Transpose-dp-MIC.o\
Main-sp-MIC.o Main-dp-MIC.o
TARGETS = runme-sp-CPU runme-dp-CPU runme-sp-MIC runme-dp-MIC
%-sp-CPU.o:
$(CXX) $(CXXFLAGS) $(HOSTFLAGS) -DSINGLE -c -o $@ $*.cc
%-dp-CPU.o:
$(CXX) $(CXXFLAGS) $(HOSTFLAGS) -DDOUBLE -c -o $@ $*.cc
%-sp-MIC.o:
$(CXX) $(CXXFLAGS) $(MICFLAGS) -mmic -DSINGLE -c -o $@ $*.cc
%-dp-MIC.o:
$(CXX) $(CXXFLAGS) $(MICFLAGS) -mmic -DDOUBLE -c -o $@ $*.cc
%-sp-CPU:
$(CXX) $(CXXFLAGS) -o $@ *sp-CPU.o
%-dp-CPU:
$(CXX) $(CXXFLAGS) -o $@ *dp-CPU.o
%-sp-MIC:
$(CXX) $(CXXFLAGS) -mmic -o $@ *sp-MIC.o
%-dp-MIC:
$(CXX) $(CXXFLAGS) -mmic -o $@ *dp-MIC.o
all: $(OBJECTS) $(TARGETS)
clean:
rm -f runme-* *.o