|
|
| 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 |
def configure(conf): |
| 4 |
conf.env['ENABLE_NET_ANIM'] = (conf.check(header_name='sys/socket.h') |
| 5 |
and conf.check(header_name='netinet/in.h')) |
| 6 |
conf.report_optional_feature("NetAnim", "NetAnim", |
| 7 |
conf.env['ENABLE_NET_ANIM'], |
| 8 |
"sys/socket.h or netinet/in.h not found") |
| 9 |
|
| 3 |
def build(bld): |
10 |
def build(bld): |
| 4 |
obj = bld.create_ns3_module('net-anim') |
11 |
obj = bld.create_ns3_module('net-anim') |
|
|
12 |
headers = bld.new_task_gen('ns3header') |
| 13 |
headers.module = 'net-anim' |
| 14 |
|
| 15 |
if not bld.env['ENABLE_NET_ANIM']: |
| 16 |
return |
| 17 |
|
| 5 |
obj.source = [ |
18 |
obj.source = [ |
| 6 |
'point-to-point-dumbbell-helper.cc', |
19 |
'point-to-point-dumbbell-helper.cc', |
| 7 |
'point-to-point-grid-helper.cc', |
20 |
'point-to-point-grid-helper.cc', |
|
|
| 9 |
'node-location.cc' |
22 |
'node-location.cc' |
| 10 |
] |
23 |
] |
| 11 |
|
24 |
|
| 12 |
headers = bld.new_task_gen('ns3header') |
|
|
| 13 |
headers.module = 'net-anim' |
| 14 |
headers.source = [ |
25 |
headers.source = [ |
| 15 |
'point-to-point-dumbbell-helper.h', |
26 |
'point-to-point-dumbbell-helper.h', |
| 16 |
'point-to-point-grid-helper.h', |
27 |
'point-to-point-grid-helper.h', |