-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
74 lines (51 loc) · 1.98 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# 3D parallel geometric multigrid makefile
#
# Author : Chris H. Rycroft (UW-Madison / LBL)
# Email : chr@alum.mit.edu
# Date : April 1st 2021
# Load the common configuration file
include ../config.mk
iflags=
lflags=-L.
probs=problem_simple.o test_problem.o
l_objs=buffer.o common.o geometry.o region.o region_tr.o geometry.o multigrid.o
objs=$(probs) $(l_objs)
src=$(patsubst %.o,%.cc,$(objs))
execs=gs_parallel mg_parallel mg_test gmap_test factors iir_test lapack_test gmplus_test guide_test
all:
$(MAKE) executables
executables: $(execs)
depend: $(src)
$(mpicxx) $(iflags) -MM $(src) >Makefile.dep
include Makefile.dep
libpgmg.a: $(l_objs)
rm -f libpgmg.a
ar rs libpgmg.a $^
objects: $(l_objs)
rm -f libpgmg.a
ar rs libpgmg.a $^
gs_parallel: gs_parallel.cc problem_simple.o libpgmg.a
$(mpicxx) $(cflags) $(iflags) -o $@ $< $(lflags) -lpgmg problem_simple.o $(lp_lflags)
mg_parallel: mg_parallel.cc problem_simple.o libpgmg.a
$(mpicxx) $(cflags) $(iflags) -o $@ $< $(lflags) -lpgmg problem_simple.o $(lp_lflags)
mg_test: mg_test.cc problem_simple.o libpgmg.a
$(mpicxx) $(cflags) $(iflags) -o $@ $< $(lflags) -lpgmg problem_simple.o $(lp_lflags)
factors: factors.cc
$(cxx) $(cflags) $(iflags) -o $@ $<
iir_test: iir_test.cc
$(cxx) $(cflags) $(iflags) -o $@ $<
gmap_test: gmap_test.cc
$(cxx) $(cflags) $(iflags) -o $@ $<
lapack_test: lapack_test.cc
$(cxx) $(cflags) $(iflags) -o $@ $< $(lp_lflags)
gmplus_test: gmplus_test.cc problem_simple.o libpgmg.a
$(mpicxx) $(cflags) $(iflags) -o $@ $< $(lflags) -lpgmg problem_simple.o $(lp_lflags)
guide_test: guide_test.cc test_problem.o libpgmg.a
$(mpicxx) $(cflags) $(iflags) -o $@ $< $(lflags) -lpgmg test_problem.o $(lp_lflags)
eigenvalues: eigenvalues.cc problem_simple.o libpgmg.a
$(mpicxx) $(cflags) $(iflags) -o $@ $< $(lflags) $(eigen_iflags) -lpgmg problem_simple.o $(lp_lflags)
%.o: %.cc
$(mpicxx) -Winline $(cflags) $(iflags) -c $<
clean:
rm -rf $(execs) $(objs) libpgmg.a *.dSYM
.PHONY: clean all executables depend objects