-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (33 loc) · 917 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
#
# COMET - SDSC
#
# Load Intel compiler prior to make any target, e.g., module load intel
# For other compilers please check the module list
#
CC = icpc
MPCC = mpicxx
OPENMP = -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