## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
import os
import Options
import os.path
import ns3waf
import sys
# local modules
def options(opt):
opt.tool_options('compiler_cc')
ns3waf.options(opt)
def configure(conf):
ns3waf.check_modules(conf, ['core', 'network', 'internet'], mandatory = True)
ns3waf.check_modules(conf, ['point-to-point', 'tap-bridge', 'netanim'], mandatory = False)
ns3waf.check_modules(conf, ['wifi', 'point-to-point', 'csma', 'mobility'], mandatory = False)
ns3waf.check_modules(conf, ['point-to-point-layout'], mandatory = False)
ns3waf.check_modules(conf, ['topology-read', 'applications', 'visualizer'], mandatory = False)
conf.check_tool('compiler_cc')
conf.env.append_value('CXXFLAGS', '-I/usr/include/python2.6')
conf.env.append_value('LINKFLAGS', '-pthread')
conf.check (lib='dl', mandatory = True)
conf.env['ENABLE_PYTHON_BINDINGS'] = True
conf.env['NS3_ENABLED_MODULES'] = []
ns3waf.print_feature_summary(conf)
def build_dce_tests(module, bld):
module.add_runner_test(needed=['core', 'dce-submod', 'internet', 'csma'],
source=['test/dce-submod-test.cc'])
def build_dce_examples(module):
dce_examples = [
]
for name,lib in dce_examples:
module.add_example(**dce_kw(target = 'bin/' + name,
source = ['example/' + name + '.cc'],
lib = lib))
module.add_example(needed = ['core', 'internet', 'dce-submod', 'point-to-point'],
target='bin/dce-submod-simple',
source=['example/dce-submod-simple.cc'])
def build(bld):
module_source = [
'helper/dce-submod-helper.cc',
]
module_headers = [
'helper/dce-submod-helper.h',
]
module_source = module_source
module_headers = module_headers
uselib = ns3waf.modules_uselib(bld, ['core', 'network', 'internet', 'netlink', 'dce'])
module = ns3waf.create_module(bld, name='dce-submod',
source=module_source,
headers=module_headers,
use=uselib,
lib=['dl'])
build_dce_tests(module,bld)
build_dce_examples(module)