Fortran User's Guide

Using Environment Variables

You can specify options by setting the FFLAGS or OPTIONS variables.

Either FFLAGS or OPTIONS can be used explicitly in the command line. When you are using make files implicit compilation rules, FFLAGS is used automatically by the make program.

Example: Set FFLAGS: (C Shell)


  demo% setenv FFLAGS '-silent -fast -Xlist'

Example: Use FFLAGS explicitly:


  demo% f77 $FFLAGS any.f

When using make, if the FFLAGS variable is set as above and the makefile's compilation rules are implicit, that is, there is no explicit f77/f90 compile line, then invoking make will result in a compilation equivalent to:

f77 -silent -fast -Xlist files...

make is a very powerful program development tool that can easily be used with all Sun compilers. See the make(1) man page and the Program Development chapter in the Fortran Programming Guide.