author | Craig Dowell <craigdo@ee.washington.edu> |
Sat, 12 Sep 2009 19:44:17 -0700 | |
changeset 4772 | 7b6ae6bf0055 |
parent 4550 | bf3bf038e091 |
child 5342 | 3c6109eec550 |
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 |
|
1858
68e1964c19e8
WAF: add a new --enable-modules configure option, to tell WAF to build only the specified set of ns-3 modules and its dependencies; programs depending on those modules are automatically excluded from the build.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1855
diff
changeset
|
7 |
unit_tests = bld.create_ns3_program('run-tests', ['common']) |
4064
10222f483860
Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3489
diff
changeset
|
8 |
unit_tests.install_path = None # do not install |
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
|
9 |
unit_tests.source = 'run-tests.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
|
10 |
## link unit test program with all ns3 modules |
1220
4933e0890acd
Build all modules as a single ns3 shared library.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1217
diff
changeset
|
11 |
unit_tests.uselib_local = 'ns3' |
4772
7b6ae6bf0055
add test and validation framework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4550
diff
changeset
|
12 |
|
7b6ae6bf0055
add test and validation framework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4550
diff
changeset
|
13 |
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
|
14 |
test_runner.install_path = None # do not install |
7b6ae6bf0055
add test and validation framework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4550
diff
changeset
|
15 |
test_runner.source = 'test-runner.cc' |
7b6ae6bf0055
add test and validation framework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4550
diff
changeset
|
16 |
test_runner.uselib_local = 'ns3' |
537
e8a4183dfe00
Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff
changeset
|
17 |
|
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
|
18 |
obj = bld.create_ns3_program('bench-simulator', ['simulator']) |
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
|
19 |
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
|
20 |
|
1322
b6a4885a92df
re-enable packet benchmarking
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1220
diff
changeset
|
21 |
obj = bld.create_ns3_program('bench-packets', ['common']) |
b6a4885a92df
re-enable packet benchmarking
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1220
diff
changeset
|
22 |
obj.source = 'bench-packets.cc' |
b6a4885a92df
re-enable packet benchmarking
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1220
diff
changeset
|
23 |
|
1855
ee15fef0cb62
print-trace-sources.cc -> print-introspected-doxygen.cc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1669
diff
changeset
|
24 |
obj = bld.create_ns3_program('print-introspected-doxygen', |
3260
8c0ab08144e6
bug 186: internet-node directory must be renamed to internet-stack
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2571
diff
changeset
|
25 |
['internet-stack', 'csma-cd', 'point-to-point']) |
1855
ee15fef0cb62
print-trace-sources.cc -> print-introspected-doxygen.cc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1669
diff
changeset
|
26 |
obj.source = 'print-introspected-doxygen.cc' |
1664
306c81333d64
Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
1421
diff
changeset
|
27 |