forked from ArduPilot/waf
/
wscript
80 lines (63 loc) · 1.44 KB
/
wscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/env python3
# encoding: utf-8
# DC 2008
# Thomas Nagy 2010 (ita)
top = '.'
out = 'build'
def options(opt):
opt.load('compiler_fc')
opt.load('compiler_c')
opt.recurse('typemap')
def configure(conf):
conf.load('compiler_c')
conf.load('compiler_fc')
if conf.env.FC_NAME == 'IFORT':
conf.env.append_unique('FCFLAGS', '-warn')
elif conf.env.FC_NAME == 'GFORTRAN':
conf.env.append_unique('FCFLAGS', ['-Wall', '-W'])
conf.check_fortran()
conf.recurse('typemap')
def build(bld):
bld(
features = 'fc',
source = 'hello.f')
bld(
features = 'fc fcprogram',
source = 'hello.f',
target = 'hello',
use = 'DEBUG')
bld(
features = 'fc fcshlib',
source = 'foo.f',
target = 'shlib1',
defs = 'foo.def',
vnum = '2.3.9')
bld(
features = 'fc fcstlib',
source = 'foo.f',
target = 'foo')
bld(
features = 'fc fcprogram',
source = 'foo_pp.F',
target = 'foo',
defines = ['USEFOO', 'blah=1'],
use = 'shlib1')
bld.add_group()
bld(
features = 'fc fcprogram',
includes = 'src/include',
source = 'src/hello_inc.f',
target = 'hello_inc')
bld(
features = 'fc',
source = 'src/calculator_main.f src/calculator.f',
target = 'calc_objs')
bld(
features = 'fc fcprogram',
use = 'calc_objs',
target = 'calculator')
bld(
features = 'fc fcstlib',
source = 'mod/two_mods.f90 mod/uses_two_mods.f90',
target = 'mod/two_mods')
bld.recurse('typemap')