If ``<fortran files>`` contains a signature file, then a source for
an extension module is constructed, all Fortran and C sources are
compiled, and finally all object and library files are linked to the
extension module ``<modulename>.so`` which is saved into the current
directory.
If ``<fortran files>`` does not contain a signature file, then an
extension module is constructed by scanning all Fortran source codes
for routine signatures.
Among other options (see below) and options described in previous
mode, the following options can be used in this mode:
``--help-fcompiler``
List available Fortran compilers.
``--help-compiler`` [depreciated]
List available Fortran compilers.
``--fcompiler=<Vendor>``
Specify Fortran compiler type by vendor.
``--f77exec=<path>``
Specify the path to F77 compiler
``--fcompiler-exec=<path>`` [depreciated]
Specify the path to F77 compiler
``--f90exec=<path>``
Specify the path to F90 compiler
``--f90compiler-exec=<path>`` [depreciated]
Specify the path to F90 compiler
``--f77flags=<string>``
Specify F77 compiler flags
``--f90flags=<string>``
Specify F90 compiler flags
``--opt=<string>``
Specify optimization flags
``--arch=<string>``
Specify architecture specific optimization flags
``--noopt``
Compile without optimization
``--noarch``
Compile without arch-dependent optimization
``--debug``
Compile with debugging information
``-l<libname>``
Use the library ``<libname>`` when linking.
``-D<macro>[=<defn=1>]``
Define macro ``<macro>`` as ``<defn>``.
``-U<macro>``
Define macro ``<macro>``
``-I<dir>``
Append directory ``<dir>`` to the list of directories searched for
include files.
``-L<dir>``
Add directory ``<dir>`` to the list of directories to be searched
for ``-l``.
``link-<resource>``
Link extension module with <resource> as defined by
``numpy_distutils/system_info.py``. E.g. to link with optimized
LAPACK libraries (vecLib on MacOSX, ATLAS elsewhere), use
``--link-lapack_opt``. See also ``--help-link`` switch.
..note:: The ``f2py -c`` option must be applied either to an existing ``.pyf`` file (plus the source/object/library files) or one must specify the ``-m <modulename>`` option (plus the sources/object/library files). Use one of the following options:
::
f2py -c -m fib1 fib1.f
or
::
f2py -m fib1 fib1.f -h fib1.pyf
f2py -c fib1.pyf fib1.f
For more information, see `Building C and C++ Extensions`__ Python documentation for details.