Having worked on f90 projects on Windows platforms for a few years I have
spared myself from learning much about 'make'. I am now working on unix
(Tru64 - DEC Fortran) and have to pay more attention to makefiles. My
question is really what is the best way to deal with module dependancies?
If you just make the .o files dependent on the .f90 files then make knows
nothing about module dependancies. In this case, unless the source files are
compiled in a particular order, the compiler may fall over because it can't
find a particular .mod file. Once the .mod files are in the build directory
there are no problems on future builds. This is unsatisfactory, to me at
least.
The alternative seems to be to hand craft makefiles so that all module
dependancies are taken care of. I can see this is what Visual Studio does if
you ask it to export a makefile. Doing this by hand seems tedious though?
I may be a bit dum here - feel free to correct me - but I am sure you are
dealing with this in a variety of ways. I would like to hear about some of
them. Are there any automated ways of building f90 makefiles?
Thanks,
Simon Rees
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|