Multi-Phase Compilation

Sometimes, more than one compilation phase is required. For example, if source files are stored in more than one directory, you will need a separate compilation phase for each directory. Multiple phases are also required if you have mixed C and Fortran source, or if you need special compilation options for particular source files.

The 'AND
' keyword may be inserted in your configuration file to add a new compilation phase. You can reset the values of FILES=
, COMPILE=
, INCLUDE=
, OBJDIR=
, OBJEXT=
and MODULE=
for each phase. All default to the value used in the previous phase, except that OBJDIR=
defaults to the new source directory.

The following example shows how this feature might be used with the LF95 compiler. The same principles apply to other compilers and other platforms.