next up previous contents index
Next: 3.2 Directory Structure Up: 3 Program Files, Installation, Previous: 3 Program Files, Installation,   Contents   Index


3.1 Quickstart: How to compile COBOLD

If you are going to install COBOLD on a machine with a ``known'' (to setup script and makefile) operating system and compiler (see Sections 3.2 and 3.5) then the procedure should be fairly easy:

  1. Choose/create a proper base directory. (This will usually be $HOME. Then the master directory will typically be $HOME/for - this is the default created by the tar file. Some prefer to rename it to $HOME/HYDRO.)

  2. Put all source and makefiles there. This can be done e.g. by expanding the the gzipped tar file for.tar.gz or copying all files from an existing installation. The tar file creates a sub directory for in the local directory. You get sub sub directories as described in Sect. 3.2 and files as listed in Tab. 2.

  3. Set the necessary environment variables as described in Sect. 3.2. This includes the selection of the paths which lead to the makefiles appropriate for the architecture of your machine.

  4. To compile the main executable rhd.exe it should be sufficient - all files installed - to type
    cd ${RHDEXEPATH}
    make
    
    which uses the master makefile in ${RHDEXEPATH} which in turn ``calls'' the makefiles corresponding to the modules in the STR, UIO, EOS, HDRAD directories. The makefiles have the same structure on all machines. For a certain architecture (and optimization level) the compiler name and corresponding switches in the master makefile ${RHDEXEPATH}/Makefile have to be edited (see Sect. 3.5).

A simple sample installation may look like the following (the sub directory for is put into the home directory. It is assumed that the script setarcdeppaths.sh is made for the current machine and is appropriate for the shell).

# --- Choose base directory ---
cd ${HOME}

# --- Put tar file there ---
# ...

# --- Expand tar file ---
tar -zxvf for.tar.gz

# --- Go into (default) master directory ---
cd for

# --- Start script to set environment variables with paths ---
. setarcdeppaths.sh

# --- Jump into directory with main makefile ---
cd ${RHDEXEPATH}

# --- Compile ---
make

echo 'Voila!'


next up previous contents index
Next: 3.2 Directory Structure Up: 3 Program Files, Installation, Previous: 3 Program Files, Installation,   Contents   Index
Bernd Freytag 2002-02-16