forked from jacobwilliams/pyplot-fortran
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·37 lines (29 loc) · 1.38 KB
/
build.sh
File metadata and controls
executable file
·37 lines (29 loc) · 1.38 KB
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
#!/bin/bash
#
# Simple build script for pyplot-fortran.
#
PROJECTNAME='pyplot-fortran' # project name for robodoc
MODCODE='pyplot_module.f90' # module file name
FORDMD='pyplot-fortran.md' # FORD settings file
LIBOUT='libpyplot.a' # name of library
DOCDIR='./doc/' # build directory for documentation
SRCDIR='./src/' # library source directory
BINDIR='./bin/' # build directory for unit tests
LIBDIR='./lib/' # build directory for library
#compiler flags:
FCOMPILER='gnu' #Set default compiler to gfortran
FCOMPILERFLAGS='-c -O2 -fbacktrace -Wall -Wextra -Wno-maybe-uninitialized -Wno-unused-function -pedantic -std=f2008'
#build the library and example using FoBiS:
if hash FoBiS.py 2>/dev/null; then
FoBiS.py build -compiler ${FCOMPILER} -cflags "${FCOMPILERFLAGS}" -dbld ${LIBDIR} -s ${SRCDIR} -dmod ./ -dobj ./ -t ${MODCODE} -o ${LIBOUT} -mklib static -colors
FoBiS.py build -compiler ${FCOMPILER} -cflags "${FCOMPILERFLAGS}" -dbld ${BINDIR} -s ${SRCDIR} -dmod ./ -dobj ./ -colors
else
echo "FoBiS.py not found! Cannot build library. Install using: sudo pip install FoBiS.py"
fi
# build the documentation using FORD:
if hash ford 2>/dev/null; then
echo "Building documentation..."
ford ${FORDMD}
else
echo "FORD not found! Cannot build documentation. To install, run: sudo pip install ford"
fi