OLD | NEW |
1 ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8;
-*- | 1 ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8;
-*- |
2 | 2 |
3 import os, os.path | 3 import os, os.path |
4 import shutil | 4 import shutil |
5 import types | 5 import types |
6 import warnings | 6 import warnings |
7 | 7 |
8 import TaskGen | 8 import TaskGen |
9 import Task | 9 import Task |
10 import Options | 10 import Options |
(...skipping 17 matching lines...) Expand all Loading... |
28 'emu', | 28 'emu', |
29 'bridge', | 29 'bridge', |
30 'tap-bridge', | 30 'tap-bridge', |
31 'virtual-net-device', | 31 'virtual-net-device', |
32 'applications', | 32 'applications', |
33 'nix-vector-routing', | 33 'nix-vector-routing', |
34 'olsr', | 34 'olsr', |
35 'aodv', | 35 'aodv', |
36 'dsdv', | 36 'dsdv', |
37 'click', | 37 'click', |
| 38 'openflow', |
38 'mobility', | 39 'mobility', |
39 'wifi', | 40 'wifi', |
40 'netanim', | 41 'netanim', |
41 'stats', | 42 'stats', |
42 'uan', | 43 'uan', |
43 'spectrum', | 44 'spectrum', |
44 'mesh',··· | 45 'mesh',··· |
45 'mesh/model/dot11s', | 46 'mesh/model/dot11s', |
46 'mesh/model/flame', | 47 'mesh/model/flame', |
47 'test', | 48 'test', |
48 'test/perf', | 49 'test/perf', |
49 'test/ns3tcp', | 50 'test/ns3tcp', |
50 'test/nsctcp', | 51 'test/nsctcp', |
51 'test/ns3wifi', | 52 'test/ns3wifi', |
52 'contrib/flow-monitor', | 53 'contrib/flow-monitor', |
53 'wimax', | 54 'wimax', |
54 'lte', | 55 'lte', |
55 'mpi', | 56 'mpi', |
56 'topology-read', | 57 'topology-read', |
57 'contrib/energy', | 58 'contrib/energy', |
58 'tools/visualizer', | 59 'tools/visualizer', |
59 ) | 60 ) |
60 | 61 |
61 def set_options(opt): | 62 def set_options(opt): |
62 opt.sub_options('core') | 63 opt.sub_options('core') |
63 opt.sub_options('click') | 64 opt.sub_options('click') |
| 65 opt.sub_options('openflow') |
64 | 66 |
65 opt.add_option('--enable-rpath', | 67 opt.add_option('--enable-rpath', |
66 help=("Link programs with rpath" | 68 help=("Link programs with rpath" |
67 " (normally not needed, see " | 69 " (normally not needed, see " |
68 " --run and --shell; moreover, only works in some" | 70 " --run and --shell; moreover, only works in some" |
69 " specific platforms, such as Linux and Solaris)"), | 71 " specific platforms, such as Linux and Solaris)"), |
70 action="store_true", dest='enable_rpath', default=False) | 72 action="store_true", dest='enable_rpath', default=False) |
71 ···· | 73 ···· |
72 opt.add_option('--enable-modules', | 74 opt.add_option('--enable-modules', |
73 help=("Build only these modules (and dependencies)"), | 75 help=("Build only these modules (and dependencies)"), |
74 dest='enable_modules') | 76 dest='enable_modules') |
75 | 77 |
76 def configure(conf): | 78 def configure(conf): |
77 conf.sub_config('core') | 79 conf.sub_config('core') |
78 conf.sub_config('emu') | 80 conf.sub_config('emu') |
79 conf.sub_config('tap-bridge') | 81 conf.sub_config('tap-bridge') |
80 conf.sub_config('contrib') | 82 conf.sub_config('contrib') |
81 conf.sub_config('internet') | 83 conf.sub_config('internet') |
82 conf.sub_config('netanim') | 84 conf.sub_config('netanim') |
83 conf.sub_config('test') | 85 conf.sub_config('test') |
84 conf.sub_config('click') | 86 conf.sub_config('click') |
| 87 conf.sub_config('openflow') |
85 | 88 |
86 blddir = os.path.abspath(os.path.join(conf.blddir, conf.env.variant())) | 89 blddir = os.path.abspath(os.path.join(conf.blddir, conf.env.variant())) |
87 conf.env.append_value('NS3_MODULE_PATH', blddir) | 90 conf.env.append_value('NS3_MODULE_PATH', blddir) |
88 if Options.options.enable_rpath: | 91 if Options.options.enable_rpath: |
89 conf.env.append_value('RPATH', '-Wl,-rpath=%s' % (os.path.join(blddir),)
) | 92 conf.env.append_value('RPATH', '-Wl,-rpath=%s' % (os.path.join(blddir),)
) |
90 | 93 |
91 ## Used to link the 'test-runner' program with all of ns-3 code | 94 ## Used to link the 'test-runner' program with all of ns-3 code |
92 conf.env['NS3_MODULES'] = ['ns3-' + module.split('/')[-1] for module in all_
modules] | 95 conf.env['NS3_MODULES'] = ['ns3-' + module.split('/')[-1] for module in all_
modules] |
93 | 96 |
94 | 97 |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 task.set_inputs(all_headers_inputs) | 411 task.set_inputs(all_headers_inputs) |
409 task.set_outputs(all_headers_outputs) | 412 task.set_outputs(all_headers_outputs) |
410 module_obj = self.bld.name_to_obj("ns3-" + self.module, self.env) | 413 module_obj = self.bld.name_to_obj("ns3-" + self.module, self.env) |
411 assert module_obj is not None, self.module | 414 assert module_obj is not None, self.module |
412 task.module_deps = module_obj.module_deps | 415 task.module_deps = module_obj.module_deps |
413 else: | 416 else: |
414 task.header_to_remove = all_headers_outputs[0] | 417 task.header_to_remove = all_headers_outputs[0] |
415 | 418 |
416 def install(self): | 419 def install(self): |
417 pass | 420 pass |
OLD | NEW |