1#! /usr/bin/env python
2# encoding: utf-8
3# harald at klimachs.de
4
5from waflib.Tools import fc, fc_config, fc_scan
6from waflib.Configure import conf
7
8from waflib.Tools.compiler_fc import fc_compiler
9fc_compiler['linux'].insert(0, 'fc_bgxlf')
10
11@conf
12def find_bgxlf(conf):
13	fc = conf.find_program(['bgxlf2003_r','bgxlf2003'], var='FC')
14	conf.get_xlf_version(fc)
15	conf.env.FC_NAME = 'BGXLF'
16
17@conf
18def bg_flags(self):
19	self.env.SONAME_ST		 = ''
20	self.env.FCSHLIB_MARKER	= ''
21	self.env.FCSTLIB_MARKER	= ''
22	self.env.FCFLAGS_fcshlib   = ['-fPIC']
23	self.env.LINKFLAGS_fcshlib = ['-G', '-Wl,-bexpfull']
24
25def configure(conf):
26	conf.find_bgxlf()
27	conf.find_ar()
28	conf.fc_flags()
29	conf.fc_add_flags()
30	conf.xlf_flags()
31	conf.bg_flags()
32
33