summaryrefslogtreecommitdiff
path: root/numpy/distutils/fcompiler/g95.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-01-04 17:26:31 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-01-04 17:26:31 +0000
commit8e2654541c6eae0f308908f501cccbc86b2f9101 (patch)
treebfcfe3b282c8fb659832bf86a841ce76852094ad /numpy/distutils/fcompiler/g95.py
parentddaed649c23bbd0ad36cdafdfe9cd92397ce69e3 (diff)
downloadnumpy-8e2654541c6eae0f308908f501cccbc86b2f9101.tar.gz
Moved scipy directory to numpy
Diffstat (limited to 'numpy/distutils/fcompiler/g95.py')
-rw-r--r--numpy/distutils/fcompiler/g95.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/numpy/distutils/fcompiler/g95.py b/numpy/distutils/fcompiler/g95.py
new file mode 100644
index 000000000..a3bf374a8
--- /dev/null
+++ b/numpy/distutils/fcompiler/g95.py
@@ -0,0 +1,41 @@
+# http://g95.sourceforge.net/
+
+import os
+import sys
+
+from scipy.distutils.cpuinfo import cpu
+from scipy.distutils.fcompiler import FCompiler
+
+class G95FCompiler(FCompiler):
+
+ compiler_type = 'g95'
+ version_pattern = r'G95.*\(experimental\) \(g95!\) (?P<version>.*)\).*'
+
+ executables = {
+ 'version_cmd' : ["g95", "--version"],
+ 'compiler_f77' : ["g95", "-ffixed-form"],
+ 'compiler_fix' : ["g95", "-ffixed-form"],
+ 'compiler_f90' : ["g95"],
+ 'linker_so' : ["g95","-shared"],
+ 'archiver' : ["ar", "-cr"],
+ 'ranlib' : ["ranlib"]
+ }
+ pic_flags = ['-fpic']
+ module_dir_switch = '-fmod='
+ module_include_switch = '-I'
+
+ def get_flags(self):
+ return ['-fno-second-underscore']
+ def get_flags_opt(self):
+ return ['-O']
+ def get_flags_debug(self):
+ return ['-g']
+
+if __name__ == '__main__':
+ from distutils import log
+ log.set_verbosity(2)
+ from scipy.distutils.fcompiler import new_fcompiler
+ #compiler = new_fcompiler(compiler='g95')
+ compiler = G95FCompiler()
+ compiler.customize()
+ print compiler.get_version()