ftnmgen(1)
ftnmgen - Invokes the Fortran makefile generator
Showing MIPSpro 7.4.3m.
NAME ftnmgen - Invokes the Fortran makefile generator SYNOPSIS ftnmgen [-a] [-c compiler] [-f flags] [-m makefile] [-o command_name] files DESCRIPTION The ftnmgen utility splits out all Fortran subroutines from files by using the ftnsplit(1) utility and produces a makefile that may be used to compile and load a program. Optionally, by using the -a option, ftnmgen can create a file-based makefile, the creation of which does not use ftnsplit to split the files. The ftnmgen utility inserts dependency rules for include files and module usage. See the EXAMPLES section of this man page for a sample makefile that illustrates these rules. The ftnmgen utility accepts the following options: -a Creates a file-based makefile that does not use ftnsplit to split the source file. -c compiler Specifies the Fortran compiling system used to convert the .f files to .o files (f90 by default) and link them to form an executable file. -f flags Specifies options to the Fortran compiling system. Enclose the argument specifying the option(s) in single quotation marks. -m makefile Specifies the name of the makefile produced by the ftnmgen utility (makefile by default). -o command_name Specifies the resultant executable file (a.out by default). names Specifies the names of input files. Makefiles created by ftnmgen have the following targets: all Creates the executable file command_name (default rule). command_name Compiles and loads the program. clean Removes all .o files. clobber Executes clean and then removes the executable files. void Removes everything created by the ftnmgen utility. NOTES ftnmgen uses the ftnsplit utility to split files and to provide module and include file dependency analysis. ftnmgen module dependency analysis can go only one level deep. That is, if A uses B, which in turn uses C, then a make dependency only between A and B can be planted. This allows for showing dependencies between B and C but is not sufficient to allow A to show dependencies on B and C. EXAMPLES The following example shows how to specify that the f90 command in the makefile uses the -I../ and -v flags when compiling the Fortran source code files: ftnmgen -f '-I../ -v' fort1.f fort2.f fort3.f The following command line and code fragments illustrate dependency rules: ftnmgen -a file.f harry.f file.f is: program fred use harry include "jim.h" ... end program fred harry.f is: module harry ... end module harry creates a makefile containing the following rules: file.o: harry.o file.o: jim.h In this example, if you had not specified harry.f on the ftnmgen command line, the makefile would display the following message: file.o: ** NEED MODULE FILE FOR: harry ** This result would force you to manually edit the Makefile. FILES makefile Default make file created a.out Default executable binary file name file.f[90] Input Fortran source code file file.o Relocatable object code file SEE ALSO f90(1), ftnsplit(1), make(1),