To compile about 400 Fortran files of a project in 40 different subdirectories I have created a batch file say in directroy MAIN.
This batch file runs in directory MAIN and starts all compilations with e.g.:
: CALL COMP64 LibF\cpuTime.f90 :
COMP64 is a bacht file containing
ftn95 %1 /64 /debug /no_banner
This construct allows to change compile options for all files at once. All OBJ files will be created - as expected - in the correct subdirectories e.g. LibF. However, all MOD files will be created in directory MAIN.
How can I make sure to have as well the MOD files in their correct positions in the subdirectories? Any idea?