[Ns-developers] ns-3.9 release update
Josh Pelkey
jpelkey at gatech.edu
Tue Aug 3 11:52:15 PDT 2010
I think it might be better to have a separate wscript in the example
directory of the module. This way you can do ./waf --run
path/to/example, along with just typing the example name. If you
don't use a separate wscript in the example directory, you can't
specify the correct full path to the example (it ends up expecting the
path, minus the example directory).
So I would modify the module's root wscript to build the example
subdirectory. Something like this:
====================
src/devices/uan/wscript
====================
same as before with this at the bottom:
...
if (bld.env['ENABLE_EXAMPLES']):
bld.add_subdirs('example')
====================
src/devices/uan/example/wscript
====================
def build(bld):
obj = bld.create_ns3_program('uan-cw-example', ['core',
'simulator', 'mobility', 'uan'])
obj.source = 'uan-cw-example.cc'
obj = bld.create_ns3_program('uan-rc-example', ['core',
'simulator', 'mobility', 'uan'])
obj.source = 'uan-rc-example.cc'
--
Josh
On Mon, Aug 2, 2010 at 1:38 AM, Pavel Boyko <boyko at iitp.ru> wrote:
> Hi, Jens,
>
> On Friday, July 30, 2010 06:52:18 pm Jens Mittag wrote:
>> Find attached the wscript file that we use. What you are looking for I
>> guess is the following:
>>
>> def build(bld):
>> ...
>> obj = bld.create_ns3_program('physim-1sender-only-pathloss',
>> ['core', 'simulator', 'mobility', 'wifi', 'physim-wifi'])
>> obj.source = 'example/physim-1sender-only-pathloss.cc'
>
> Exactly, thank you. The final stroke was to account for ./waf --disable-
> examples option checking bld.env['ENABLE_EXAMPLES'] variable. I attach my
> current stub for wscript.
>
> Pavel
>
More information about the Ns-developers
mailing list