-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (28 loc) · 869 Bytes
/
Makefile
File metadata and controls
37 lines (28 loc) · 869 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
#
# A template makefile for the MPI assignment.
# Concurrent and Distributed Programming Course, spring 2014.
# Faculty of Mathematics, Informatics and Mechanics.
# University of Warsaw, Warsaw, Poland.
#
# Copyright (C) Piotr Sokolski, 2014.
#
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
MPICC = g++
LDFLAGS = -stdlib=libc++ -lmpi_cxx -lmpi
else
MPICC = mpicc -cc=/bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/powerpc-bgp-linux/bin/g++
LDFLAGS =
endif
CCFLAGS =
MATGEN_TYPE ?= matgen-mt
MATGEN_FILE = $(MATGEN_TYPE).o
all: msp-seq-naive.exe msp-par.exe
msp-par.exe: msp-par.o common.o $(MATGEN_FILE)
$(MPICC) -O3 -o $@ $(LDFLAGS) $^
msp-seq-naive.exe: msp-seq-naive.o $(MATGEN_FILE)
$(MPICC) -O3 -o $@ $(LDFLAGS) $^
%.o: %.c matgen.h common.h Makefile
$(MPICC) $(CCFLAGS) -O3 -c -o $@ $<
clean:
rm -f *.o *core *~ *.out *.err *.exe