Ben Blackwell wrote:
>I am a novice with make files and am having difficulty getting one to work
>with f90 source code containing modules. Any references on this topic would
>be appreciated.
>
Well, I am not sure how far you want to go. For basics, the only thing
to worry about is that anything that USEs a module must be compiled
after that module, i.e. the file where that module is defined should be
in its dependency list. This should do the trick to make things "work".
I have perl scripts that scan for USE statements, extract dependencies,
and use the infamous "include" in the make file to include these
automatically-generated dependencies. But these are tailored to make++,
which is somewhat different from GNU make...I can send those to you if
you want them.
But there are more serious problems with make and modules, and there are
solutions, explained at:
http://www.theochem.uwa.edu.au/fortran/recompile/
I also have tools based on the scheme proposed above that I can share...
Best,
Aleksandar
|