Requirements
------------

DOLFIN uses CMake for configuration and installation. DOLFIN also
relies on a number of other third-party libraries. Your system will be
probed for these libraries as part of the configuration process.

Simple build and install
------------------------

In the simplest case, just issue the commands

  cmake .
  make install

This will first configure DOLFIN for your system and then compile and
install DOLFIN in your system's default installation direcory, for
example in /usr/local/ or /opt/local/.

Local installation
------------------

It may sometimes be advantageous to install DOLFIN locally as part
of the DOLFIN source tree. To do this, simply type

  ./cmake.local

This configures, compiles, and install DOLFIN in a directory named
'local' in the DOLFIN source tree.

(Re-)generating the SWIG interface and docstrings
-------------------------------------------------

In order to regenerate the SWIG interface and update the
documentation, respectively, run the generator scripts:

   ./cmake/scripts/generate-swig-interface
   ./cmake/scripts/generate-swig-docstrings

Customized builds
-----------------

To customize the configuration of DOLFIN, it is convenient to use one
of the graphical user interfaces for CMake, such as either ccmake or
cmake-gui. These frontends to CMake allow simple manipulation of
variables that control the configuration of DOLFIN.

It is often useful to build DOLFIN 'out-of-source' which means that
all files generated by the build process end up in a separate
directory without cluttering the source tree. To make an out-of-source
build for DOLFIN using a graphical interface to CMake, simply type

  mkdir build
  cd build
  cmake-gui ..
  make install

Building demos and tests
------------------------

To build demos, enter the build directory (if any) and type

  make demo

This will build all demos. To build a specific demo, just name the
demo you want to build, for example the Poisson demo, and type

  make poisson-demo

Alternatively, you may navigate to the demo directory directly, for
example demo/pde/poisson/cpp and then build the demo using CMake as
above:

  cmake .
  make

Python demos can be run directly by navigating to the directory of the
demo and typing

  python demo.py
