The installation of this package is based on CMake.

### Configure

Before running the compilation, the project first needs to be configured
and a build directory created. For this purpose, run a terminal in the
main directory of the package (the location of the file you are currently
reading) and run

 cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/path/to/simputdir

where /path/to/simputdir is the path that you want to install SIMPUT into.
We will call this path the ${prefix} from now on.

### Compilation

Once this has been completed, a "build" directory should have been
created in your current working directory. When this has been done,
you can compile and link the code via

 cmake --build build

This may take some time. If you have multiple cores available, you
may set the additional option

 --parallel n

Where n is the number of maximum concurrent processes used for
compilation.

For debugging, you can also set the

 --verbose

flag, which prints all output of gcc, g++ etc. In this case, you should
disable parallel computation.

### Installation

After compilation finished, you can then install the files with the command

cmake --install build

### Initialization

NOTE: If you are also installing SIXTE, you can skip this here - it will
be done automatically alongside it.

For parameter input the simulation software uses the PIL / APE library
and therefore requires a .par file for each simulation task. These
files are installed in the directory ${prefix}/share/simput/pfiles. 

In order to run the simulation, you have to set an
environment variable called $SIMPUT pointing to the ${prefix} directory
and then call the setup script 'install-simput.sh' or 'install-simput.csh'
depending on which shell you use.

In a C-shell environment you can do this with the following command:

setenv SIMPUT $prefix
source $SIMPUT/bin/simput-install.csh

In a Bash environment the corresponding command is:

export SIMPUT=$prefix
$SIMPUT/bin/simput-install.sh
