src/core/wscript
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Thu, 17 Mar 2011 10:03:56 +0100
changeset 6910 2687116d5ec1
parent 6893 5dccd86f90cf
child 6912 f8316d1aa8dc
permissions -rw-r--r--
typos in email addresses
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
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
     6
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
     7
def set_options(opt):
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
     8
    opt.add_option('--high-precision-as-double',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
     9
                   help=('Whether to use a double floating point'
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    10
                         ' type for high precision time values'
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    11
                         ' 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
    12
                         '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
    13
                   action="store_true", default=False,
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    14
                   dest='high_precision_as_double')
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):
4064
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
    18
    if conf.check(header_name='stdlib.h'):
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
    19
        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
    20
        conf.define('HAVE_GETENV', 1)
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    21
4064
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
    22
    conf.check(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
    23
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
    24
    # 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
    25
    test_env = conf.env.copy()
4300
b25665f81754 don't use pthread option under cygwin
Craig Dowell <craigdo@ee.washington.edu>
parents: 4150
diff changeset
    26
    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
    27
        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
    28
        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
    29
        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
    30
    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
    31
#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
    32
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
    33
{
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
    34
   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
    35
   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
    36
   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
    37
}
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
    38
"""
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
    39
    have_pthread = conf.check(header_name='pthread.h', define_name='HAVE_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
    40
                              env=test_env, fragment=fragment,
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
    41
                              errmsg='Could not find pthread support (build/config.log for details)',
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
    42
                              mandatory=False)
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
    43
    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
    44
        # 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
    45
        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
    46
            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
    47
            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
    48
            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
    49
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
    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
    51
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
    52
    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
    53
                                 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
    54
                                 "<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
    55
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    56
    a = conf.check(type_name='uint128_t', define_name='HAVE_UINT128_T')
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    57
    b = conf.check(type_name='__uint128_t', define_name='HAVE___UINT128_T')
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    58
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    59
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    60
    if Options.options.high_precision_as_double:
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    61
        conf.define('USE_HIGH_PRECISION_DOUBLE', 1)
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    62
        conf.env['USE_HIGH_PRECISION_DOUBLE'] = 1
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    63
        highprec = 'long double'
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    64
    elif a or b:
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    65
        conf.define('USE_HIGH_PRECISION_128', 1)
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    66
        conf.env['USE_HIGH_PRECISION_128'] = 1
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    67
        highprec = '128-bit integer'
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    68
    else:
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    69
        conf.define('USE_HIGH_PRECISION_CAIRO', 1)
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    70
        conf.env['USE_HIGH_PRECISION_CAIRO'] = 1
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    71
        highprec = 'cairo 128-bit integer'
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    72
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    73
    conf.check_message_custom('high precision time', 'implementation', highprec)
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    74
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    75
    conf.check(header_name='stdint.h', define_name='HAVE_STDINT_H')
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    76
    conf.check(header_name='inttypes.h', define_name='HAVE_INTTYPES_H')
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    77
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    78
    conf.check(header_name='sys/inttypes.h', define_name='HAVE_SYS_INT_TYPES_H')
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    79
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    80
    if not conf.check(lib='rt', uselib='RT', define_name='HAVE_RT'):
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    81
        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
    82
                                     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
    83
    else:
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    84
        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
    85
                                     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
    86
                                     "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
    87
        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
    88
4531
14a102415139 Run unit tests as indenpendent WAF tasks
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4368
diff changeset
    89
    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
    90
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    91
def build(bld):
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
    92
    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
    93
    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
    94
        'model/high-precision.cc',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
    95
        'model/time-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
    96
        '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
    97
        '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
    98
        '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
    99
        '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
   100
        '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
   101
        '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
   102
        '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
   103
        '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
   104
        '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
   105
        '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
   106
        '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
   107
        '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
   108
        '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
   109
        '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
   110
        '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
   111
        '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
   112
        '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
   113
        '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
   114
        'model/type-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
   115
        'model/attribute-list.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/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
   117
        '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
   118
        '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
   119
        '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
   120
        '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
   121
        '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
   122
        '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
   123
        '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
   124
        '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
   125
        '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
   126
        '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
   127
        '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
   128
        '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
   129
        'model/double.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/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
   131
        'model/pointer.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/object-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
   133
        '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
   134
        '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
   135
        '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
   136
        '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
   137
        '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
   138
        '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
   139
        '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
   140
        'model/fatal-impl.cc',
6910
2687116d5ec1 typos in email addresses
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6893
diff changeset
   141
        'model/page-scheduler.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
   142
        '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
   143
        'test/callback-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
   144
        'test/names-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
   145
        'test/type-traits-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
   146
        'test/traced-callback-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
   147
        'test/ptr-test-suite.cc',
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   148
        ]
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   149
4064
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
   150
    headers = bld.new_task_gen('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
   151
    headers.module = 'core'
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   152
    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
   153
        'model/high-precision.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   154
        'model/time-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
   155
        '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
   156
        '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
   157
        '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
   158
        '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
   159
        '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
   160
        '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
   161
        '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
   162
        '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
   163
        '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
   164
        '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
   165
        '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
   166
        '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
   167
        'model/simulation-singleton.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   168
        '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
   169
        '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
   170
        '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
   171
        '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
   172
        '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
   173
        '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
   174
        '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
   175
        '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
   176
        '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
   177
        '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
   178
        '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
   179
        'model/type-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
   180
        'model/attribute-list.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/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
   182
        '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
   183
        '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
   184
        '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
   185
        '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
   186
        '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
   187
        '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
   188
        '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
   189
        '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
   190
        '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
   191
        '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
   192
        '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
   193
        '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
   194
        '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
   195
        '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
   196
        'model/boolean.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/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
   198
        '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
   199
        '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
   200
        '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
   201
        '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
   202
        '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
   203
        '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
   204
        '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
   205
        '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
   206
        '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
   207
        '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
   208
        '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
   209
        'model/config.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/object-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
   211
        '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
   212
        '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
   213
        '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
   214
        '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
   215
        '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
   216
        'model/fatal-impl.h',
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   217
        ]
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   218
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
   219
    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
   220
        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
   221
            '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
   222
            ])
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
   223
    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
   224
        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
   225
            '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
   226
            ])
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   227
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   228
    env = bld.env_of_name('default')
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   229
    if env['USE_HIGH_PRECISION_DOUBLE']:
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   230
        headers.source.extend(['model/high-precision-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
   231
    elif env['USE_HIGH_PRECISION_128']:
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   232
        headers.source.extend(['model/high-precision-128.h'])
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   233
        core.source.extend(['model/high-precision-128.cc'])
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   234
    elif env['USE_HIGH_PRECISION_CAIRO']:
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   235
        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
   236
            'model/high-precision-cairo.cc',
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/cairo-wideint.c',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   238
            ])
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   239
        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
   240
            'model/high-precision-cairo.h',
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   241
            '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
   242
            ])
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
   243
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   244
    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
   245
        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
   246
                '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
   247
                '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
   248
                ])
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
   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/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
   251
                '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
   252
                ])
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   253
        core.uselib = 'RT'
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   254
    else:
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   255
        core.uselib = ''
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   256
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   257
    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
   258
        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
   259
            '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
   260
            '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
   261
            '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
   262
            '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
   263
            ])
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   264
        core.uselib = core.uselib + ' 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
   265
        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
   266
                '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
   267
                '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
   268
                '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
   269
                '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
   270
                ])
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
   271
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   272
    if env['ENABLE_GSL']:
6654
3d28e8910703 fix modularity issue with core module
Tom Henderson <tomh@tomh.org>
parents: 6370
diff changeset
   273
        core.uselib = core.uselib + ' GSL GSLCBLAS M'
6821
203367ae7433 merge src/simulator into src/core; move src/core to new module layout
Tom Henderson <tomh@tomh.org>
parents: 6777
diff changeset
   274
        core.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
   275
6893
5dccd86f90cf Modular Python bindings work (many bug fixes, more modules tested)
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 6875
diff changeset
   276
    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
   277
    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
   278
        pymod.source += ['bindings/module_helpers.cc']