gcc - gfortran: how to control output directory for .mod files -


Is there a way to put .mod files generated by gfortran (GCC) in a different output directory? I know how to put object files or other output as a -o flag:

  gfortran -c test.f03 -o / path / to / output / dir / test O  

But .mod files (which are generated by the above mentioned call) -O are not affected by the flag and are kept in the current directory. Some commercial compilers have a flag-like MMDDir, but I can not get anything for Gaffarine

If there is no such flag, then the additional steps for working on what -o flag Is it possible to generate .mod files in?

The GNU document indicates that -m dir or its synonyms -J .mod files.


Comments