-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
73 lines (59 loc) · 1.85 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
TOPSRCDIR = .
include $(TOPSRCDIR)/common.mk
DIRS := src/classes src/functions src/util examples/distributed
OBJLIBS := libclasses.a libfunctions.a libutil.a
EXAMPLES := examples
.PHONY: dirs $(DIRS)
dirs: $(DIRS)
$(DIRS):
$(MAKE) -C $@
LINK_EXECUTABLE = $(CXX) $< $(OBJLIBS) $(LDFLAGS) -o $@; \
mkdir -p bin; \
$(MV) $@ bin/
# H2 matrix distributed construction.
.PHONY: examples/distributed/H2_construct
examples/distributed/H2_construct:
$(MAKE) -C $@
H2_construct : % : dirs examples/distributed/H2_construct
$(MPICXX) libH2_construct.a libdistributed.a $(OBJLIBS) $(LDFLAGS) \
$(PARSEC_LIB) $(SCALAPACK_LIB) $(ELSES_OBJ) \
-o $@; \
mkdir -p bin; \
$(MV) $@ bin/
# parsec H2 matrix
.PHONY: examples/distributed/H2_dtd
examples/distributed/H2_dtd:
$(MAKE) -C $@
H2_dtd : % : dirs examples/distributed/H2_dtd
$(MPICXX) libH2_dtd.a libdistributed.a $(OBJLIBS) $(LDFLAGS) $(PARSEC_LIB) $(SCALAPACK_LIB) -o $@; \
mkdir -p bin; \
$(MV) $@ bin/
# non-distributed H2 code
.PHONY: examples/distributed/H2
examples/distributed/H2:
$(MAKE) -C $@
H2_main : % : dirs examples/distributed/H2
$(CXX) libH2_main.a libdistributed.a $(OBJLIBS) $(LDFLAGS) -o $@; \
mkdir -p bin; \
$(MV) $@ bin/
# non-distributed H2 code
.PHONY: examples/distributed/H2_eigen
examples/distributed/H2_eigen:
$(MAKE) -C $@
H2_eigen : % : dirs examples/distributed/H2_eigen
$(CXX) libH2_eigen.a libdistributed.a $(OBJLIBS) \
/home/sameer.deshmukh/ELSES_mat_calc-master/src/src.a \
/home/sameer.deshmukh/ELSES_mat_calc-master/xmlf90-1.2g-elses/macros/lib/libflib.a \
$(LDFLAGS) -o $@; \
mkdir -p bin; \
$(MV) $@ bin/
.PHONY: clean
.SILENT: clean
clean:
for dir in $(DIRS) \
examples/distributed/H2 examples/distributed/H2_construct \
examples/distributed/H2_dtd examples/distributed/H2_ptg \
$(TEST) $(EXAMPLES); do \
$(MAKE) -C $$dir -f Makefile $@; \
done
$(RM) $(OBJLIBS) bin/ *.a