Tonto | ||
---|---|---|
<< Previous | Next >> |
This section is for programmers who want to understand how the TONTO system builds executables using perl -w Makefile.pl and then the make program.
In particular, how TONTO deals with machine dependencies, and how it avoids unnecessary recompilation.
make is a program that controls how a program is compiled.
The Makefile is a database used by the make program to provide the instructions to compile TONTO.
The Makefile is comprised of the following important sections:
A part defining the machine specific compilation options to be used, and where the executable is to be installed.
---This part is changed by the Makefile.pl program as detailed in the next section.
---This part is the part that is changed by hand to make customised versions of TONTO.
A part defining where the all the required files are located; that is, the locations of the "foo" source code, fortran code, fortran interface files, object code, module files, dependency files, documentation directories, and compile scripts. The directories which contain all these files are easily identified.
---These names of these directories are never altered.
A part listing the object files in hierarchical module order; that is, arranged in an order such that the objects which use other objects come later in the ordered list.
---You will only need to modify hierarchical object files if you are writing a new module. If you want to do this you should refer to the chapter called Writing Fortran modules for TONTO> or to the chapter called Writing foo modules for TONTO>.
A part which includes a dependfile containing the dependencies of each of the listed object files. These dependencies are found in the dependencies directory, and are make by the make_dependencies.perl script.
---You will only need to modify the dependfile file if you are writing a Fortran module. If you are writing a foo module, which is the recommended procedure, then this is done automatically.
A part describing how to make the dependency files, fortran, html documentation, object, module, and executable files.
---This section makes use of make "pattern rules". You should not need to alter this section unless your compiler makes unusual files which need to be included. For example, the SGI compiler produces module files with capitalised names.