*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> ftnmgen (1)              


FTNMGEN(1)					      Last changed: 7-23-97

NAME    [Toc]    [Back]

     ftnmgen - Invokes the Fortran makefile generator

SYNOPSIS    [Toc]    [Back]

     ftnmgen [-a] [-c compiler]	[-f flags] [-m makefile] [-o command_name]

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

DESCRIPTION    [Toc]    [Back]

     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

     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

     names		 Specifies the names of	input files.

     Makefiles created by ftnmgen have the following targets:

     all		 Creates the executable	file command_name (default

     command_name	 Compiles and loads the	program.

     clean		 Removes all .o	files.

     clobber		 Executes clean	and then removes the executable

     void		 Removes everything created by the ftnmgen utility.

NOTES    [Toc]    [Back]

     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    [Toc]    [Back]

     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

	  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.

FILES    [Toc]    [Back]

     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    [Toc]    [Back]

     f90(1), ftnsplit(1), make(1),

     This man page is available	only online.
[ Back ]
 Similar pages
Name OS Title
ftnsplit IRIX Invokes the Fortran file splitter
automake Linux automatically create Makefile.in's from Makefile.am's
mkmf HP-UX make a makefile
xmkmf Tru64 create a Makefile from an Imakefile
ExtUtils::MakeMaker IRIX create an extension Makefile
mmkmf IRIX create a Makefile from an Imakefile
mkdep OpenBSD construct Makefile dependency list
mkdep FreeBSD construct Makefile dependency list
bsd.regress.mk OpenBSD regression test master Makefile fragment
bsd.port.mk OpenBSD ports tree master Makefile fragment
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service