3.11 Compiling SEISAN programs

This section describes how to compile SEISAN or individual SEISAN programs. In the following subsections guidelines for indivudual operating systems are given.

The SEISAN distribution for all platforms includes the executables. Therefore in general it is often not necessary to recompile. In the case of Linux, it is often nescessary to rcompile since since different flavors of Linux behave differently. However, you may have the source distribution or you might want to modify some of the programs for your own needs or remove bugs and will have to compile programs.

The SEISAN programs on all platforms can be compiled using the make utility. On all platforms there is a `Makefile' in both the PRO and LIB directories and the Makefile is the same for all operating systems supported. The file might not need any modification, however the following parameters must be set correctly:

SEISARCH (environmental variable): This variable is used as keyword for the compilation, and can be linux32, linux64, macosx, macosxppc or windows. While the gfortran option should work on all platforms, the other keywords allow to have specific compile options. The keywords are also used to define which programs are compiled and installed in addition to the default list of programs. See chapter 7 for differences between the platforms. (Note: Without setting SEISARCH, the compilation will not work since make will not know what SEISARCH is). On Linux/Unix system SEISARCH is set in the files SEISAN.csh or SEISAN.bash in COM while on Windows it is set in the Makefile itself or it can be set manually as an environmental variable. Most of the programs are the same on all platforms, but not all.

The compilation can now be started from the PRO directory by starting `make all'. From the Makefile in the PRO directory, the Makefile in the LIB directory is started to create the object libraries. A SEISAN archive in LIB for SEISAN routines is created, `seisan.a. If You want to use SEISAN subroutines in your own programs you can link to that. Finally all programs are compiled.

Single programs can be recompiled by starting `make program' . If you do changes in the LIB directory you need to compile using `make all', which will also create the archive file. Then you can recompile individual programs in PRO as explained above.

Note that on all platforms the Chad Trabant MiniSeed library is used (new from version 9.0) and it is put into seisan.a. In the distribution they are located in file libmseed.c in LIB and 4 include files in INC (see seisan.all in INF). The libmseed.c file contains all subroutines in the original Trabant distribution and all include files from Trabant distribution are in INC. The current version of the Trabant distribution is 2.6.1. If you want to use different version, the same process as described above must be done.

Seisan Explorer
The compilation of the SEISAN GUI Seisan Explorer is described in the following subsections.

The source code se-source.tar.gz is found in SUP directory.

IASP91
If the computation of IASP91 traveltimes does not work after compilation, first run program REMODL, then program SETBRN to fix the files.



Subsections