In order to build DUNE you need at least the following software:
The following software is recommend but optional:
When building the development version of DUNE you will also need
This will provide you with the core DUNE features.
Some DUNE modules might support further software. Using this software is optional. The dune-grid module for example support different external grid managers like Albert or UG; these have to be downloaded separately. For a list of supported contrib software packages and their installation see the Contrib Software Installation Notes.
Suppose you have downloaded all DUNE modules of interest to your computer and extracted then in one common directory. See the download section for a list of available modules.
To compile the modules DUNE has to check several components of your system and whether prerequisites within the modules are met. For the ease of users we have designed a custom build system on top of the automake tools. Run
./dune-common/bin/dunecontrol all
to commence those tests and build all modules you have downloaded. Don't worry about messages telling you that libraries are missing: they are only needed for grid-self-checks we need for developing.
You can customize the build to your specific needs by using an options file (see below)
./dune-common/bin/dunecontrol --opts=/path_to/file.opts
If you did not tell dunecontrol to install with an options file you need to run
./dune-common/bin/dunecontrol make install
to install DUNE (you may need root-permissions for the install part depending on the prefix set)
A more comprehensive introduction to the build system can be found in the Dune Build System Howto.
You can instruct dunecontrol to build only a certain dune module, using the --only=module_name> switch. Runnning dunecontrol script
./dune-common/bin/dunecontrol --module=<module_name> allwhere <module_name> is the name of that particular module given in the dune.module file, will build only the module <module_name>.
If you want to build a module and the modules it depends on, you must run:
./dune-common/bin/dunecontrol --module=module_name all
Read Maintaining new Dune modules and applications section for more details.
Using the dunecontrol script the following atomic commands can be executed:
The composite command all simply runs autogen, configure and make for each module.
As it is often not convenient (and for the target all impossible) to specify the options for each command as parameters after the call, one can pass the options via file specified by the --opts=<file> option. For each atomic command one specify the options via a ine
<COMMANY_UPPERCASE>_FLAGS=<flags> # e.g.: MAKE_FLAGS=install
The available options for make and svn are the natural ones. The configure commands available can be found by issuing
dunecontrol --only=dune-common configure --help
and for autogen by
dunecontrol --only=dune-common autogen --help
(In the svn version this has to be calles after running autogen.)
An example of an options file is
# use a special compiler (g++ version 3.4) and install to a custom # directory, default is /usr/local/bin CONFIGURE_FLAGS="CXX=g++-3.4 --prefix='/tmp/HuHu'" # Set the default target of make to install. Now the call above will # not just build the DUNE modules but also install it MAKE_FLAGS=install # The default versions of automake and autogen are not sufficient # therefore we need to specify what versions to use AUTOGEN_FLAGS="--ac=2.59 --am=1.9"
You can create your own dune project module by using the duneproject script available in dune-common/bin directory. Running the script will create a directory with supporting files (configure.ac, Makefile.am etc.) and a sample .cc file. After creating the module you can build this as explained above under "Building a specific DUNE module".
The DUNE Build System Howto will also give you an excellent introduction to the build system and how to create new modules/projects your own.