SConstruct
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Fri, 18 May 2007 20:57:02 +0200
changeset 661 ec0c58ab1e34
parent 660 8aaf62962dcf
child 666 f29615cccd05
permissions -rw-r--r--
add VERSION to extra dist
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
124
c0d0f7bebb73 add magic emacs incantation for python
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 108
diff changeset
     1
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
import os.path
62
0ec2ff3a483f split SConstruct to make it more readable
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 61
diff changeset
     3
import build
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     4
659
ae1c85bcb33e pull version number from VERSION file
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 656
diff changeset
     5
version_file = open ('VERSION', 'r')
661
ec0c58ab1e34 add VERSION to extra dist
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 660
diff changeset
     6
version = version_file.readline ()
659
ae1c85bcb33e pull version number from VERSION file
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 656
diff changeset
     7
version_file.close ()
661
ec0c58ab1e34 add VERSION to extra dist
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 660
diff changeset
     8
version = version.strip ()
659
ae1c85bcb33e pull version number from VERSION file
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 656
diff changeset
     9
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
    10
ns3 = build.Ns3()
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    11
ns3.build_dir = 'build-dir'
659
ae1c85bcb33e pull version number from VERSION file
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 656
diff changeset
    12
ns3.version = version
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    13
ns3.name = 'ns3'
652
b7867dad0b7a change version number to match ns convention
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 637
diff changeset
    14
ns3.distname = 'ns'
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
    15
ns3.doxygen_config = os.path.join('doc', 'doxygen.conf')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
    16
ns3.add_extra_dist(os.path.join('doc', 'main.txt'))
656
01ccd5f47ed4 add doc/architecture.pdf to dist
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 652
diff changeset
    17
ns3.add_extra_dist ('doc/architecture.pdf')
637
6285ef4d0fec improve dist support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 634
diff changeset
    18
ns3.add_extra_dist ('doc/contributing.txt')
6285ef4d0fec improve dist support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 634
diff changeset
    19
ns3.add_extra_dist ('doc/build.txt')
658
32307a281d86 Pick up codingstd.txt in dist; point interested waf users to build-waf.txt in the development branch
Tom Henderson <tomh@tomh.org>
parents: 656
diff changeset
    20
ns3.add_extra_dist ('doc/codingstd.txt')
637
6285ef4d0fec improve dist support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 634
diff changeset
    21
ns3.add_extra_dist ('doc/mercurial.txt')
6285ef4d0fec improve dist support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 634
diff changeset
    22
ns3.add_extra_dist ('README')
6285ef4d0fec improve dist support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 634
diff changeset
    23
ns3.add_extra_dist ('RELEASE_NOTES')
6285ef4d0fec improve dist support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 634
diff changeset
    24
ns3.add_extra_dist ('AUTHORS')
661
ec0c58ab1e34 add VERSION to extra dist
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 660
diff changeset
    25
ns3.add_extra_dist ('VERSION')
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    26
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    28
#
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    29
# The Core module
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    30
#
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
    31
core = build.Ns3Module('core', 'src/core')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
    32
ns3.add(core)
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
    33
core.add_sources([
152
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
    34
    'reference-list-test.cc',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
    35
    'callback-test.cc',
265
fb0c531530f2 add debugging support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
    36
    'debug.cc',
276
58651aff818b split out assert from debug.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 268
diff changeset
    37
    'assert.cc',
223
80f1c6b76999 initial go at smart pointer implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 197
diff changeset
    38
    'ptr.cc',
379
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents: 378
diff changeset
    39
    'object.cc',
291
f5a98bae86c1 large checkin-- bringing in serial device code
Tom Henderson <tomh@tomh.org>
parents: 288
diff changeset
    40
    'test.cc',
346
4a76f247e7dc Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents: 338
diff changeset
    41
    'random-variable.cc',
4a76f247e7dc Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents: 338
diff changeset
    42
    'rng-stream.cc',
578
e305018537c9 rename ns-unknown.h/cc ns-unknown-manager.h/cc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 526
diff changeset
    43
    'interface.cc',
526
01999879c76b a first draft of a component manager
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 525
diff changeset
    44
    'uid-manager.cc',
439
fed13fb45eef Incorporated defaults and command-line arguments
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 412
diff changeset
    45
    'default-value.cc',
fed13fb45eef Incorporated defaults and command-line arguments
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 412
diff changeset
    46
    'command-line.cc',
fed13fb45eef Incorporated defaults and command-line arguments
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 412
diff changeset
    47
    'type-name.cc',
578
e305018537c9 rename ns-unknown.h/cc ns-unknown-manager.h/cc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 526
diff changeset
    48
    'component-manager.cc',
152
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
    49
    ])
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
    50
env = Environment()
299
dd6d1a6d6eff strawman connectors and channel
owner@UPSTAIRS.Belkin
parents: 296
diff changeset
    51
if env['PLATFORM'] == 'posix' or env['PLATFORM'] == 'darwin' or env['PLATFORM'] == 'cygwin':
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
    52
    core.add_external_dep('pthread')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
    53
    core.add_sources([
152
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
    54
        'unix-system-wall-clock-ms.cc',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
    55
        ])
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    56
elif env['PLATFORM'] == 'win32':
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
    57
    core.add_sources([
152
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
    58
        'win32-system-wall-clock-ms.cc',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
    59
        ])
525
4a6c58f0e327 define class Iid to replace the uint32_t as suggested by Gustavo
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 524
diff changeset
    60
core.add_headers ([
526
01999879c76b a first draft of a component manager
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 525
diff changeset
    61
    'uid-manager.h',
01999879c76b a first draft of a component manager
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 525
diff changeset
    62
    'singleton.h',
525
4a6c58f0e327 define class Iid to replace the uint32_t as suggested by Gustavo
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 524
diff changeset
    63
])
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
    64
core.add_inst_headers([
152
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
    65
    'system-wall-clock-ms.h',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
    66
    'reference-list.h',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
    67
    'callback.h',
223
80f1c6b76999 initial go at smart pointer implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 197
diff changeset
    68
    'ptr.h',
379
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents: 378
diff changeset
    69
    'object.h',
265
fb0c531530f2 add debugging support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
    70
    'debug.h',
276
58651aff818b split out assert from debug.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 268
diff changeset
    71
    'assert.h',
278
fc1133fee95d add fatal-error.h header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 276
diff changeset
    72
    'fatal-error.h',
346
4a76f247e7dc Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents: 338
diff changeset
    73
    'test.h',
4a76f247e7dc Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents: 338
diff changeset
    74
    'random-variable.h',
352
8fb57ba7b707 Add Mathieu's super object container; add Rx trace on SerialNetDevice
Tom Henderson <tomh@tomh.org>
parents: 351
diff changeset
    75
    'rng-stream.h',
578
e305018537c9 rename ns-unknown.h/cc ns-unknown-manager.h/cc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 526
diff changeset
    76
    'interface.h',
439
fed13fb45eef Incorporated defaults and command-line arguments
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 412
diff changeset
    77
    'default-value.h',
fed13fb45eef Incorporated defaults and command-line arguments
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 412
diff changeset
    78
    'command-line.h',
fed13fb45eef Incorporated defaults and command-line arguments
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 412
diff changeset
    79
    'type-name.h',
578
e305018537c9 rename ns-unknown.h/cc ns-unknown-manager.h/cc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 526
diff changeset
    80
    'component-manager.h',
152
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
    81
    ])
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    82
265
fb0c531530f2 add debugging support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
    83
def config_core (env, config):
fb0c531530f2 add debugging support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
    84
    retval = []
fb0c531530f2 add debugging support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
    85
    # XXX This check is primitive but it should be
fb0c531530f2 add debugging support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
    86
    # good enough for now.
fb0c531530f2 add debugging support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
    87
    if config.CheckCHeader ('stdlib.h') == 1:
fb0c531530f2 add debugging support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
    88
        retval.append ('#define HAVE_STDLIB_H 1')
fb0c531530f2 add debugging support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
    89
        retval.append ('#define HAVE_GETENV 1')
fb0c531530f2 add debugging support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
    90
    else:
fb0c531530f2 add debugging support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
    91
        retval.append ('#undef HAVE_STDLIB_H')
fb0c531530f2 add debugging support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
    92
        retval.append ('#undef HAVE_GETENV')
fb0c531530f2 add debugging support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
    93
    return retval
fb0c531530f2 add debugging support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
    94
core.add_config (config_core)
fb0c531530f2 add debugging support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
    95
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    96
#
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    97
# The Simu module
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    98
#
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
    99
simu = build.Ns3Module('simulator', 'src/simulator')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   100
ns3.add(simu)
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   101
simu.add_dep('core')
173
c42687a343e1 add dep on math library
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 171
diff changeset
   102
simu.add_external_dep('m')
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   103
simu.add_sources([
168
037cd2b37c67 split high precision implementations in different files
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 165
diff changeset
   104
    'high-precision.cc',
152
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   105
    'time.cc',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   106
    'event-id.cc',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   107
    'scheduler.cc',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   108
    'scheduler-factory.cc',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   109
    'scheduler-list.cc',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   110
    'scheduler-heap.cc',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   111
    'scheduler-map.cc',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   112
    'event-impl.cc',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   113
    'simulator.cc',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   114
    ])
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   115
simu.add_headers([
152
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   116
    'scheduler-heap.h',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   117
    'scheduler-map.h',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   118
    'scheduler-list.h'
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   119
    ])
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   120
simu.add_inst_headers([
153
22c3d53dbae3 Add HighPrecision class used for external Time bookkeeping
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 152
diff changeset
   121
    'high-precision.h',
152
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   122
    'nstime.h',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   123
    'event-id.h',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   124
    'event-impl.h',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   125
    'simulator.h',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   126
    'scheduler.h',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   127
    'scheduler-factory.h',
484
cf7fbb84d74b rework the Node and NodeList classes to manage reference counts correctly
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 463
diff changeset
   128
    'simulation-singleton.h',
152
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   129
    ])
168
037cd2b37c67 split high precision implementations in different files
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 165
diff changeset
   130
high_precision_as_double = ARGUMENTS.get('high-precision-as-double', 'n')
170
9f68cb694f40 implement 128 bit arithmetic with cairo's internal types
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 168
diff changeset
   131
if high_precision_as_double == 'y':
168
037cd2b37c67 split high precision implementations in different files
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 165
diff changeset
   132
    simu.add_inst_header ('high-precision-double.h')
037cd2b37c67 split high precision implementations in different files
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 165
diff changeset
   133
    simu.add_source ('high-precision-double.cc')
037cd2b37c67 split high precision implementations in different files
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 165
diff changeset
   134
else:
171
64cafe7b7baf make sure cairo internal header is installed when needed.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 170
diff changeset
   135
    simu.add_inst_headers ([
64cafe7b7baf make sure cairo internal header is installed when needed.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 170
diff changeset
   136
        'high-precision-128.h',
64cafe7b7baf make sure cairo internal header is installed when needed.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 170
diff changeset
   137
        'cairo-wideint-private.h'
64cafe7b7baf make sure cairo internal header is installed when needed.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 170
diff changeset
   138
        ])
170
9f68cb694f40 implement 128 bit arithmetic with cairo's internal types
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 168
diff changeset
   139
    simu.add_sources ([
9f68cb694f40 implement 128 bit arithmetic with cairo's internal types
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 168
diff changeset
   140
        'high-precision-128.cc',
9f68cb694f40 implement 128 bit arithmetic with cairo's internal types
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 168
diff changeset
   141
        'cairo-wideint.c',
9f68cb694f40 implement 128 bit arithmetic with cairo's internal types
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 168
diff changeset
   142
        ])
168
037cd2b37c67 split high precision implementations in different files
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 165
diff changeset
   143
165
33a2c446e6dc add needed configure magic and header includes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 153
diff changeset
   144
def config_simulator (env, config):
33a2c446e6dc add needed configure magic and header includes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 153
diff changeset
   145
    retval = []
168
037cd2b37c67 split high precision implementations in different files
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 165
diff changeset
   146
    high_precision_as_double = ARGUMENTS.get('high-precision-as-double', 'n')
037cd2b37c67 split high precision implementations in different files
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 165
diff changeset
   147
    if high_precision_as_double == 'y':
037cd2b37c67 split high precision implementations in different files
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 165
diff changeset
   148
        retval.append ('#define USE_HIGH_PRECISION_DOUBLE 1')
037cd2b37c67 split high precision implementations in different files
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 165
diff changeset
   149
    else:
037cd2b37c67 split high precision implementations in different files
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 165
diff changeset
   150
        retval.append ('#undef USE_HIGH_PRECISION_DOUBLE')
165
33a2c446e6dc add needed configure magic and header includes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 153
diff changeset
   151
    if config.CheckCHeader ('stdint.h') == 1:
33a2c446e6dc add needed configure magic and header includes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 153
diff changeset
   152
        retval.append ('#define HAVE_STDINT_H 1')
33a2c446e6dc add needed configure magic and header includes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 153
diff changeset
   153
    elif config.CheckCHeader ('inttypes.h') == 1:
33a2c446e6dc add needed configure magic and header includes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 153
diff changeset
   154
        retval.append ('#define HAVE_INTTYPES_H 1')
33a2c446e6dc add needed configure magic and header includes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 153
diff changeset
   155
    elif config.CheckCHeader ('sys/inttypes.h') == 1:
33a2c446e6dc add needed configure magic and header includes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 153
diff changeset
   156
        retval.append ('#define HAVE_SYS_INT_TYPES_H 1')
33a2c446e6dc add needed configure magic and header includes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 153
diff changeset
   157
    return retval
33a2c446e6dc add needed configure magic and header includes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 153
diff changeset
   158
simu.add_config (config_simulator)
33a2c446e6dc add needed configure magic and header includes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 153
diff changeset
   159
    
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   160
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   161
#
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   162
# The Common module
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   163
#
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   164
common = build.Ns3Module('common', 'src/common')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   165
common.add_deps(['core', 'simulator'])
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   166
ns3.add(common)
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   167
common.add_sources([
152
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   168
    'buffer.cc',
463
c2082308e01a merge Packet API changes needed for Packet pretty printing.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 461
diff changeset
   169
    'chunk.cc',
152
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   170
    'header.cc',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   171
    'trailer.cc',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   172
    'packet.cc',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   173
    'tags.cc',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   174
    'pcap-writer.cc',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   175
    'variable-tracer-test.cc',
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   176
    'trace-context.cc',
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   177
    'trace-resolver.cc',
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   178
    'callback-trace-source.cc',
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   179
    'empty-trace-resolver.cc',
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   180
    'composite-trace-resolver.cc',
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   181
    'trace-root.cc',
365
2a5cd7125778 Added in DataRate to common module
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 359
diff changeset
   182
    'data-rate.cc',
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   183
    ])
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   184
common.add_headers ([
152
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   185
    ])
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   186
common.add_inst_headers([
152
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   187
    'buffer.h',
463
c2082308e01a merge Packet API changes needed for Packet pretty printing.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 461
diff changeset
   188
    'chunk.h',
152
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   189
    'header.h',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   190
    'trailer.h',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   191
    'tags.h',
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   192
    'packet.h',
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   193
    'uv-trace-source.h',
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   194
    'sv-trace-source.h',
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   195
    'fv-trace-source.h',
152
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   196
    'pcap-writer.h',
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   197
    'callback-trace-source.h',
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   198
    'trace-context.h',
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   199
    'trace-resolver.h',
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   200
    'empty-trace-resolver.h',
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   201
    'composite-trace-resolver.h',
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   202
    'array-trace-resolver.h',
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   203
    'trace-root.h',
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   204
    'terminal-trace-resolver.h',
355
d18da75542c7 Add static node factory methods to class Node
Tom Henderson <tomh@tomh.org>
parents: 353
diff changeset
   205
    'smartvector.h',
d18da75542c7 Add static node factory methods to class Node
Tom Henderson <tomh@tomh.org>
parents: 353
diff changeset
   206
    'smartset.h',
365
2a5cd7125778 Added in DataRate to common module
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 359
diff changeset
   207
    'data-rate.h',
152
f3e570a78662 fix python indent.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 136
diff changeset
   208
    ])
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   209
232
8cd08910f9a1 initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
   210
node = build.Ns3Module ('node', 'src/node')
8cd08910f9a1 initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
   211
ns3.add (node)
247
fb7375bb43d7 make the sample code compile and link.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 245
diff changeset
   212
node.add_deps (['core', 'common', 'simulator'])
232
8cd08910f9a1 initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
   213
node.add_sources ([
604
0b6bef4e99bc rename node.h to i-node.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 586
diff changeset
   214
    'i-node.cc',
524
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   215
    'ipv4-address.cc',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   216
    'net-device.cc',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   217
    'mac-address.cc',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   218
    'llc-snap-header.cc',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   219
    'ipv4-route.cc',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   220
    'queue.cc',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   221
    'drop-tail.cc',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   222
    'channel.cc',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   223
    'node-list.cc',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   224
    'socket.cc',
619
528f0554b677 make OnOffApplication not depend on IUdp
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 605
diff changeset
   225
    'i-socket-factory.cc',
524
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   226
    'i-udp.cc',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   227
    'i-ipv4.cc',
585
a009b03b720a remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 578
diff changeset
   228
    'application.cc',
524
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   229
    ])
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   230
node.add_inst_headers ([
604
0b6bef4e99bc rename node.h to i-node.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 586
diff changeset
   231
    'i-node.h',
524
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   232
    'ipv4-address.h',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   233
    'net-device.h',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   234
    'mac-address.h',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   235
    'ipv4-route.h',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   236
    'queue.h',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   237
    'drop-tail.h',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   238
    'llc-snap-header.h',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   239
    'channel.h',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   240
    'node-list.h',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   241
    'socket.h',
619
528f0554b677 make OnOffApplication not depend on IUdp
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 605
diff changeset
   242
    'i-socket-factory.h',
524
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   243
    'i-udp.h',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   244
    'i-ipv4.h',
585
a009b03b720a remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 578
diff changeset
   245
    'application.h',
524
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   246
    ])
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   247
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   248
applications = build.Ns3Module ('applications', 'src/applications')
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   249
ns3.add (applications)
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   250
applications.add_deps (['node'])
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   251
applications.add_sources ([
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   252
    'onoff-application.cc',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   253
])
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   254
applications.add_inst_headers ([
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   255
    'onoff-application.h',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   256
])
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   257
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   258
inode = build.Ns3Module ('internet-node', 'src/internet-node')
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   259
ns3.add (inode)
585
a009b03b720a remove ApplicationList. Move functionality to Node class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 578
diff changeset
   260
inode.add_deps (['node'])
524
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   261
inode.add_sources ([
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   262
    'internet-node.cc',
605
3a62e5c4de75 rename internet-node.h to i-node-impl.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 604
diff changeset
   263
    'i-node-impl.cc',
234
6124bda39cb3 code from all trees.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 232
diff changeset
   264
    'l3-demux.cc',
241
9004ab4cfe17 add Ipv4 and Udp node capabilities, rework Copy methods to include an extra Node * argument
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 240
diff changeset
   265
    'l3-protocol.cc',
234
6124bda39cb3 code from all trees.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 232
diff changeset
   266
    'ipv4-l4-demux.cc',
240
7da682f99bf9 add non-debugged udp stack
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 238
diff changeset
   267
    'ipv4-l4-protocol.cc',
235
190d5bef3254 add ipv4 and udp header, add ipv4 checksum support to make the udp header compile. Need to be fixed in UdpHeader later.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 234
diff changeset
   268
    'ipv4-header.cc',
190d5bef3254 add ipv4 and udp header, add ipv4 checksum support to make the udp header compile. Need to be fixed in UdpHeader later.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 234
diff changeset
   269
    'udp-header.cc',
190d5bef3254 add ipv4 and udp header, add ipv4 checksum support to make the udp header compile. Need to be fixed in UdpHeader later.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 234
diff changeset
   270
    'ipv4-checksum.cc',
236
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 235
diff changeset
   271
    'ipv4-interface.cc',
240
7da682f99bf9 add non-debugged udp stack
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 238
diff changeset
   272
    'ipv4.cc',
238
2f09fd9cf32e add start of udp stack
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 236
diff changeset
   273
    'ipv4-end-point.cc',
240
7da682f99bf9 add non-debugged udp stack
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 238
diff changeset
   274
    'udp.cc',
242
a44932709b47 add arp stack
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 241
diff changeset
   275
    'arp-header.cc',
a44932709b47 add arp stack
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 241
diff changeset
   276
    'arp-cache.cc',
a44932709b47 add arp stack
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 241
diff changeset
   277
    'arp-ipv4-interface.cc',
a44932709b47 add arp stack
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 241
diff changeset
   278
    'arp.cc',
247
fb7375bb43d7 make the sample code compile and link.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 245
diff changeset
   279
    'ipv4-loopback-interface.cc',
fb7375bb43d7 make the sample code compile and link.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 245
diff changeset
   280
    'header-utils.cc',
453
ddbb935800d8 remove DatagramSocket, use Socket base class for UdpSocket subclass.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 448
diff changeset
   281
    'udp-socket.cc',
495
a839408950b9 rework the socket/udp layer to remove the Ipv4EndPointDemux template
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 484
diff changeset
   282
    'ipv4-end-point-demux.cc',
521
e540282f8462 remove Node::GetArp
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 519
diff changeset
   283
    'i-arp-private.cc',
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 521
diff changeset
   284
    'i-ipv4-impl.cc',
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 521
diff changeset
   285
    'i-ipv4-private.cc',
524
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   286
    'ascii-trace.cc',
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   287
    'pcap-trace.cc',
622
6bec6931e4f8 fix build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 619
diff changeset
   288
    'i-udp-impl.cc',
524
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   289
])
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   290
inode.add_headers ([
235
190d5bef3254 add ipv4 and udp header, add ipv4 checksum support to make the udp header compile. Need to be fixed in UdpHeader later.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 234
diff changeset
   291
    'ipv4-header.h',
190d5bef3254 add ipv4 and udp header, add ipv4 checksum support to make the udp header compile. Need to be fixed in UdpHeader later.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 234
diff changeset
   292
    'udp-header.h',
190d5bef3254 add ipv4 and udp header, add ipv4 checksum support to make the udp header compile. Need to be fixed in UdpHeader later.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 234
diff changeset
   293
    'ipv4-checksum.h',
242
a44932709b47 add arp stack
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 241
diff changeset
   294
    'arp-header.h',
634
7dbf8f0dc819 fix scons dist and scons all for gcc 4.1
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 622
diff changeset
   295
    'arp-cache.h',
242
a44932709b47 add arp stack
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 241
diff changeset
   296
    'arp.h',
247
fb7375bb43d7 make the sample code compile and link.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 245
diff changeset
   297
    'ipv4-loopback-interface.h',
234
6124bda39cb3 code from all trees.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 232
diff changeset
   298
    'l3-demux.h',
247
fb7375bb43d7 make the sample code compile and link.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 245
diff changeset
   299
    'header-utils.h',
444
1647ca57f19d remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 412
diff changeset
   300
    'arp-ipv4-interface.h',
453
ddbb935800d8 remove DatagramSocket, use Socket base class for UdpSocket subclass.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 448
diff changeset
   301
    'udp-socket.h',
519
b045a3ab4595 define and implement IUdp
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 508
diff changeset
   302
    'udp.h',
521
e540282f8462 remove Node::GetArp
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 519
diff changeset
   303
    'i-arp-private.h',
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 521
diff changeset
   304
    'i-ipv4-impl.h',
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 521
diff changeset
   305
    'i-ipv4-private.h',
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 521
diff changeset
   306
    'ipv4.h',
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 521
diff changeset
   307
    'l3-protocol.h',
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 521
diff changeset
   308
    'ipv4-l4-protocol.h',
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 521
diff changeset
   309
    'ipv4-l4-demux.h',
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 521
diff changeset
   310
    'ipv4-end-point-demux.h',
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 521
diff changeset
   311
    'ipv4-end-point.h',
325
379ad3b7a9fc add some simple packet content dumping.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 309
diff changeset
   312
    'ipv4-header.h',
379ad3b7a9fc add some simple packet content dumping.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 309
diff changeset
   313
    'udp-header.h',
524
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   314
    'ipv4-interface.h',
605
3a62e5c4de75 rename internet-node.h to i-node-impl.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 604
diff changeset
   315
    'sgi-hashmap.h',
3a62e5c4de75 rename internet-node.h to i-node-impl.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 604
diff changeset
   316
    'i-node-impl.h',
622
6bec6931e4f8 fix build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 619
diff changeset
   317
    'i-udp-impl.h',
524
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   318
])
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   319
inode.add_inst_headers ([
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   320
    'internet-node.h',
389
d8f84756cf21 split out AsciiTrace class from simple example
mathieu@mathieu.inria.fr
parents: 381
diff changeset
   321
    'ascii-trace.h',
456
5361882cc2f3 put together a PcapTrace and test it
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 412
diff changeset
   322
    'pcap-trace.h',
524
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   323
])
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   324
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   325
232
8cd08910f9a1 initial node base class from george's repo.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 226
diff changeset
   326
331
d75ee9d8efa4 move p2p to new dir
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 325
diff changeset
   327
p2p = build.Ns3Module ('p2p', 'src/devices/p2p')
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 365
diff changeset
   328
ns3.add (p2p)
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 365
diff changeset
   329
p2p.add_deps (['node'])
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 365
diff changeset
   330
p2p.add_sources ([
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 365
diff changeset
   331
    'p2p-net-device.cc',
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 365
diff changeset
   332
    'p2p-channel.cc',
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 365
diff changeset
   333
    'p2p-topology.cc',
334
8075943fda5a move serial code to src/devices/serial
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 331
diff changeset
   334
    ])
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 365
diff changeset
   335
p2p.add_inst_headers ([
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 365
diff changeset
   336
    'p2p-net-device.h',
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 365
diff changeset
   337
    'p2p-channel.h',
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 365
diff changeset
   338
    'p2p-topology.h',
334
8075943fda5a move serial code to src/devices/serial
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 331
diff changeset
   339
    ])
8075943fda5a move serial code to src/devices/serial
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 331
diff changeset
   340
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   341
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   342
# utils
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   343
run_tests = build.Ns3Module('run-tests', 'utils')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   344
ns3.add(run_tests)
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   345
run_tests.set_executable()
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   346
run_tests.add_deps(['core', 'simulator', 'common'])
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   347
run_tests.add_source('run-tests.cc')
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   348
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   349
bench_packets = build.Ns3Module('bench-packets', 'utils')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   350
#ns3.add(bench_packets)
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   351
bench_packets.set_executable()
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   352
bench_packets.add_dep('core')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   353
bench_packets.add_source('bench-packets.cc')
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   354
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   355
bench_simu = build.Ns3Module('bench-simulator', 'utils')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   356
ns3.add(bench_simu)
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   357
bench_simu.set_executable()
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   358
bench_simu.add_dep('simulator')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   359
bench_simu.add_source('bench-simulator.cc')
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   360
197
8346ab3528bf fix the Simulation event replayer: make it build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 173
diff changeset
   361
replay_simu = build.Ns3Module('replay-simulation', 'utils')
8346ab3528bf fix the Simulation event replayer: make it build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 173
diff changeset
   362
ns3.add(replay_simu)
8346ab3528bf fix the Simulation event replayer: make it build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 173
diff changeset
   363
replay_simu.set_executable()
8346ab3528bf fix the Simulation event replayer: make it build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 173
diff changeset
   364
replay_simu.add_dep('simulator')
8346ab3528bf fix the Simulation event replayer: make it build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 173
diff changeset
   365
replay_simu.add_source('replay-simulation.cc')
8346ab3528bf fix the Simulation event replayer: make it build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 173
diff changeset
   366
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   367
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   368
# samples
268
a43b635230e8 test and debug the debug support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 265
diff changeset
   369
sample_debug = build.Ns3Module('sample-debug', 'samples')
a43b635230e8 test and debug the debug support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 265
diff changeset
   370
sample_debug.set_executable()
a43b635230e8 test and debug the debug support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 265
diff changeset
   371
ns3.add(sample_debug)
a43b635230e8 test and debug the debug support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 265
diff changeset
   372
sample_debug.add_dep('core')
a43b635230e8 test and debug the debug support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 265
diff changeset
   373
sample_debug.add_source('main-debug.cc')
a43b635230e8 test and debug the debug support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 265
diff changeset
   374
sample_debug.add_source('main-debug-other.cc')
a43b635230e8 test and debug the debug support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 265
diff changeset
   375
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   376
sample_callback = build.Ns3Module('sample-callback', 'samples')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   377
sample_callback.set_executable()
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   378
ns3.add(sample_callback)
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   379
sample_callback.add_dep('core')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   380
sample_callback.add_source('main-callback.cc')
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   381
226
1f8c4e56bc86 add smart pointer sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 223
diff changeset
   382
sample_ptr = build.Ns3Module('sample-ptr', 'samples')
1f8c4e56bc86 add smart pointer sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 223
diff changeset
   383
sample_ptr.set_executable()
1f8c4e56bc86 add smart pointer sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 223
diff changeset
   384
ns3.add(sample_ptr)
1f8c4e56bc86 add smart pointer sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 223
diff changeset
   385
sample_ptr.add_dep('core')
1f8c4e56bc86 add smart pointer sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 223
diff changeset
   386
sample_ptr.add_source('main-ptr.cc')
1f8c4e56bc86 add smart pointer sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 223
diff changeset
   387
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   388
sample_trace = build.Ns3Module('sample-trace', 'samples')
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   389
#ns3.add(sample_trace)
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   390
sample_trace.add_dep('common')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   391
sample_trace.set_executable()
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   392
sample_trace.add_source('main-trace.cc')
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   393
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   394
sample_simu = build.Ns3Module('sample-simulator', 'samples')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   395
ns3.add(sample_simu)
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   396
sample_simu.set_executable()
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   397
sample_simu.add_dep('simulator')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   398
sample_simu.add_source('main-simulator.cc')
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   399
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   400
sample_packet = build.Ns3Module('sample-packet', 'samples')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   401
ns3.add(sample_packet)
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   402
sample_packet.set_executable()
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   403
sample_packet.add_dep('common')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   404
sample_packet.add_source('main-packet.cc')
8
cb4ae01ba180 add scons build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   405
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   406
sample_test = build.Ns3Module('sample-test', 'samples')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   407
sample_test.set_executable()
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   408
ns3.add(sample_test)
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   409
sample_test.add_dep('core')
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   410
sample_test.add_source('main-test.cc')
60
6672664e72bb add sample code for test, add doxygen doc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 56
diff changeset
   411
247
fb7375bb43d7 make the sample code compile and link.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 245
diff changeset
   412
sample_simple = build.Ns3Module('sample-simple', 'samples')
fb7375bb43d7 make the sample code compile and link.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 245
diff changeset
   413
sample_simple.set_executable()
fb7375bb43d7 make the sample code compile and link.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 245
diff changeset
   414
ns3.add(sample_simple)
524
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   415
sample_simple.add_deps(['core', 'simulator', 'node', 'internet-node'])
247
fb7375bb43d7 make the sample code compile and link.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 245
diff changeset
   416
sample_simple.add_source('main-simple.cc')
fb7375bb43d7 make the sample code compile and link.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 245
diff changeset
   417
253
b9201368acdb make the p2p example compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 249
diff changeset
   418
sample_sp2p = build.Ns3Module('sample-simple-p2p', 'samples')
b9201368acdb make the p2p example compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 249
diff changeset
   419
sample_sp2p.set_executable()
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 343
diff changeset
   420
#n3.add(sample_sp2p)
524
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 523
diff changeset
   421
sample_sp2p.add_deps(['core', 'simulator', 'node', 'internet-node', 'p2p'])
253
b9201368acdb make the p2p example compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 249
diff changeset
   422
sample_sp2p.add_source('main-simple-p2p.cc')
b9201368acdb make the p2p example compile
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 249
diff changeset
   423
441
d824620eac38 Added default value sample
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 439
diff changeset
   424
sample_default_value = build.Ns3Module('sample-default-value', 'samples')
d824620eac38 Added default value sample
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 439
diff changeset
   425
sample_default_value.set_executable()
d824620eac38 Added default value sample
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 439
diff changeset
   426
ns3.add(sample_default_value)
d824620eac38 Added default value sample
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 439
diff changeset
   427
sample_default_value.add_deps(['core', 'simulator', 'node', 'p2p'])
d824620eac38 Added default value sample
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 439
diff changeset
   428
sample_default_value.add_source('main-default-value.cc')
d824620eac38 Added default value sample
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 439
diff changeset
   429
353
b8656730c209 Move ns-2/simple.cc to examples/simple-serial.cc
Tom Henderson <tomh@tomh.org>
parents: 352
diff changeset
   430
# examples
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 365
diff changeset
   431
example_simple_p2p = build.Ns3Module('simple-p2p', 'examples')
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 365
diff changeset
   432
example_simple_p2p.set_executable()
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 365
diff changeset
   433
ns3.add(example_simple_p2p)
586
6220d0040d50 call Node::AddDevice from NetDevice::NetDevice
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 585
diff changeset
   434
example_simple_p2p.add_deps(['core', 'simulator', 'node', 'p2p', 'internet-node', 'applications'])
368
1df1165d6a68 Rename file names from serial to p2p
Tom Henderson <tomh@tomh.org>
parents: 365
diff changeset
   435
example_simple_p2p.add_source('simple-p2p.cc')
288
76c95195c166 Add samples/ns-2/simple.tcl.cc to SConstruct
Tom Henderson <tomh@tomh.org>
parents: 264
diff changeset
   436
136
4faf1726e8ff make python code more Pep8 conformant (patch from Gustavo Carneiro)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 128
diff changeset
   437
ns3.generate_dependencies()