forked from python-hydro/pyro2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmk.sh
More file actions
executable file
·35 lines (28 loc) · 864 Bytes
/
mk.sh
File metadata and controls
executable file
·35 lines (28 loc) · 864 Bytes
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
#!/bin/sh
# this script builds each of the shared-object libraries that
# interface Fortran with python for some lower-level pyro routines.
# f2py is used.
# set the python interpreter to use. If no PYTHON variable is
# set, then default to python. You can use python2, for example,
# by doing:
# PYTHON=python2 ./mk.sh
: ${PYTHON:=python3}
if [ "$1" == "clean" ]; then
rm -rf mesh/*.so
rm -rf incompressible/*.so
rm -rf compressible/*.so
rm -rf lm_atm/*.so
find . -name "*.pyc" -exec rm -f {} \;
else
if [ "$1" == "debug" ]; then
FFLAGS="-fbounds-check -fbacktrace -Wuninitialized -Wunused -ffpe-trap=invalid -finit-real=snan"
else
FFLAGS="-C"
fi
for d in mesh incompressible compressible lm_atm
do
cd ${d}
${PYTHON} setup.py config_fc --f90flags "${FFLAGS}" build_ext --inplace
cd ..
done
fi