-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (26 loc) · 716 Bytes
/
Makefile
File metadata and controls
38 lines (26 loc) · 716 Bytes
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
CFLAGS = -O3 -lm
CC = gcc
MCC = mpicc
all: build
MM_PARALLEL_OBJS=mm-parallel.o MyMPI.o
build: mm-parallel make-matrix mm-serial print-matrix
mm-parallel: $(MM_PARALLEL_OBJS)
$(MCC) $(CFLAGS) $(MM_PARALLEL_OBJS) -o $@
mm-parallel.o: mm-parallel.c
$(MCC) $(CFLAGS) $< -c -o $@
MyMPI.o: MyMPI.c MyMPI.h
$(MCC) $(CFLAGS) $< -c -o $@
make-matrix: make-matrix.o
$(CC) $< -o $@
make-matrix.o: make-matrix.c
$(CC) $(CFLAGS) $< -c -o $@
mm-serial: mm-serial.o
$(CC) $< -o $@
mm-serial.o: mm-serial.c
$(CC) $(CFLAGS) $< -c -o $@
print-matrix: print-matrix.o
$(CC) $< -o $@
print-matrix.o: print-matrix.c
$(CC) $(CFLAGS) $< -c -o $@
clean:
rm -rf mm-parallel make-matrix mm-serial print-matrix core* *.o