首页 > 代码库 > wscript
wscript
REF:http://zzgthk.iteye.com/blog/1402271
ns3自带的waf不会去找依赖,也不知道怎么添加依赖。也就是说waf编译器无法自己找#include的文件
$ ls
1.txt 2.txt 3.txt 4.txt
$ rename ‘s//.txt//.ext/‘ *
$ ls
1.ext 2.ext 3.ext 4.ext
def build(bld):
module = bld.create_ns3_module(‘aodv‘, [‘internet‘, ‘wifi‘])
module.includes = ‘.‘ ##对应当前目录(aodv/model、aodv/test)
module.source = [
‘model/aodv-id-cache.cc‘,
‘model/aodv-dpd.cc‘,
‘model/aodv-rtable.cc‘,
‘model/aodv-rqueue.cc‘,
‘model/aodv-packet.cc‘,
‘model/aodv-neighbor.cc‘,
‘model/aodv-routing-protocol.cc‘,
‘helper/aodv-helper.cc‘,
]
aodv_test = bld.create_ns3_module_test_library(‘aodv‘)
aodv_test.source = [
‘test/aodv-id-cache-test-suite.cc‘,
‘test/aodv-test-suite.cc‘,
‘test/aodv-regression.cc‘,
‘test/bug-772.cc‘,
‘test/loopback.cc‘,
]
headers = bld(features=‘ns3header‘)
headers.module = ‘aodv‘
headers.source = [
‘model/aodv-id-cache.h‘,
‘model/aodv-dpd.h‘,
‘model/aodv-rtable.h‘,
‘model/aodv-rqueue.h‘,
‘model/aodv-packet.h‘,
‘model/aodv-neighbor.h‘,
‘model/aodv-routing-protocol.h‘,
‘helper/aodv-helper.h‘,
]
if bld.env[‘ENABLE_EXAMPLES‘]:
bld.recurse(‘examples‘)
bld.ns3_python_bindings()
wscript