Sun Studio 12: Fortran User's Guide

3.4.58 –moddir=path

Specify where the compiler will write compiled .mod MODULE files.

The compiler will write the .mod MODULE information files it compiles in the directory specified by path. The directory path can also be specified with the MODDIR environment variable. If both are specified, this option flag takes precedence.

The compiler uses the current directory as the default for writing .mod files.

See 4.9 Module Files for more information about modules in Fortran 95.