author | Gustavo J. A. M. Carneiro <gjc@inescporto.pt> |
Wed, 30 Mar 2011 17:21:11 +0100 | |
changeset 6982 | c383b48d0831 |
parent 6932 | 3b497f4f6ad9 |
child 7244 | 1a9428ead071 |
permissions | -rw-r--r-- |
3827
4b603cd4ee42
give up on merging tap and emulated, break apart
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
1 |
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
4b603cd4ee42
give up on merging tap and emulated, break apart
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
2 |
|
5975
c85cb9b073a0
comparing with http://code.nsnam.org/ns-3-dev
Craig Dowell <craigdo@ee.washington.edu>
parents:
4187
diff
changeset
|
3 |
import os.path |
c85cb9b073a0
comparing with http://code.nsnam.org/ns-3-dev
Craig Dowell <craigdo@ee.washington.edu>
parents:
4187
diff
changeset
|
4 |
|
3854 | 5 |
def configure(conf): |
4122
8f403a728b57
EmuNetDevice also depends on the availibility of threading support
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
4064
diff
changeset
|
6 |
if conf.env['ENABLE_THREADING']: |
4187
900966cabdc6
emu depends on netpacket/packet.h
Craig Dowell <craigdo@ee.washington.edu>
parents:
4186
diff
changeset
|
7 |
conf.env['ENABLE_EMU'] = conf.check(header_name='netpacket/packet.h', |
900966cabdc6
emu depends on netpacket/packet.h
Craig Dowell <craigdo@ee.washington.edu>
parents:
4186
diff
changeset
|
8 |
define_name='HAVE_PACKET_H') |
900966cabdc6
emu depends on netpacket/packet.h
Craig Dowell <craigdo@ee.washington.edu>
parents:
4186
diff
changeset
|
9 |
conf.report_optional_feature("EmuNetDevice", "Emulated Net Device", |
900966cabdc6
emu depends on netpacket/packet.h
Craig Dowell <craigdo@ee.washington.edu>
parents:
4186
diff
changeset
|
10 |
conf.env['ENABLE_EMU'], |
900966cabdc6
emu depends on netpacket/packet.h
Craig Dowell <craigdo@ee.washington.edu>
parents:
4186
diff
changeset
|
11 |
"<netpacket/packet.h> include not detected") |
4122
8f403a728b57
EmuNetDevice also depends on the availibility of threading support
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
4064
diff
changeset
|
12 |
else: |
4187
900966cabdc6
emu depends on netpacket/packet.h
Craig Dowell <craigdo@ee.washington.edu>
parents:
4186
diff
changeset
|
13 |
conf.report_optional_feature("EmuNetDevice", "Emulated Net Device", |
900966cabdc6
emu depends on netpacket/packet.h
Craig Dowell <craigdo@ee.washington.edu>
parents:
4186
diff
changeset
|
14 |
False, |
4122
8f403a728b57
EmuNetDevice also depends on the availibility of threading support
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
4064
diff
changeset
|
15 |
"needs threading support which is not available") |
3827
4b603cd4ee42
give up on merging tap and emulated, break apart
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
16 |
|
5975
c85cb9b073a0
comparing with http://code.nsnam.org/ns-3-dev
Craig Dowell <craigdo@ee.washington.edu>
parents:
4187
diff
changeset
|
17 |
if conf.env['ENABLE_EMU']: |
c85cb9b073a0
comparing with http://code.nsnam.org/ns-3-dev
Craig Dowell <craigdo@ee.washington.edu>
parents:
4187
diff
changeset
|
18 |
blddir = os.path.abspath(os.path.join(conf.blddir, conf.env.variant())) |
c85cb9b073a0
comparing with http://code.nsnam.org/ns-3-dev
Craig Dowell <craigdo@ee.washington.edu>
parents:
4187
diff
changeset
|
19 |
emucreatordir = os.path.abspath(os.path.join(blddir, "src/devices/emu")) |
c85cb9b073a0
comparing with http://code.nsnam.org/ns-3-dev
Craig Dowell <craigdo@ee.washington.edu>
parents:
4187
diff
changeset
|
20 |
conf.env.append_value('NS3_EXECUTABLE_PATH', emucreatordir) |
c85cb9b073a0
comparing with http://code.nsnam.org/ns-3-dev
Craig Dowell <craigdo@ee.washington.edu>
parents:
4187
diff
changeset
|
21 |
|
3827
4b603cd4ee42
give up on merging tap and emulated, break apart
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
22 |
def build(bld): |
6823
a27f86fb4e55
Merge node and common modules into new network module
Tom Henderson <tomh@tomh.org>
parents:
5975
diff
changeset
|
23 |
module = bld.create_ns3_module('emu', ['network']) |
3827
4b603cd4ee42
give up on merging tap and emulated, break apart
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
24 |
module.source = [ |
4b603cd4ee42
give up on merging tap and emulated, break apart
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
25 |
] |
4064
10222f483860
Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3916
diff
changeset
|
26 |
headers = bld.new_task_gen('ns3header') |
3830
8862b9be62bb
rework to address suid root issues
Craig Dowell <craigdo@ee.washington.edu>
parents:
3827
diff
changeset
|
27 |
headers.module = 'emu' |
8862b9be62bb
rework to address suid root issues
Craig Dowell <craigdo@ee.washington.edu>
parents:
3827
diff
changeset
|
28 |
headers.source = [ |
6848
1f453ad50ef3
Converts csma, emu, tap-bridge, point-to-point, wifi and wimax modules into modular format
Lalith Suresh <suresh.lalith@gmail.com>
parents:
6823
diff
changeset
|
29 |
'doc/emu.h', |
3830
8862b9be62bb
rework to address suid root issues
Craig Dowell <craigdo@ee.washington.edu>
parents:
3827
diff
changeset
|
30 |
] |
8862b9be62bb
rework to address suid root issues
Craig Dowell <craigdo@ee.washington.edu>
parents:
3827
diff
changeset
|
31 |
|
6982
c383b48d0831
Make sure modular python bindings for emu and tap-bridge are not built on macosx
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6932
diff
changeset
|
32 |
if not bld.env['ENABLE_EMU']: |
c383b48d0831
Make sure modular python bindings for emu and tap-bridge are not built on macosx
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6932
diff
changeset
|
33 |
return |
3854 | 34 |
|
6982
c383b48d0831
Make sure modular python bindings for emu and tap-bridge are not built on macosx
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6932
diff
changeset
|
35 |
module.source.extend([ |
c383b48d0831
Make sure modular python bindings for emu and tap-bridge are not built on macosx
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6932
diff
changeset
|
36 |
'model/emu-net-device.cc', |
6848
1f453ad50ef3
Converts csma, emu, tap-bridge, point-to-point, wifi and wimax modules into modular format
Lalith Suresh <suresh.lalith@gmail.com>
parents:
6823
diff
changeset
|
37 |
'model/emu-encode-decode.cc', |
6982
c383b48d0831
Make sure modular python bindings for emu and tap-bridge are not built on macosx
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6932
diff
changeset
|
38 |
'helper/emu-helper.cc', |
c383b48d0831
Make sure modular python bindings for emu and tap-bridge are not built on macosx
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6932
diff
changeset
|
39 |
]) |
c383b48d0831
Make sure modular python bindings for emu and tap-bridge are not built on macosx
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6932
diff
changeset
|
40 |
headers.source.extend([ |
c383b48d0831
Make sure modular python bindings for emu and tap-bridge are not built on macosx
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6932
diff
changeset
|
41 |
'model/emu-net-device.h', |
c383b48d0831
Make sure modular python bindings for emu and tap-bridge are not built on macosx
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6932
diff
changeset
|
42 |
'helper/emu-helper.h', |
c383b48d0831
Make sure modular python bindings for emu and tap-bridge are not built on macosx
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6932
diff
changeset
|
43 |
]) |
c383b48d0831
Make sure modular python bindings for emu and tap-bridge are not built on macosx
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6932
diff
changeset
|
44 |
|
c383b48d0831
Make sure modular python bindings for emu and tap-bridge are not built on macosx
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6932
diff
changeset
|
45 |
obj = bld.create_suid_program('emu-sock-creator') |
c383b48d0831
Make sure modular python bindings for emu and tap-bridge are not built on macosx
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6932
diff
changeset
|
46 |
obj.source = [ |
c383b48d0831
Make sure modular python bindings for emu and tap-bridge are not built on macosx
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6932
diff
changeset
|
47 |
'model/emu-sock-creator.cc', |
c383b48d0831
Make sure modular python bindings for emu and tap-bridge are not built on macosx
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6932
diff
changeset
|
48 |
'model/emu-encode-decode.cc', |
c383b48d0831
Make sure modular python bindings for emu and tap-bridge are not built on macosx
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6932
diff
changeset
|
49 |
] |
3854 | 50 |
|
6848
1f453ad50ef3
Converts csma, emu, tap-bridge, point-to-point, wifi and wimax modules into modular format
Lalith Suresh <suresh.lalith@gmail.com>
parents:
6823
diff
changeset
|
51 |
if bld.env['ENABLE_EXAMPLES']: |
1f453ad50ef3
Converts csma, emu, tap-bridge, point-to-point, wifi and wimax modules into modular format
Lalith Suresh <suresh.lalith@gmail.com>
parents:
6823
diff
changeset
|
52 |
bld.add_subdirs('examples') |
6932
3b497f4f6ad9
Add more modular bindings
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6852
diff
changeset
|
53 |
|
3b497f4f6ad9
Add more modular bindings
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6852
diff
changeset
|
54 |
bld.ns3_python_bindings() |