-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
42 lines (36 loc) · 1.02 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
#
# Stampede - TACC
#
# Intel Compilers are loaded by default; for other compilers please check the module list
#
CC = g++
MPCC = mpicxx
OPENMP = -fopenmp
CFLAGS = -O3 -g
LIBS =
TARGETS = serial pthreads 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
pthreads: pthreads.o common.o
$(CC) -o $@ $(LIBS) -pthread pthreads.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
pthreads.o: pthreads.cpp common.h
$(CC) -c $(CFLAGS) pthreads.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