-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·38 lines (32 loc) · 1.03 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
#
# Edison - NERSC
#
# Intel Compilers are loaded by default; for other compilers please check the module list
#
CC = CC
MPCC = CC
OPENMP = -openmp #Note: this is the flag for Intel compilers. Change this to -fopenmp for GNU compilers. See http://www.nersc.gov/users/computational-systems/edison/programming/using-openmp/
CFLAGS = -O3
LIBS =
TARGETS = serial openmp mpi autograder
all: $(TARGETS)
serial: serial.o common.o
$(CC) -o $@ $(LIBS) serial.o common.o
autograder: autograder.o common.o
$(CC) -o $@ $(LIBS) autograder.o common.o
openmp: openmp.o common.o
$(CC) -o $@ $(LIBS) $(OPENMP) openmp.o common.o
mpi: mpi.o common.o
$(MPCC) -o $@ $(LIBS) $(MPILIBS) mpi.o common.o
autograder.o: autograder.cpp common.h
$(CC) -c $(CFLAGS) autograder.cpp
openmp.o: openmp.cpp common.h
$(CC) -c $(OPENMP) $(CFLAGS) openmp.cpp
serial.o: serial.cpp common.h
$(CC) -c $(CFLAGS) serial.cpp
mpi.o: mpi.cpp common.h
$(MPCC) -c $(CFLAGS) mpi.cpp
common.o: common.cpp common.h
$(CC) -c $(CFLAGS) common.cpp
clean:
rm -f *.o $(TARGETS) *.stdout *.txt