summaryrefslogtreecommitdiff
path: root/distutils/fcompiler/nag.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2005-09-14 22:12:33 +0000
committerTravis Oliphant <oliphant@enthought.com>2005-09-14 22:12:33 +0000
commit575d373479c63a42bc4a729a058da31a74e75d3e (patch)
tree940a3020e83dd06c2241d8f45bd4969850694803 /distutils/fcompiler/nag.py
parent14db4193112ecc5930154af860228562132e3b48 (diff)
downloadnumpy-575d373479c63a42bc4a729a058da31a74e75d3e.tar.gz
Added new distutils
Diffstat (limited to 'distutils/fcompiler/nag.py')
-rw-r--r--distutils/fcompiler/nag.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/distutils/fcompiler/nag.py b/distutils/fcompiler/nag.py
new file mode 100644
index 000000000..e17d972c4
--- /dev/null
+++ b/distutils/fcompiler/nag.py
@@ -0,0 +1,39 @@
+import os
+import sys
+
+from scipy.distutils.cpuinfo import cpu
+from scipy.distutils.fcompiler import FCompiler
+
+class NAGFCompiler(FCompiler):
+
+ compiler_type = 'nag'
+ version_pattern = r'NAGWare Fortran 95 compiler Release (?P<version>[^\s]*)'
+
+ executables = {
+ 'version_cmd' : ["f95", "-V"],
+ 'compiler_f77' : ["f95", "-fixed"],
+ 'compiler_fix' : ["f95", "-fixed"],
+ 'compiler_f90' : ["f95"],
+ 'linker_so' : ["f95"],
+ 'archiver' : ["ar", "-cr"],
+ 'ranlib' : ["ranlib"]
+ }
+
+ def get_flags_linker_so(self):
+ if sys.platform=='darwin':
+ return ['-unsharedf95','-Wl,-bundle,-flat_namespace,-undefined,suppress']
+ return ["-Wl,shared"]
+ def get_flags_opt(self):
+ return ['-O4']
+ def get_flags_arch(self):
+ return ['-target=native']
+ def get_flags_debug(self):
+ return ['-g','-gline','-g90','-nan','-C']
+
+if __name__ == '__main__':
+ from distutils import log
+ log.set_verbosity(2)
+ from scipy.distutils.fcompiler import new_fcompiler
+ compiler = new_fcompiler(compiler='nag')
+ compiler.customize()
+ print compiler.get_version()