Is there a way to put .mod files generated by gfortran (GCC) in a separate output directory? I know how to place object files or other output with the -o flag, as in:
gfortran -c test.f03 -o /path/to/output/dir/test.o
But .mod files (which are generated by the above call) are independent of the -o flag and are placed in the current directory. Some commercial compilers have the -qmoddir flag, but I can't find something like this for gfortran.
If there is no such flag, is it possible to generate .mod files in an extra step to get the -o flag?
shamoha
source share