-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathwscript
100 lines (78 loc) · 4.2 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
import os
import os.path
import ns3waf
import sys
from waflib import Utils, Scripting, Configure, Build, Options, TaskGen, Context, Task, Logs, Errors
def options(opt):
opt.tool_options('compiler_cc')
ns3waf.options(opt)
def configure(conf):
ns3waf.check_modules(conf, ['core', 'network', 'internet'], mandatory = True)
ns3waf.check_modules(conf, ['point-to-point', 'tap-bridge', 'netanim'], mandatory = False)
ns3waf.check_modules(conf, ['wifi', 'point-to-point', 'csma', 'mobility'], mandatory = False)
ns3waf.check_modules(conf, ['point-to-point-layout'], mandatory = False)
ns3waf.check_modules(conf, ['topology-read', 'internet-apps', 'applications', 'visualizer'], mandatory = False)
conf.env.append_value('CXXFLAGS', '-I/usr/include/python2.6')
conf.env.append_value('LINKFLAGS', '-pthread')
conf.check (lib='dl', mandatory = True)
conf.env['ENABLE_PYTHON_BINDINGS'] = True
conf.env['NS3_ENABLED_MODULES'] = []
ns3waf.print_feature_summary(conf)
def build_dce_tests(module, bld):
module.add_runner_test(needed=['core', 'dce-quagga', 'internet', 'csma'],
source=['test/dce-quagga-test.cc'])
def build_dce_examples(module):
dce_examples = [
]
for name,lib in dce_examples:
module.add_example(**dce_kw(target = 'bin/' + name,
source = ['example/' + name + '.cc'],
lib = lib))
module.add_example(needed = ['core', 'internet', 'dce-quagga', 'point-to-point', 'point-to-point-layout'],
target='bin/dce-zebra-simple',
source=['example/dce-zebra-simple.cc'])
module.add_example(needed = ['core', 'internet', 'dce-quagga', 'point-to-point', 'internet-apps', 'applications', 'topology-read'],
target='bin/dce-quagga-ospfd-rocketfuel',
source=['example/dce-quagga-ospfd-rocketfuel.cc'])
def build_dce_kernel_examples(module):
module.add_example(needed = ['core', 'internet', 'dce-quagga', 'point-to-point'],
target='bin/dce-quagga-radvd',
source=['example/dce-quagga-radvd.cc'])
module.add_example(needed = ['core', 'internet', 'dce-quagga', 'point-to-point'],
target='bin/dce-quagga-ripd',
source=['example/dce-quagga-ripd.cc'])
module.add_example(needed = ['core', 'internet', 'dce-quagga', 'point-to-point'],
target='bin/dce-quagga-ripngd',
source=['example/dce-quagga-ripngd.cc'])
module.add_example(needed = ['core', 'internet', 'dce-quagga', 'point-to-point'],
target='bin/dce-quagga-ospfd',
source=['example/dce-quagga-ospfd.cc'])
module.add_example(needed = ['core', 'internet', 'dce-quagga', 'point-to-point'],
target='bin/dce-quagga-ospf6d',
source=['example/dce-quagga-ospf6d.cc'])
module.add_example(needed = ['core', 'internet', 'dce-quagga', 'point-to-point', 'topology-read'],
target='bin/dce-quagga-bgpd-caida',
source=['example/dce-quagga-bgpd-caida.cc'])
module.add_example(needed = ['core', 'internet', 'dce-quagga', 'point-to-point'],
target='bin/dce-quagga-bgpd',
source=['example/dce-quagga-bgpd.cc'])
def build(bld):
module_source = [
'helper/quagga-helper.cc',
]
module_headers = [
'helper/quagga-helper.h',
]
module_source = module_source
module_headers = module_headers
uselib = ns3waf.modules_uselib(bld, ['core', 'network', 'internet', 'netlink', 'dce'])
module = ns3waf.create_module(bld, name='dce-quagga',
source=module_source,
headers=module_headers,
use=uselib,
lib=['dl'])
# lib=['dl','efence'])
build_dce_tests(module,bld)
build_dce_examples(module)
build_dce_kernel_examples(module)