-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (35 loc) · 1.26 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
43
44
45
46
47
48
49
FC = mpif90
FFLAGS = -O3
#FFLAGS = -O3 -g -traceback -check all
LIBNAME = libdstcltmtx.a
OBJ_DISTRIBUTE = $(LIBNAME)(complex_dstmtx.o) \
$(LIBNAME)(double_dstmtx.o) \
$(LIBNAME)(real_dstmtx.o)
OBJ_COLLECT = $(LIBNAME)(complex_cltmtx.o) \
$(LIBNAME)(double_cltmtx.o) \
$(LIBNAME)(real_cltmtx.o)
OBJ_EXTRA = $(LIBNAME)(findnode.o)
all: $(LIBNAME)
$(LIBNAME): $(OBJ_DISTRIBUTE) $(OBJ_COLLECT) $(OBJ_EXTRA)
complex_dstmtx.o: dstmtx.F90
$(FC) $(FFLAGS) -c -o $@ -DDISTRIBUTE=complex_dstmtx \
-DTIPO=complex*16 -DTYPE_MPI=MPI_DOUBLE_COMPLEX $<
double_dstmtx.o: dstmtx.F90
$(FC) $(FFLAGS) -c -o $@ -DDISTRIBUTE=double_dstmtx \
-DTIPO=real*8 -DTYPE_MPI=MPI_DOUBLE_PRECISION $<
real_dstmtx.o: dstmtx.F90
$(FC) $(FFLAGS) -c -o $@ -DDISTRIBUTE=real_dstmtx -DTIPO=real*4 \
-DTYPE_MPI=MPI_REAL $<
complex_cltmtx.o: cltmtx.F90
$(FC) $(FFLAGS) -c -o $@ -DCOLLECT=complex_cltmtx \
-DTIPO=complex*16 -DTYPE_MPI=MPI_DOUBLE_COMPLEX $<
double_cltmtx.o: cltmtx.F90
$(FC) $(FFLAGS) -c -o $@ -DCOLLECT=double_cltmtx -DTIPO=real*8 \
-DTYPE_MPI=MPI_DOUBLE_PRECISION $<
real_cltmtx.o: cltmtx.F90
$(FC) $(FFLAGS) -c -o $@ -DCOLLECT=real_cltmtx \
-DTIPO=real*4 -DTYPE_MPI=MPI_REAL $<
findnode.o: findnode.F90
$(FC) $(FFLAGS) -c -o $@ $<
clean:
rm -f $(LIBNAME) *.o core*