utils/wscript
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Fri, 26 Oct 2007 14:16:40 +0200
changeset 2037 e619e734c7ea
parent 1669 5ee478e0475e
child 2046 7a9113c1b0c1
permissions -rw-r--r--
utility program to print the list of default values

## -*- 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-trace-sources',
                                 ['internet-node', 'csma-cd', 'point-to-point'])
    obj.source = 'print-trace-sources.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')

    obj = bld.create_ns3_program('print-default-values',
                                 ['core'])
    obj.source = 'print-default-values.cc'