forked from jlothian/INDDGO-survey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
213 lines (176 loc) · 4.11 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
#
# This file is part of INDDGO.
#
# Copyright (C) 2012, Oak Ridge National Laboratory
#
# This product includes software produced by UT-Battelle, LLC
# under Contract No. DE-AC05-00OR22725 with the Department of Energy.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the New BSD 3-clause software license (see LICENSE file).
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# LICENSE for more details.
#
# For more information please contact the INDDGO developers at:
#
include make.inc
MADLIB = ./madness/deploy/lib/libMADworld.a
.PHONY : deps all wis viz util cleandeps cleanwis cleanviz cleanmisc clean cleangraph cleantree testgraph testtree cleanutil
#all: wis viz util doc
all: wis viz util
deps: $(MADLIB)
libs: graph tree ptree
test: testgraph testtree
#----------------------------------------------------------------
# Targets for documentation
#
doc:
test -d $(GRAPH)
@($(CD) "$(GRAPH)";\
$(MAKE) doc;\
$(CD) ..;)
test -d $(TREE)
@($(CD) "$(TREE)";\
$(MAKE) doc;\
$(CD) ..;)
test -d $(UTIL)
@($(CD) "$(UTIL)";\
$(MAKE) doc;\
$(CD) ..;)
ifeq ($(HAS_MADNESS), 1)
test -d $(PTREE)
@($(CD) "$(PTREE)";\
$(MAKE) doc;\
$(CD) ..;)
endif
#----------------------------------------------------------------
# Targets for decomposition libraries
#
graph:
test -d $(GRAPH)
$(MAKE) -C "$(GRAPH)/src";\
tree: deps
test -d $(TREE)
$(MAKE) -C $(TREE)
ptree:
ifeq ($(HAS_MADNESS), 1)
test -d $(PTREE)
@($(CD) "$(PTREE)";\
$(MAKE) ;\
$(CD) ..;)
endif
valtree:
$(MAKE) -C $(TREE) td_valgrind ;\
#----------------------------------------------------------------
# Targets for weighted independent set
#
wis: libs deps
test -d $(WIS)
$(MAKE) -C $(WIS)
#----------------------------------------------------------------
# Targets for visualization
#
viz: graph tree
test -d $(VIZ)
$(MAKE) -C "$(VIZ)"
#----------------------------------------------------------------
# Targets for utilities
#
util: graph tree
test -d $(UTIL)
$(MAKE) -C "$(UTIL)"
#----------------------------------------------------------------
# Target for installing INDDGO-distributed MADNESS runtime.
#
$(MADLIB):
ifeq ($(HAS_MADNESS), 1)
test -d $(MADNESS)
@($(CD) "$(MADNESS)";\
$(AUTOGEN);\
$(CONFIGURE) --prefix=$(MADNESS_INSTALL_DIR);\
$(MAKE) -j 4 libraries; $(MAKE) install;\
$(CD) ..;)
endif
#----------------------------------------------------------------
# Targets for test frameworks
#
testgraph:
ifeq ($(HAS_GTEST), 1)
test -d $(GRAPH)/test
@($(CD) "$(GRAPH)/test";\
$(MAKE) ;\
$(RUN_TEST) ;\
$(CD) ..;)
else
@(echo "Testing not available without HAS_GTEST enabled.")
endif
testtree:
ifeq ($(HAS_GTEST), 1)
test -d $(TREE)/test
@($(CD) "$(TREE)/test";\
$(MAKE) ;\
$(RUN_TEST) ;\
$(CD) ..;)
else
@(echo "Testing not available without HAS_GTEST enabled.")
endif
#----------------------------------------------------------------
# Targets for cleanup
#
# Default cleanup for INDDGO-distributed source and libraries only.
clean:
test -d $(SRC_DIR)
@( \
for f in $(GRAPH)/src $(GRAPH)/test $(PTREE) $(TREE) $(WIS) $(VIZ) $(UTIL); \
do \
$(CD) "$$f"; \
$(MAKE) clean;\
$(CD) ..; \
done );
find . -name '*~' -print0 | xargs -0 rm -f
cleandeps: cleanmad
# Targets for cleaning INDDGO-distributed subdirectories
cleanmad:
test -d $(SRC_DIR)
@($(CD) "$(MADNESS)";\
$(MAKE) distclean;\
$(CD) ..;)
rm -f $(MADLIB)
cleangraph:
test -d $(SRC_DIR)
@($(CD) "$(GRAPH)";\
$(MAKE) clean;\
$(CD) ..;)
cleantree:
test -d $(SRC_DIR)
@($(CD) "$(TREE)";\
$(MAKE) clean;\
$(CD) ..;)
cleanwis:
test -d $(SRC_DIR)
@($(CD) "$(WIS)";\
$(MAKE) clean;\
$(CD) ..;)
cleanviz:
test -d $(SRC_DIR)
@($(CD) "$(VIZ)";\
$(MAKE) clean;\
$(CD) ..;)
cleanutil:
test -d $(SRC_DIR)
@($(CD) "$(UTIL)";\
$(MAKE) clean;\
$(CD) ..;)
clean_doc:
test -d $(SRC_DIR)
@( \
for f in $(GRAPH) $(PTREE) $(TREE) $(UTIL) ; \
do \
$(CD) "$$f"; \
$(MAKE) clean_doc;\
$(CD) ..; \
done );