author | Mitch Watrous <watrous@u.washington.edu> |
Thu, 24 Mar 2011 10:54:24 -0700 | |
changeset 6946 | 4804469564cf |
parent 6915 | src/tools/visualizer/wscript@d61f311999f1 |
child 6950 | df526e27b5b1 |
permissions | -rw-r--r-- |
6676
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
1 |
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
2 |
|
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
3 |
def build(bld): |
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
4 |
headers = bld.new_task_gen('ns3header') |
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
5 |
headers.module = 'visualizer' |
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
6 |
headers.source = [ |
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
7 |
] |
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
8 |
|
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
9 |
module = bld.create_ns3_module('visualizer', ['core']) |
6915
d61f311999f1
Fix the build of visualizer module when the python headers are missing
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6676
diff
changeset
|
10 |
if not bld.env['ENABLE_PYTHON_BINDINGS']: |
d61f311999f1
Fix the build of visualizer module when the python headers are missing
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6676
diff
changeset
|
11 |
return |
d61f311999f1
Fix the build of visualizer module when the python headers are missing
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6676
diff
changeset
|
12 |
|
6676
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
13 |
module.features.append('pyembed') |
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
14 |
module.env.append_value('CXXFLAGS', module.env['shlib_CXXFLAGS']) |
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
15 |
module.includes = '.' |
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
16 |
|
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
17 |
if bld.env['ENABLE_PYTHON_BINDINGS']: |
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
18 |
module.source = [ |
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
19 |
'model/pyviz.cc', |
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
20 |
'model/visual-simulator-impl.cc', |
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
21 |
] |
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
22 |
headers.source.append('model/pyviz.h') |
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
23 |
else: |
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
24 |
module.source = [ |
8a57344a8d09
Codereview Issue 2692041: Add pyviz module
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
25 |
] |