I am trying to compile the following software so that I can step through and debug it. I am only a novice programmer and I am trying to understand how this whole makefile business works with Fortran. I know that there is a ton of literature on makefiles but I just need to insert a simple debug flag and I think if someone provided me with the answer to this question that would be the best way for me to learn.
So the program I am trying to compile, TINKER, is actually made up of several packages, located at http://dasher.wustl.edu/tinkerwiki/index.php/Main_Page. I would like to compile and debug JUST ONE specific executable, "analyze". I contacted the developer and received the following reply but I am still stuck...
Since TINKER has lots of small source code files, what we do is compile each of the small files to an object file using the "-c" flag. Then we put all of these object code files (ie, the ".o" files) into an object library. Finally, we link each of the TINKER top level programs, such as "analyze", against the object library. There is a Makefile supplied with TINKER that does this. We also supply individual scripts called "compile.make", "library.make" and "link.make" for various CPU/compiler combinations that can be run in order to perform the steps I describe above. To build a "debuggable" executable, you just need to include the appropriate debug flags (usually "-g") as part of the compile and link stages.
I am currently running OSX 10.6.8. If someone could show me which folders I cd into, what commands I enter that would be so great!
Thanks!
My follow up question (once I can figure out how to answer the above via command line will concern how to import the same procedure but using the Photran IDE - http://wiki.eclipse.org/PTP/photran/documentation/photran5#Starting_a_Project_with_a_Hand-Written_Makefile)