-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
55 lines (41 loc) · 1.19 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
52
53
54
55
ICXX = icpc
GCXX = g++
ICXXFLAGS= -O0
GCXXFLAGS=-O3 -march=native -ffast-math
ICXXOMPFLAG = -qopenmp
GCXXOMPFLAG = -fopenmp
IOPTFLAGS = -g -qopt-report=5 -qopt-report-phase=vec -inline-level=0 -qopt-report-filter="nbody.cc,56-111" [email protected]
GOPTFLAGS = -g
IOBJECTS = nbody.oicc
GOBJECTS = nbody.ogcc
TARGET=app-ICC app-GCC
.SUFFIXES: .oicc .cc .ogcc
all: $(TARGET) instructions
%-ICC: $(IOBJECTS)
$(info )
$(info Linking the ICC executable:)
$(ICXX) $(ICXXFLAGS) $(ICXXOMPFLAG) -o $@ $(IOBJECTS)
%-GCC: $(GOBJECTS)
$(info )
$(info Linking the GCC executable:)
$(GCXX) $(GCXXFLAGS) $(GCXXOMPFLAG) -o $@ $(GOBJECTS)
.cc.oicc:
$(info )
$(info Compiling a ICC object file:)
$(ICXX) -c $(ICXXFLAGS) $(ICXXOMPFLAG) $(IOPTFLAGS) -o "$@" "$<"
.cc.ogcc:
$(info )
$(info Compiling a GCC object file:)
$(GCXX) -c $(GCXXFLAGS) $(GCXXOMPFLAG) $(GOPTFLAGS) -o "$@" "$<"
instructions:
$(info )
$(info TO EXECUTE THE APPLICATION: )
$(info "make run-icc" to run the Intel compiled application)
$(info "make run-gcc" to run the GNU compiled application)
$(info )
run-icc: app-ICC
./app-ICC 65536
run-gcc: app-GCC
./app-GCC 65536
clean:
rm -f $(IOBJECTS) $(GOBJECTS) $(TARGET) *.optrpt