src/core/wscript
author Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
Thu, 22 Sep 2011 13:03:25 +0100
changeset 7525 9a36f1d5d229
parent 7515 c741ddb5f311
child 7590 5f250a7a6f1f
child 8253 6faee3d1d1d0
permissions -rw-r--r--
Fix modules wscript usage of 'use' parameter
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
     1
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
     2
import sys
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
     3
4124
d2ec423e4576 Don't use the flag -pthread on darwin to avoid warning message
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4123
diff changeset
     4
import Options
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
     5
7488
72d0c878f3c7 More waf 1.6.7 build fixes
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7487
diff changeset
     6
def options(opt):
7041
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
     7
    opt.add_option('--int64x64-as-double',
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
     8
                   help=('Whether to use a double floating point'
7041
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
     9
                         ' type for int64x64 values'
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    10
                         ' WARNING: this option only has effect '
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    11
                         'with the configure command.'),
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    12
                   action="store_true", default=False,
7041
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    13
                   dest='int64x64_as_double')
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    14
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    15
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    16
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    17
def configure(conf):
7487
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
    18
    a = conf.check_nonfatal(type_name='uint128_t', define_name='HAVE_UINT128_T')
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
    19
    b = conf.check_nonfatal(type_name='__uint128_t', define_name='HAVE___UINT128_T')
7041
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    20
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    21
    if Options.options.int64x64_as_double:
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    22
        conf.define('INT64X64_USE_DOUBLE', 1)
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    23
        conf.env['INT64X64_USE_DOUBLE'] = 1
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    24
        highprec = 'long double'
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    25
    elif a or b:
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    26
        conf.define('INT64X64_USE_128', 1)
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    27
        conf.env['INT64X64_USE_128'] = 1
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    28
        highprec = '128-bit integer'
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    29
    else:
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    30
        conf.define('INT64X64_USE_CAIRO', 1)
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    31
        conf.env['INT64X64_USE_CAIRO'] = 1
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    32
        highprec = 'cairo 128-bit integer'
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    33
7487
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
    34
    conf.msg('Checking high precision time implementation', highprec)
7041
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    35
7487
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
    36
    conf.check_nonfatal(header_name='stdint.h', define_name='HAVE_STDINT_H')
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
    37
    conf.check_nonfatal(header_name='inttypes.h', define_name='HAVE_INTTYPES_H')
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
    38
    conf.check_nonfatal(header_name='sys/inttypes.h', define_name='HAVE_SYS_INT_TYPES_H')
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
    39
    conf.check_nonfatal(header_name='sys/types.h', define_name='HAVE_SYS_TYPES_H')
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
    40
    conf.check_nonfatal(header_name='sys/stat.h', define_name='HAVE_SYS_STAT_H')
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
    41
    conf.check_nonfatal(header_name='dirent.h', define_name='HAVE_DIRENT_H')
7041
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    42
7487
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
    43
    if conf.check_nonfatal(header_name='stdlib.h'):
4064
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
    44
        conf.define('HAVE_STDLIB_H', 1)
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
    45
        conf.define('HAVE_GETENV', 1)
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    46
7487
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
    47
    conf.check_nonfatal(header_name='signal.h', define_name='HAVE_SIGNAL_H')
1018
99476ef5580a Bug #7: Better breakpoints.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 1000
diff changeset
    48
4121
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    49
    # Check for POSIX threads
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    50
    test_env = conf.env.copy()
4300
b25665f81754 don't use pthread option under cygwin
Craig Dowell <craigdo@ee.washington.edu>
parents: 4150
diff changeset
    51
    if Options.platform != 'darwin' and Options.platform != 'cygwin':
4124
d2ec423e4576 Don't use the flag -pthread on darwin to avoid warning message
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4123
diff changeset
    52
        test_env.append_value('LINKFLAGS', '-pthread')
d2ec423e4576 Don't use the flag -pthread on darwin to avoid warning message
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4123
diff changeset
    53
        test_env.append_value('CXXFLAGS', '-pthread')
d2ec423e4576 Don't use the flag -pthread on darwin to avoid warning message
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4123
diff changeset
    54
        test_env.append_value('CCFLAGS', '-pthread')
4123
383d47fa7444 Fix 'no newline at the end of file' compilation error in the pthread test
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4121
diff changeset
    55
    fragment = r"""
4121
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    56
#include <pthread.h>
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    57
int main ()
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    58
{
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    59
   pthread_mutex_t m;
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    60
   pthread_mutex_init (&m, NULL);
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    61
   return 0;
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    62
}
4123
383d47fa7444 Fix 'no newline at the end of file' compilation error in the pthread test
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4121
diff changeset
    63
"""
7487
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
    64
    have_pthread = conf.check_nonfatal(header_name='pthread.h', define_name='HAVE_PTHREAD_H',
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
    65
                                       env=test_env, fragment=fragment,
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
    66
                                       errmsg='Could not find pthread support (build/config.log for details)')
4121
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    67
    if have_pthread:
4124
d2ec423e4576 Don't use the flag -pthread on darwin to avoid warning message
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4123
diff changeset
    68
        # darwin accepts -pthread but prints a warning saying it is ignored
4300
b25665f81754 don't use pthread option under cygwin
Craig Dowell <craigdo@ee.washington.edu>
parents: 4150
diff changeset
    69
        if Options.platform != 'darwin' and Options.platform != 'cygwin':
4124
d2ec423e4576 Don't use the flag -pthread on darwin to avoid warning message
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4123
diff changeset
    70
            conf.env['CXXFLAGS_PTHREAD'] = '-pthread'
d2ec423e4576 Don't use the flag -pthread on darwin to avoid warning message
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4123
diff changeset
    71
            conf.env['CCFLAGS_PTHREAD'] = '-pthread'
d2ec423e4576 Don't use the flag -pthread on darwin to avoid warning message
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4123
diff changeset
    72
            conf.env['LINKFLAGS_PTHREAD'] = '-pthread'
4121
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    73
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    74
    conf.env['ENABLE_THREADING'] = have_pthread
4064
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
    75
3648
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
    76
    conf.report_optional_feature("Threading", "Threading Primitives",
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
    77
                                 conf.env['ENABLE_THREADING'],
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
    78
                                 "<pthread.h> include not detected")
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
    79
7487
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
    80
    conf.check_nonfatal(header_name='stdint.h', define_name='HAVE_STDINT_H')
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
    81
    conf.check_nonfatal(header_name='inttypes.h', define_name='HAVE_INTTYPES_H')
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    82
7487
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
    83
    conf.check_nonfatal(header_name='sys/inttypes.h', define_name='HAVE_SYS_INT_TYPES_H')
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    84
7525
9a36f1d5d229 Fix modules wscript usage of 'use' parameter
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7515
diff changeset
    85
    if not conf.check_nonfatal(lib='rt', uselib_store='RT', define_name='HAVE_RT'):
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    86
        conf.report_optional_feature("RealTime", "Real Time Simulator",
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    87
                                     False, "librt is not available")
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    88
    else:
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    89
        conf.report_optional_feature("RealTime", "Real Time Simulator",
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    90
                                     conf.env['ENABLE_THREADING'],
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    91
                                     "threading not enabled")
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    92
        conf.env["ENABLE_REAL_TIME"] = conf.env['ENABLE_THREADING']
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    93
4531
14a102415139 Run unit tests as indenpendent WAF tasks
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4368
diff changeset
    94
    conf.write_config_header('ns3/core-config.h', top=True)
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    95
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    96
def build(bld):
7069
c57d5cc90ab2 forgot ns3 postfix
Mathieu Lacage <mathieu.lacage@inria.fr>
parents: 7068
diff changeset
    97
    bld.install_files('${PREFIX}/include/ns3', '../../ns3/core-config.h')
7068
102581d94dd9 install core-config.h
Mathieu Lacage <mathieu.lacage@inria.fr>
parents: 7057
diff changeset
    98
1217
2f7791ae388d WAF: add new bld.create_ns3_module() and bld.create_ns3_program() methods to make declaration of modules and programs simpler, and allowing us to change how ns-3 is built in a centralized way, without needing to change every module wscript file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 1018
diff changeset
    99
    core = bld.create_ns3_module('core')
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   100
    core.source = [
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   101
        'model/time.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   102
        'model/event-id.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   103
        'model/scheduler.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   104
        'model/list-scheduler.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   105
        'model/map-scheduler.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   106
        'model/heap-scheduler.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   107
        'model/calendar-scheduler.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   108
        'model/ns2-calendar-scheduler.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   109
        'model/event-impl.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   110
        'model/simulator.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   111
        'model/simulator-impl.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   112
        'model/default-simulator-impl.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   113
        'model/timer.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   114
        'model/watchdog.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   115
        'model/synchronizer.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   116
        'model/make-event.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   117
        'model/log.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   118
        'model/breakpoint.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   119
        'model/type-id.cc',
7399
520706f801e8 introduce Config::Reset
Mathieu Lacage <mathieu.lacage@gmail.com>
parents: 7379
diff changeset
   120
        'model/attribute-construction-list.cc',
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   121
        'model/object-base.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   122
        'model/ref-count-base.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   123
        'model/object.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   124
        'model/test.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   125
        'model/random-variable.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   126
        'model/rng-stream.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   127
        'model/command-line.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   128
        'model/type-name.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   129
        'model/attribute.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   130
        'model/boolean.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   131
        'model/integer.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   132
        'model/uinteger.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   133
        'model/enum.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   134
        'model/double.cc',
7045
d13fa06886ce merge with HEAD
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 7041 7003
diff changeset
   135
        'model/int64x64.cc',
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   136
        'model/string.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   137
        'model/pointer.cc',
7412
d79278c6e51c refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents: 7399
diff changeset
   138
        'model/object-ptr-container.cc',
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   139
        'model/object-factory.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   140
        'model/global-value.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   141
        'model/trace-source-accessor.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   142
        'model/config.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   143
        'model/callback.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   144
        'model/names.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   145
        'model/vector.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   146
        'model/fatal-impl.cc',
7379
ff0d074f885a add support for --update-data to test.py, move test runner code to library for modular build, add support for hierarchical tests beyond the previous two-level hierarchy.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents: 7155
diff changeset
   147
        'model/system-path.cc',
6913
54679ab32585 Create separate module and test-module libraries
Mitch Watrous <watrous@u.washington.edu>
parents: 6912
diff changeset
   148
        ]
54679ab32585 Create separate module and test-module libraries
Mitch Watrous <watrous@u.washington.edu>
parents: 6912
diff changeset
   149
54679ab32585 Create separate module and test-module libraries
Mitch Watrous <watrous@u.washington.edu>
parents: 6912
diff changeset
   150
    core_test = bld.create_ns3_module_test_library('core')
54679ab32585 Create separate module and test-module libraries
Mitch Watrous <watrous@u.washington.edu>
parents: 6912
diff changeset
   151
    core_test.source = [
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   152
        'test/attribute-test-suite.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   153
        'test/callback-test-suite.cc',
7003
a0b1500cdaad Move tests from core module to its test library and update CHANGES.html
Mitch Watrous <watrous@u.washington.edu>
parents: 6999
diff changeset
   154
        'test/command-line-test-suite.cc',
a0b1500cdaad Move tests from core module to its test library and update CHANGES.html
Mitch Watrous <watrous@u.washington.edu>
parents: 6999
diff changeset
   155
        'test/config-test-suite.cc',
a0b1500cdaad Move tests from core module to its test library and update CHANGES.html
Mitch Watrous <watrous@u.washington.edu>
parents: 6999
diff changeset
   156
        'test/global-value-test-suite.cc',
7046
56c75e39d8a3 fix small bugs
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 7045
diff changeset
   157
        'test/int64x64-test-suite.cc',
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   158
        'test/names-test-suite.cc',
7003
a0b1500cdaad Move tests from core module to its test library and update CHANGES.html
Mitch Watrous <watrous@u.washington.edu>
parents: 6999
diff changeset
   159
        'test/object-test-suite.cc',
6952
91a77c7f3bb2 Move tests from some modules to their test libraries
Mitch Watrous <watrous@u.washington.edu>
parents: 6913
diff changeset
   160
        'test/ptr-test-suite.cc',
7003
a0b1500cdaad Move tests from core module to its test library and update CHANGES.html
Mitch Watrous <watrous@u.washington.edu>
parents: 6999
diff changeset
   161
        'test/random-variable-test-suite.cc',
7155
e3e4192e2f67 Add manual chapter for adding new modules
Mitch Watrous <watrous@u.washington.edu>
parents: 7069
diff changeset
   162
        'test/sample-test-suite.cc',
6999
dd78264fda2d Move tests from core module to its test library and update CHANGES.html
Mitch Watrous <watrous@u.washington.edu>
parents: 6952
diff changeset
   163
        'test/simulator-test-suite.cc',
6952
91a77c7f3bb2 Move tests from some modules to their test libraries
Mitch Watrous <watrous@u.washington.edu>
parents: 6913
diff changeset
   164
        'test/time-test-suite.cc',
91a77c7f3bb2 Move tests from some modules to their test libraries
Mitch Watrous <watrous@u.washington.edu>
parents: 6913
diff changeset
   165
        'test/timer-test-suite.cc',
91a77c7f3bb2 Move tests from some modules to their test libraries
Mitch Watrous <watrous@u.washington.edu>
parents: 6913
diff changeset
   166
        'test/traced-callback-test-suite.cc',
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   167
        'test/type-traits-test-suite.cc',
6952
91a77c7f3bb2 Move tests from some modules to their test libraries
Mitch Watrous <watrous@u.washington.edu>
parents: 6913
diff changeset
   168
        'test/watchdog-test-suite.cc',
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   169
        ]
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   170
7487
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
   171
    headers = bld.new_task_gen(features=['ns3header'])
2609
931d59bb1303 Add a 'module' attribute to the ns3header object specifying which module each set of headers belongs to.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 2577
diff changeset
   172
    headers.module = 'core'
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   173
    headers.source = [
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   174
        'model/nstime.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   175
        'model/event-id.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   176
        'model/event-impl.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   177
        'model/simulator.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   178
        'model/simulator-impl.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   179
        'model/default-simulator-impl.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   180
        'model/scheduler.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   181
        'model/list-scheduler.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   182
        'model/map-scheduler.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   183
        'model/heap-scheduler.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   184
        'model/calendar-scheduler.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   185
        'model/ns2-calendar-scheduler.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   186
        'model/simulation-singleton.h',
7003
a0b1500cdaad Move tests from core module to its test library and update CHANGES.html
Mitch Watrous <watrous@u.washington.edu>
parents: 6999
diff changeset
   187
        'model/singleton.h',
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   188
        'model/timer.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   189
        'model/timer-impl.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   190
        'model/watchdog.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   191
        'model/synchronizer.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   192
        'model/make-event.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   193
        'model/system-wall-clock-ms.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   194
        'model/empty.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   195
        'model/callback.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   196
        'model/object-base.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   197
        'model/ref-count-base.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   198
        'model/simple-ref-count.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   199
        'model/type-id.h',
7399
520706f801e8 introduce Config::Reset
Mathieu Lacage <mathieu.lacage@gmail.com>
parents: 7379
diff changeset
   200
        'model/attribute-construction-list.h',
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   201
        'model/ptr.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   202
        'model/object.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   203
        'model/log.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   204
        'model/assert.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   205
        'model/breakpoint.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   206
        'model/fatal-error.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   207
        'model/test.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   208
        'model/random-variable.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   209
        'model/rng-stream.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   210
        'model/command-line.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   211
        'model/type-name.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   212
        'model/type-traits.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   213
        'model/int-to-type.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   214
        'model/attribute.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   215
        'model/attribute-accessor-helper.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   216
        'model/boolean.h',
7045
d13fa06886ce merge with HEAD
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 7041 7003
diff changeset
   217
        'model/int64x64.h',
7048
a6d78cb50f6e early work to make python bindings work again with ns-3-time
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 7046
diff changeset
   218
        'model/int64x64-double.h',
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   219
        'model/integer.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   220
        'model/uinteger.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   221
        'model/double.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   222
        'model/enum.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   223
        'model/string.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   224
        'model/pointer.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   225
        'model/object-factory.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   226
        'model/attribute-helper.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   227
        'model/global-value.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   228
        'model/traced-callback.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   229
        'model/traced-value.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   230
        'model/trace-source-accessor.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   231
        'model/config.h',
7412
d79278c6e51c refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents: 7399
diff changeset
   232
        'model/object-ptr-container.h',
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   233
        'model/object-vector.h',
7412
d79278c6e51c refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents: 7399
diff changeset
   234
        'model/object-map.h',
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   235
        'model/deprecated.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   236
        'model/abort.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   237
        'model/names.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   238
        'model/vector.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   239
        'model/default-deleter.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   240
        'model/fatal-impl.h',
7515
c741ddb5f311 Export system-path include.
frederic.urbani@inria.fr
parents: 7488
diff changeset
   241
        'model/system-path.h'
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   242
        ]
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   243
3648
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   244
    if sys.platform == 'win32':
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   245
        core.source.extend([
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   246
            'model/win32-system-wall-clock-ms.cc',
3648
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   247
            ])
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   248
    else:
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   249
        core.source.extend([
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   250
            'model/unix-system-wall-clock-ms.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   251
            ])
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   252
3648
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   253
7487
82cd20da9650 Upgrade to waf-1.6.7, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7412
diff changeset
   254
    env = bld.env
7041
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   255
    if env['INT64X64_USE_DOUBLE']:
7045
d13fa06886ce merge with HEAD
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 7041 7003
diff changeset
   256
        headers.source.extend(['model/int64x64-double.h'])
7041
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   257
    elif env['INT64X64_USE_128']:
7045
d13fa06886ce merge with HEAD
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 7041 7003
diff changeset
   258
        headers.source.extend(['model/int64x64-128.h'])
d13fa06886ce merge with HEAD
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 7041 7003
diff changeset
   259
        core.source.extend(['model/int64x64-128.cc'])
7041
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   260
    elif env['INT64X64_USE_CAIRO']:
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   261
        core.source.extend([
7045
d13fa06886ce merge with HEAD
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 7041 7003
diff changeset
   262
            'model/int64x64-cairo.cc',
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   263
            ])
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   264
        headers.source.extend([
7045
d13fa06886ce merge with HEAD
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 7041 7003
diff changeset
   265
            'model/int64x64-cairo.h',
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   266
            'model/cairo-wideint-private.h',
3648
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   267
            ])
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   268
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   269
    if env['ENABLE_REAL_TIME']:
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   270
        headers.source.extend([
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   271
                'model/realtime-simulator-impl.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   272
                'model/wall-clock-synchronizer.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   273
                ])
3648
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   274
        core.source.extend([
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   275
                'model/realtime-simulator-impl.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   276
                'model/wall-clock-synchronizer.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   277
                ])
7525
9a36f1d5d229 Fix modules wscript usage of 'use' parameter
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7515
diff changeset
   278
        core.use.append('RT')
9a36f1d5d229 Fix modules wscript usage of 'use' parameter
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7515
diff changeset
   279
        core_test.use.append('RT')
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   280
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   281
    if env['ENABLE_THREADING']:
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   282
        core.source.extend([
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   283
            'model/unix-fd-reader.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   284
            'model/unix-system-thread.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   285
            'model/unix-system-mutex.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   286
            'model/unix-system-condition.cc',
3648
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   287
            ])
7525
9a36f1d5d229 Fix modules wscript usage of 'use' parameter
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7515
diff changeset
   288
        core.use.append('PTHREAD')
9a36f1d5d229 Fix modules wscript usage of 'use' parameter
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7515
diff changeset
   289
        core_test.use.append('PTHREAD')
3648
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   290
        headers.source.extend([
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   291
                'model/unix-fd-reader.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   292
                'model/system-mutex.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   293
                'model/system-thread.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   294
                'model/system-condition.h',
3648
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   295
                ])
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   296
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   297
    if env['ENABLE_GSL']:
7525
9a36f1d5d229 Fix modules wscript usage of 'use' parameter
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7515
diff changeset
   298
        core.use.extend(['GSL', 'GSLCBLAS', 'M'])
9a36f1d5d229 Fix modules wscript usage of 'use' parameter
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 7515
diff changeset
   299
        core_test.use.extend(['GSL', 'GSLCBLAS', 'M'])
6913
54679ab32585 Create separate module and test-module libraries
Mitch Watrous <watrous@u.washington.edu>
parents: 6912
diff changeset
   300
        core_test.source.extend(['test/rng-test-suite.cc'])
6874
c7537e62f2fa Start of work on modular Python bindings, unstable
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 6370
diff changeset
   301
7028
3963d3678649 Make examples that were in samples directory run
Mitch Watrous <watrous@u.washington.edu>
parents: 7003
diff changeset
   302
    if (bld.env['ENABLE_EXAMPLES']):
3963d3678649 Make examples that were in samples directory run
Mitch Watrous <watrous@u.washington.edu>
parents: 7003
diff changeset
   303
        bld.add_subdirs('examples')
3963d3678649 Make examples that were in samples directory run
Mitch Watrous <watrous@u.washington.edu>
parents: 7003
diff changeset
   304
6893
5dccd86f90cf Modular Python bindings work (many bug fixes, more modules tested)
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 6875
diff changeset
   305
    pymod = bld.ns3_python_bindings()
5dccd86f90cf Modular Python bindings work (many bug fixes, more modules tested)
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 6875
diff changeset
   306
    if pymod is not None:
5dccd86f90cf Modular Python bindings work (many bug fixes, more modules tested)
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 6875
diff changeset
   307
        pymod.source += ['bindings/module_helpers.cc']