summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/gfortran.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Tool/gfortran.py')
-rw-r--r--src/engine/SCons/Tool/gfortran.py24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/engine/SCons/Tool/gfortran.py b/src/engine/SCons/Tool/gfortran.py
index f3db693..72f38ee 100644
--- a/src/engine/SCons/Tool/gfortran.py
+++ b/src/engine/SCons/Tool/gfortran.py
@@ -43,20 +43,16 @@ def generate(env):
Environment."""
fortran.generate(env)
- # which one is the good one ? ifort uses _FORTRAND, ifl FORTRAN,
- # aixf77 F77 ...
- #env['_FORTRAND'] = 'gfortran'
- env['FORTRAN'] = 'gfortran'
-
- # XXX does this need to be set too ?
- #env['SHFORTRAN'] = 'gfortran'
-
- if env['PLATFORM'] in ['cygwin', 'win32']:
- env['SHFORTRANFLAGS'] = SCons.Util.CLVar('$FORTRANFLAGS')
- else:
- env['SHFORTRANFLAGS'] = SCons.Util.CLVar('$FORTRANFLAGS -fPIC')
-
- # XXX; Link problems: we need to add -lgfortran somewhere...
+ for dialect in ['F77', 'F90', 'FORTRAN', 'F95']:
+ env['%s' % dialect] = 'gfortran'
+ env['SH%s' % dialect] = '$%s' % dialect
+ if env['PLATFORM'] in ['cygwin', 'win32']:
+ env['SH%sFLAGS' % dialect] = SCons.Util.CLVar('$%sFLAGS' % dialect)
+ else:
+ env['SH%sFLAGS' % dialect] = SCons.Util.CLVar('$%sFLAGS -fPIC' % dialect)
+
+ env['INC%sPREFIX' % dialect] = "-I"
+ env['INC%sSUFFIX' % dialect] = ""
def exists(env):
return env.Detect('gfortran')