# Compilation¶

The RT Retrieval Framework uses the standard autotools used by many open source software. While you can build the software in the same directory that you have the source, it is suggested that you use a separate build directory. This allows you to do different builds from the same source, e.g. an optimized and debug version.

## Building¶

There is some third party software included with the source code that need compiling along with our code. To build the framework’s code along with the third party software, execute the following:

$mkdir build_optimized$ cd build_optimized
$/your/path/to/rtr_framework/configure THIRDPARTY=build$ make all


In the above replace /your/path/to/rtr_framework with the location where you downloaded the software during the Setup instructions.

The configure command creates the Makefile to use. You only need to run this when you are creating a new build directory, after that you can just rerun make all to get any software updates. Configure will check a bunch of things on the system, and in the end print a report something like:

Level 2 Full Physics is now configured

Installation directory:       /your/path/to/build_optimized/install
Build debug version:          no
Fortran compiler type:        ifort
Fortran compiler:             /opt/local/depot/intel/11.1/064/bin/intel64/ifort -g -xSSE2 -O3 -Difort -heap-arrays 1024
C compiler:                   gcc -g -O2
LD Flags:                      -R /opt/local/depot/intel/11.1/064/lib/intel64:/opt/local/depot/intel/11.1/064/mkl/lib/em64t:/opt/local/depot/intel/11.1/064/lib/intel64:/opt/local/depot/intel/11.1/064/mkl/lib/em64t

HDF5 support:                 yes
Build own HDF5 library:       yes
Build own LIDORT library:     yes
Install documentation:        no


If you are building from within your source checkout you can just use the following script included with the source:

$./nonjpl_build.script  In order to run all of the unit tests, you’ll also need to have a copy of the ABSCO (Absoprtion Coefficient) tables. These files must be obtained separately from JPL. For serious development it is recommended to compile the third party software once and then refer to it in subsequent builds: $ mkdir build_third_party
$cd build_third_party$ /your/path/to/rtr_framework/configure THIRDPARTY=build --prefix=/install/path/for/third_party
$make thirdparty  Now subsequent builds can use this directory instead of recompiling the third party packages: $ /your/path/to/rtr_framework/configure THIRDPARTY=/install/path/for/third_party


## Developer Information¶

For developers who need to understand autotools in more detail, an nice introduction is found at Autotools: a practitioner’s guide to Autoconf, Automake and Libtool, and detailed reference can be found at Autobook.