author | Sébastien Deronne <sebastien.deronne@gmail.com> |
Sun, 09 Dec 2018 12:14:03 +0100 | |
changeset 13895 | 5df69eea72d6 |
parent 11185 | 7d6c1139be2f |
permissions | -rw-r--r-- |
537
e8a4183dfe00
Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff
changeset
|
1 |
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
1669
5ee478e0475e
Compile mobility-visualizer with -fno-strict-aliasing to avoid GNOME bug #316221
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1664
diff
changeset
|
2 |
import os.path |
537
e8a4183dfe00
Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff
changeset
|
3 |
|
e8a4183dfe00
Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff
changeset
|
4 |
def build(bld): |
4064
10222f483860
Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3489
diff
changeset
|
5 |
env = bld.env |
537
e8a4183dfe00
Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff
changeset
|
6 |
|
4772
7b6ae6bf0055
add test and validation framework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4550
diff
changeset
|
7 |
test_runner = bld.create_ns3_program('test-runner', ['core']) |
7b6ae6bf0055
add test and validation framework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4550
diff
changeset
|
8 |
test_runner.install_path = None # do not install |
7b6ae6bf0055
add test and validation framework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4550
diff
changeset
|
9 |
test_runner.source = 'test-runner.cc' |
6913
54679ab32585
Create separate module and test-module libraries
Mitch Watrous <watrous@u.washington.edu>
parents:
6834
diff
changeset
|
10 |
|
54679ab32585
Create separate module and test-module libraries
Mitch Watrous <watrous@u.washington.edu>
parents:
6834
diff
changeset
|
11 |
# Set the libraries the testrunner depends on equal to the list of |
54679ab32585
Create separate module and test-module libraries
Mitch Watrous <watrous@u.washington.edu>
parents:
6834
diff
changeset
|
12 |
# enabled modules plus the list of enabled module test libraries. |
7487
82cd20da9650
Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
7427
diff
changeset
|
13 |
test_runner.use = [mod for mod in (env['NS3_ENABLED_MODULES'] + env['NS3_ENABLED_MODULE_TEST_LIBRARIES'])] |
537
e8a4183dfe00
Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff
changeset
|
14 |
|
6821
203367ae7433
merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents:
5342
diff
changeset
|
15 |
obj = bld.create_ns3_program('bench-simulator', ['core']) |
1217
2f7791ae388d
WAF: add new bld.create_ns3_module() and bld.create_ns3_program() methods to make declaration of modules and programs simpler, and allowing us to change how ns-3 is built in a centralized way, without needing to change every module wscript file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
771
diff
changeset
|
16 |
obj.source = 'bench-simulator.cc' |
770
6441e0706902
WAF: make all ns3 modules register themselves in the environment; link the run-tests program with all ns3 modules, not with a hardcoded list.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
600
diff
changeset
|
17 |
|
7427
710d6ff1d227
Bug 1228 - object 'ns3-network--lib' was not found in uselib_local (required by 'bench-packets')
Mitch Watrous <watrous@u.washington.edu>
parents:
7339
diff
changeset
|
18 |
# Because the list of enabled modules must be set before |
710d6ff1d227
Bug 1228 - object 'ns3-network--lib' was not found in uselib_local (required by 'bench-packets')
Mitch Watrous <watrous@u.washington.edu>
parents:
7339
diff
changeset
|
19 |
# test-runner can be built, this diretory is parsed by the top |
710d6ff1d227
Bug 1228 - object 'ns3-network--lib' was not found in uselib_local (required by 'bench-packets')
Mitch Watrous <watrous@u.washington.edu>
parents:
7339
diff
changeset
|
20 |
# level wscript file after all of the other program module |
710d6ff1d227
Bug 1228 - object 'ns3-network--lib' was not found in uselib_local (required by 'bench-packets')
Mitch Watrous <watrous@u.washington.edu>
parents:
7339
diff
changeset
|
21 |
# dependencies have been handled. |
710d6ff1d227
Bug 1228 - object 'ns3-network--lib' was not found in uselib_local (required by 'bench-packets')
Mitch Watrous <watrous@u.washington.edu>
parents:
7339
diff
changeset
|
22 |
# |
710d6ff1d227
Bug 1228 - object 'ns3-network--lib' was not found in uselib_local (required by 'bench-packets')
Mitch Watrous <watrous@u.washington.edu>
parents:
7339
diff
changeset
|
23 |
# So, make sure that the network module is enabled before building |
710d6ff1d227
Bug 1228 - object 'ns3-network--lib' was not found in uselib_local (required by 'bench-packets')
Mitch Watrous <watrous@u.washington.edu>
parents:
7339
diff
changeset
|
24 |
# these programs. |
710d6ff1d227
Bug 1228 - object 'ns3-network--lib' was not found in uselib_local (required by 'bench-packets')
Mitch Watrous <watrous@u.washington.edu>
parents:
7339
diff
changeset
|
25 |
if 'ns3-network' in env['NS3_ENABLED_MODULES']: |
710d6ff1d227
Bug 1228 - object 'ns3-network--lib' was not found in uselib_local (required by 'bench-packets')
Mitch Watrous <watrous@u.washington.edu>
parents:
7339
diff
changeset
|
26 |
obj = bld.create_ns3_program('bench-packets', ['network']) |
710d6ff1d227
Bug 1228 - object 'ns3-network--lib' was not found in uselib_local (required by 'bench-packets')
Mitch Watrous <watrous@u.washington.edu>
parents:
7339
diff
changeset
|
27 |
obj.source = 'bench-packets.cc' |
1322
b6a4885a92df
re-enable packet benchmarking
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1220
diff
changeset
|
28 |
|
9185
23373993f110
Make sure csma module is enabled before building the doxygen scanning script
Mitch Watrous <watrous@u.washington.edu>
parents:
9166
diff
changeset
|
29 |
# Make sure that the csma module is enabled before building |
23373993f110
Make sure csma module is enabled before building the doxygen scanning script
Mitch Watrous <watrous@u.washington.edu>
parents:
9166
diff
changeset
|
30 |
# this program. |
11185
7d6c1139be2f
bug 2043: print-introspected-doxygen crashes when some modules are disabled
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9185
diff
changeset
|
31 |
# if 'ns3-csma' in env['NS3_ENABLED_MODULES']: |
7d6c1139be2f
bug 2043: print-introspected-doxygen crashes when some modules are disabled
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9185
diff
changeset
|
32 |
obj = bld.create_ns3_program('print-introspected-doxygen', ['network']) |
7d6c1139be2f
bug 2043: print-introspected-doxygen crashes when some modules are disabled
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9185
diff
changeset
|
33 |
obj.source = 'print-introspected-doxygen.cc' |
7d6c1139be2f
bug 2043: print-introspected-doxygen crashes when some modules are disabled
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9185
diff
changeset
|
34 |
obj.use = [mod for mod in env['NS3_ENABLED_MODULES']] |