In case of developing a static lib using fortran:
The lib is consist of multiple modules, e.g. "module a", "module b" etc..
Each of the modules has public variables, types and procedures.
Now, want to use the lib in program "test".
One possible method is to use each of the modules, and providing the *.a lib file during linking. e.g.:
program test
use a
use b
...
end program
But it would be better if only one module/*.h needs to be used/included. e.g.:
program test
use all
...
end program
One possible solution is to copy all public variables, types and interface of procedures into "module all", and use "module all" instead of the individual modules.
But if any of the individual module is modified, "module all" also needs to be modified to meet the change.
Is there a more appropriate method to work around, or is there an automatic tool to generate the "module all"?
Thank you very much for any input.