Sun Studio 12: Fortran User's Guide

2.5.2 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 the implicit compilation rules of make, FFLAGS is used automatically by the make program.

Example: Set FFLAGS: (C Shell)

demo% setenv FFLAGS ’-fast -Xlist’

Example: Use FFLAGS explicitly:

demo% f95 $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 compiler command line, then invoking make will result in a compilation equivalent to:

f95 -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.

Note –

Default implicit rules assumed by make may not recognize files with extensions .f95 and .mod (Fortran 95 Module files). See the Fortran Programming Guide and the Fortran 95 readme file for details.