From 8e2654541c6eae0f308908f501cccbc86b2f9101 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Wed, 4 Jan 2006 17:26:31 +0000 Subject: Moved scipy directory to numpy --- numpy/distutils/fcompiler/lahey.py | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 numpy/distutils/fcompiler/lahey.py (limited to 'numpy/distutils/fcompiler/lahey.py') diff --git a/numpy/distutils/fcompiler/lahey.py b/numpy/distutils/fcompiler/lahey.py new file mode 100644 index 000000000..9b88cc264 --- /dev/null +++ b/numpy/distutils/fcompiler/lahey.py @@ -0,0 +1,46 @@ +import os +import sys + +from scipy.distutils.cpuinfo import cpu +from scipy.distutils.fcompiler import FCompiler + +class LaheyFCompiler(FCompiler): + + compiler_type = 'lahey' + version_pattern = r'Lahey/Fujitsu Fortran 95 Compiler Release (?P[^\s*]*)' + + executables = { + 'version_cmd' : ["lf95", "--version"], + 'compiler_f77' : ["lf95", "--fix"], + 'compiler_fix' : ["lf95", "--fix"], + 'compiler_f90' : ["lf95"], + 'linker_so' : ["lf95","-shared"], + 'archiver' : ["ar", "-cr"], + 'ranlib' : ["ranlib"] + } + + module_dir_switch = None #XXX Fix me + module_include_switch = None #XXX Fix me + + def get_flags_opt(self): + return ['-O'] + def get_flags_debug(self): + return ['-g','--chk','--chkglobal'] + def get_library_dirs(self): + opt = [] + d = os.environ.get('LAHEY') + if d: + opt.append(os.path.join(d,'lib')) + return opt + def get_libraries(self): + opt = [] + opt.extend(['fj9f6', 'fj9i6', 'fj9ipp', 'fj9e6']) + return opt + +if __name__ == '__main__': + from distutils import log + log.set_verbosity(2) + from scipy.distutils.fcompiler import new_fcompiler + compiler = new_fcompiler(compiler='lahey') + compiler.customize() + print compiler.get_version() -- cgit v1.2.1