utils/wscript
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Mon, 29 Oct 2007 15:01:36 +0100
changeset 2048 c62b4aae737d
parent 2046 7a9113c1b0c1
child 2132 b6599fb46d19
permissions -rw-r--r--
rename print-trace-sources to print-introspected-doxygen

## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
import os.path

def configure(conf):
    check = conf.create_pkgconfig_configurator()
    check.name = 'goocanvas gthread-2.0'
    check.uselib = 'MOBILITY_VISUALIZER'
    check.mandatory = False
    conf.env['ENABLE_MOBILITY_VISUALIZER'] = check.run()
    

def build(bld):
    env = bld.env_of_name('default')

    unit_tests = bld.create_ns3_program('run-tests')
    unit_tests.install_var  = 0 # do not install
    unit_tests.unit_test    = 1 # runs on 'waf check'
    unit_tests.source = 'run-tests.cc'
    ## link unit test program with all ns3 modules
    unit_tests.uselib_local = 'ns3'
    
    obj = bld.create_ns3_program('bench-simulator', ['simulator'])
    obj.source = 'bench-simulator.cc'

    obj = bld.create_ns3_program('bench-packets', ['common'])
    obj.source = 'bench-packets.cc'

    obj = bld.create_ns3_program('replay-simulation', ['simulator'])
    obj.source = 'replay-simulation.cc'

    obj = bld.create_ns3_program('print-introspected-doxygen',
                                 ['internet-node', 'csma-cd', 'point-to-point'])
    obj.source = 'print-introspected-doxygen.cc'

    if env['ENABLE_MOBILITY_VISUALIZER']:
        obj = bld.create_ns3_program('mobility-visualizer',
                                     ['internet-node', 'mobility'])
        obj.source = ['mobility-visualizer-model.cc', 'mobility-visualizer-view.cc']
        obj.uselib = 'MOBILITY_VISUALIZER'
        if os.path.basename(obj.env['CXX']).startswith("g++"):
            obj.env.append_value('CXXFLAGS', '-fno-strict-aliasing')