Files
ns-3-dev/src/simulator/wscript
T

73 lines
2.1 KiB
Python

## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
import sys
def configure(conf):
if not conf.check(lib='rt', uselib='RT', define_name='HAVE_RT'):
conf.report_optional_feature("RealTime", "Real Time Simulator",
False, "librt is not available")
else:
conf.report_optional_feature("RealTime", "Real Time Simulator",
conf.env['ENABLE_THREADING'],
"threading not enabled")
conf.env["ENABLE_REAL_TIME"] = conf.env['ENABLE_THREADING']
def build(bld):
sim = bld.create_ns3_module('simulator', ['core'])
sim.source = [
'time.cc',
'event-id.cc',
'scheduler.cc',
'list-scheduler.cc',
'map-scheduler.cc',
'heap-scheduler.cc',
'calendar-scheduler.cc',
'ns2-calendar-scheduler.cc',
'event-impl.cc',
'simulator.cc',
'simulator-impl.cc',
'default-simulator-impl.cc',
'timer.cc',
'watchdog.cc',
'synchronizer.cc',
'make-event.cc',
]
headers = bld.new_task_gen('ns3header')
headers.module = 'simulator'
headers.source = [
'nstime.h',
'event-id.h',
'event-impl.h',
'simulator.h',
'simulator-impl.h',
'default-simulator-impl.h',
'scheduler.h',
'list-scheduler.h',
'map-scheduler.h',
'heap-scheduler.h',
'calendar-scheduler.h',
'ns2-calendar-scheduler.h',
'simulation-singleton.h',
'timer.h',
'timer-impl.h',
'watchdog.h',
'synchronizer.h',
'make-event.h',
]
env = bld.env_of_name('default')
if env['ENABLE_REAL_TIME']:
headers.source.extend([
'realtime-simulator-impl.h',
'wall-clock-synchronizer.h',
])
sim.source.extend([
'realtime-simulator-impl.cc',
'wall-clock-synchronizer.cc',
])
sim.uselib = 'RT'