-
Notifications
You must be signed in to change notification settings - Fork 17
/
fobos
347 lines (309 loc) · 8.49 KB
/
fobos
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
[modes]
modes = shared-gnu static-gnu shared-gnu-debug static-gnu-debug
shared-intel static-intel shared-intel-debug static-intel-debug
shared-ibm static-ibm shared-ibm-debug static-ibm-debug
tests-gnu tests-gnu-debug
tests-intel tests-intel-debug
tests-ibm tests-ibm-debug
[common-variables]
$CSHARED_GNU = -c -fPIC -frealloc-lhs
$CSHARED_INT = -c -fpic -assume realloc_lhs
$CSHARED_IBM = -c -qpic -qmkshrobj -qxlf2003=autorealloc
$LSHARED = -shared
$CSTATIC_GNU = -c -frealloc-lhs
$CSTATIC_INT = -c -assume realloc_lhs
$CSTATIC_IBM = -c -qxlf2003=autorealloc
$DEBUG_GNU = -Og -g3 -ffpe-trap=invalid -Warray-bounds -Wcharacter-truncation -Wline-truncation -Wimplicit-interface -Wimplicit-procedure -Wunderflow -fcheck=all -fmodule-private -ffree-line-length-132 -fimplicit-none -fbacktrace -fdump-core -finit-real=nan -std=f2008 -fall-intrinsics
$DEBUG_INT = -O0 -debug all -check all -warn all -extend-source 132 -traceback -gen-interfaces#-fpe-all=0 -fp-stack-check -fstack-protector-all -ftrapuv -no-ftz -std08
$DEBUG_IBM = -qcheck=all -qdbg=level=9
$OPTIMIZE = -O2
$EXDIRS = FACE/src/tests FACE/src/third_party/
FLAP/src/tests/ FLAP/src/third_party/
FLOw/src/tests/ FLOw/src/third_party/
FOODIE/src/tests FOODIE/src/third_party/
FORESEER/src/tests FORESEER/src/third_party/
PENF/src/tests/ PENF/src/third_party/
pyplot-fortran/src/tests/
VecFor/src/tests/ VecFor/src/third_party/
# main modes
# GNU
[shared-gnu]
template = template-shared-gnu
target = wenoof.F90
build_dir = ./shared/
output = libwenoof.so
mklib = shared
[static-gnu]
template = template-static-gnu
target = wenoof.F90
build_dir = ./static/
output = libwenoof.a
mklib = static
[shared-gnu-debug]
template = template-shared-gnu-debug
target = wenoof.F90
build_dir = ./shared/
output = libwenoof.so
mklib = shared
[static-gnu-debug]
template = template-static-gnu-debug
target = wenoof.F90
build_dir = ./static/
output = libwenoof.a
mklib = static
[tests-gnu]
template = template-static-gnu
build_dir = ./exe/
[tests-gnu-debug]
template = template-static-gnu-debug
build_dir = ./exe/
# Intel
[shared-intel]
template = template-shared-intel
target = wenoof.F90
build_dir = ./shared/
output = libwenoof.so
mklib = shared
[static-intel]
template = template-static-intel
target = wenoof.F90
build_dir = ./static/
output = libwenoof.a
mklib = static
[shared-intel-debug]
template = template-shared-intel-debug
target = wenoof.F90
build_dir = ./shared/
output = libwenoof.so
mklib = shared
[static-intel-debug]
template = template-static-intel-debug
target = wenoof.F90
build_dir = ./static/
output = libwenoof.a
mklib = static
[tests-intel]
template = template-static-intel
build_dir = ./exe/
[tests-intel-debug]
template = template-static-intel-debug
build_dir = ./exe/
#IBM
[shared-ibm]
template = template-shared-ibm
target = wenoof.F90
build_dir = ./shared/
output = libwenoof.so
mklib = shared
[static-ibm]
template = template-static-ibm
target = wenoof.F90
build_dir = ./static/
output = libwenoof.a
mklib = static
[shared-ibm-debug]
template = template-shared-ibm-debug
target = wenoof.F90
build_dir = ./shared/
output = libwenoof.so
mklib = shared
[static-ibm-debug]
template = template-static-ibm-debug
target = wenoof.F90
build_dir = ./static/
output = libwenoof.a
mklib = static
[tests-ibm]
template = template-static-ibm
build_dir = ./exe/
[tests-ibm-debug]
template = template-static-ibm-debug
build_dir = ./exe/
#templates
[template-shared-gnu]
compiler = gnu
cflags = $CSHARED_GNU $OPTIMIZE
lflags = $LSHARED $OPTIMIZE
exclude_dirs = $EXDIRS
mod_dir = ./mod/
obj_dir = ./obj/
src = ./src/
colors = True
quiet = False
log = True
jobs = 2
[template-static-gnu]
compiler = gnu
cflags = $CSTATIC_GNU $OPTIMIZE
exclude_dirs = $EXDIRS
mod_dir = ./mod/
obj_dir = ./obj/
src = ./src/
colors = True
quiet = False
log = True
jobs = 2
[template-shared-gnu-debug]
compiler = gnu
cflags = $CSHARED_GNU $DEBUG_GNU
lflags = $LSHARED $DEBUG_GNU
preproc = -DDEBUG
exclude_dirs = $EXDIRS
mod_dir = ./mod/
obj_dir = ./obj/
src = ./src/
colors = True
quiet = False
log = True
jobs = 2
[template-static-gnu-debug]
compiler = gnu
cflags = $CSTATIC_GNU $DEBUG_GNU
lflags = $DEBUG_GNU
preproc = -DDEBUG
exclude_dirs = $EXDIRS
mod_dir = ./mod/
obj_dir = ./obj/
src = ./src/
colors = True
quiet = False
log = True
jobs = 2
[template-shared-intel]
compiler = intel
cflags = $CSHARED_INT $OPTIMIZE
lflags = $LSHARED $OPTIMIZE
exclude_dirs = $EXDIRS
mod_dir = ./mod/
obj_dir = ./obj/
src = ./src/
colors = True
quiet = False
log = True
jobs = 2
[template-static-intel]
compiler = intel
cflags = $CSTATIC_INT $OPTIMIZE
lflags = $OPTIMIZE
exclude_dirs = $EXDIRS
mod_dir = ./mod/
obj_dir = ./obj/
src = ./src/
colors = True
quiet = False
log = True
jobs = 2
[template-shared-intel-debug]
compiler = intel
cflags = $CSHARED_INT $DEBUG_INT
lflags = $LSHARED $DEBUG_INT
preproc = -DDEBUG
exclude_dirs = $EXDIRS
mod_dir = ./mod/
obj_dir = ./obj/
src = ./src/
colors = True
quiet = False
log = True
jobs = 2
[template-static-intel-debug]
compiler = intel
cflags = $CSTATIC_INT $DEBUG_INT
lflags = $DEBUG_INT
preproc = -DDEBUG
exclude_dirs = $EXDIRS
mod_dir = ./mod/
obj_dir = ./obj/
src = ./src/
colors = True
quiet = False
log = True
jobs = 2
[template-shared-ibm]
compiler = ibm
cflags = $CSTATIC_IBM $OPTIMIZE
lflags = $OPTIMIZE
exclude_dirs = $EXDIRS
mod_dir = ./mod/
obj_dir = ./obj/
src = ./src/
colors = True
quiet = False
log = True
jobs = 2
[template-static-ibm]
compiler = ibm
cflags = $CSTATIC_IBM $OPTIMIZE
lflags = $OPTIMIZE
exclude_dirs = $EXDIRS
mod_dir = ./mod/
obj_dir = ./obj/
src = ./src/
colors = True
quiet = False
log = True
jobs = 2
[template-shared-ibm-debug]
compiler = ibm
cflags = $CSHARED_IBM $DEBUG_IBM
lflags = $LSHARED $DEBUG_IBM
preproc = -DDEBUG
exclude_dirs = $EXDIRS
mod_dir = ./mod/
obj_dir = ./obj/
src = ./src/
colors = True
quiet = False
log = True
jobs = 2
[template-static-ibm-debug]
compiler = ibm
cflags = $CSTATIC_IBM $DEBUG_IBM
lflags = $DEBUG_IBM
preproc = -DDEBUG
exclude_dirs = $EXDIRS
mod_dir = ./mod/
obj_dir = ./obj/
src = ./src/
colors = True
quiet = False
log = True
jobs = 2
# rules
[rule-makedoc]
help = Build documentation from source files
rule_1 = rm -rf doc/html/*
rule_2 = ford doc/main_page.md --debug
rule_3 = cp -r doc/html/publish/* doc/html/
rule_4 = rm -rf doc/html/publish
[rule-deldoc]
help = Delete documentation
rule = rm -rf doc/html/*
[rule-delexe]
help = Delete exes
rule = rm -rf exe/
[rule-clean]
help = Clean the project tree
rule_1 = FoBiS.py rule -ex deldoc
rule_2 = FoBiS.py rule -ex delexe
rule_3 = rm -f *.gcov
[rule-maketar]
help = Make tar archive of the project
rule = tar --xform="s%^%WenOOF/%" -czf WenOOF.tar.gz *
[rule-makecoverage]
help = Perform coverage analysis
rule_1 = FoBiS.py clean -mode tests-gnu-debug
rule_2 = FoBiS.py build -mode tests-gnu-debug -coverage
rule_3 = ./scripts/run_tests.sh
rule_4 = rm -f exe/obj/face* exe/obj/flap* exe/obj/flow* exe/obj/foodie* exe/obj/foreseer* exe/obj/penf* exe/obj/pyplot* exe/obj/vecfor*
rule_5 = gcov -o exe/obj/ src/lib/wenoof*
rule_6 = rm -f *.gcov
[rule-makecoverage-analysis]
help = Perform coverage analysis and saving reports in markdown
rule_1 = FoBiS.py clean -mode tests-gnu-debug
rule_2 = FoBiS.py build -mode tests-gnu-debug -coverage
rule_3 = ./scripts/run_tests.sh
rule_4 = rm -f exe/obj/face* exe/obj/flap* exe/obj/flow* exe/obj/foodie* exe/obj/foreseer* exe/obj/penf* exe/obj/pyplot* exe/obj/vecfor*
rule_5 = gcov -o exe/obj/ src/lib/wenoof* src/lib/*/wenoof*
rule_6 = FoBiS.py rule -gcov_analyzer wiki/ Coverage-Analysis
rule_7 = rm -f *.gcov