FTNMGEN(1) Last changed: 7-23-97
ftnmgen - Invokes the Fortran makefile generator
ftnmgen [-a] [-c compiler] [-f flags] [-m makefile] [-o command_name]
files
UNICOS, UNICOS/mk, and IRIX systems
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 an 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.
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.
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.o 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 hand edit the makefile.
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
f90(1), ftnsplit(1), make(1),
This man page is available only online.
[ Back ]
|