automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fortran compilers for automake


From: Jones, Wesley
Subject: fortran compilers for automake
Date: Fri, 22 Aug 2003 12:33:17 -0600



I am using automake-1.7.6 for fortran with autoconf-1.57 (plus an
autoconf patch).

http://mail.gnu.org/archive/html/autoconf-patches/2002-11/msg00009.html


So, I modified automake.in to support the extension depended compiler
flags (FCFLAGS_F, FCFLAGS_F90, FCFLAGS_F95) by naming 3 compilers.

I am looking for a recommendation for how to do this so that I would not
need to explicitly name 3 compilers, but instead have one compiler, that
has an extra compile flag depending on the extension of the file.  Another
possability would be to have a subroutine define a fortran compilers
depending
on the extensions.

The three compiler definitions follow:

# Fortran 90: Fixed Form
register_language ('name' => 'fcf',
                   'Name' => 'Fortran EXT=f',
                   'linker' => 'FCLINK',
                   'link' => '$(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS)
$(LDFLAGS) -o $@',
                   'flags' => ['FCFLAGS'],
                   'compile' => '$(FC) $(AM_FCFLAGS) $(FCFLAGS)
$(FCFLAGS_F)',
                   'compiler' => 'FCFCOMPILE',
                   'compile_flag' => '-c',
                   'output_flag' => '-o',
                   'lder' => 'FCLD',
                   'ld' => '$(FC)',
                   'pure' => 1,
                   'extensions' => ['.f', '.for']);

# Fortran 90: Free Form
register_language ('name' => 'fcf90',
                   'Name' => 'Fortran EXT=f90',
                   'linker' => 'FCLINK',
                   'link' => '$(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS)
$(LDFLAGS) -o $@',
                   'flags' => ['FCFLAGS'],
                   'compile' => '$(FC) $(AM_FCFLAGS) $(FCFLAGS)
$(FCFLAGS_F90)',
                   'compiler' => 'FCF90COMPILE',
                   'compile_flag' => '-c',
                   'output_flag' => '-o',
                   'lder' => 'FCLD',
                   'ld' => '$(FC)',
                   'pure' => 1,
                   'extensions' => ['.f90']);

# Fortran 95: Free Form
register_language ('name' => 'fcf95',
                   'Name' => 'Fortran EXT=f95',
                   'linker' => 'FCLINK',
                   'link' => '$(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS)
$(LDFLAGS) -o $@',
                   'flags' => ['FCFLAGS'],
                   'compile' => '$(FC) $(AM_FCFLAGS) $(FCFLAGS)
$(FCFLAGS_F95)',
                   'compiler' => 'FCF95COMPILE',
                   'compile_flag' => '-c',
                   'output_flag' => '-o',
                   'lder' => 'FCLD',
                   'ld' => '$(FC)',
                   'pure' => 1,
                   'extensions' => ['.f95']);

Any suggestions?

WEs

---
Wesley Jones, Ph.D.                   
Senior Computational Scientist        Phone: 303-275-4070
National Renewable Energy Lab      address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]