src/core/wscript
author Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
Sat, 24 Jan 2009 19:25:33 +0000
changeset 4121 4bbe798b0dab
parent 4120 51f223987b89
child 4123 383d47fa7444
permissions -rw-r--r--
Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
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
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
     3
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
     4
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
     5
def configure(conf):
4064
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
     6
    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
     7
        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
     8
        conf.define('HAVE_GETENV', 1)
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
     9
4064
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
    10
    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
    11
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
    12
    # 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
    13
    test_env = conf.env.copy()
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
    14
    test_env.append_value('LINKFLAGS', '-pthread')
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
    15
    test_env.append_value('CXXFLAGS', '-pthread')
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
    16
    test_env.append_value('CCFLAGS', '-pthread')
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
    17
    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
    18
#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
    19
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
    20
{
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
    21
   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
    22
   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
    23
   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
    24
}
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
    """
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
    26
    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
    27
                              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
    28
                              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
    29
                              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
    30
    if have_pthread:
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
        conf.env['CXXFLAGS_PTHREAD'] = '-pthread'
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
        conf.env['CCFLAGS_PTHREAD'] = '-pthread'
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
        conf.env['LINKFLAGS_PTHREAD'] = '-pthread'
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
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
    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
    36
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
    37
    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
    38
                                 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
    39
                                 "<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
    40
3425
c69779f5e51e add system threads and synchronization primitives
Craig Dowell <craigdo@ee.washington.edu>
parents: 3402
diff changeset
    41
    conf.write_config_header('ns3/core-config.h')
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    42
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    43
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
    44
    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
    45
    core.source = [
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    46
        'callback-test.cc',
1498
520bc8457799 log rides along for free
Craig Dowell <craigdo@ee.washington.edu>
parents: 1414
diff changeset
    47
        'log.cc',
1018
99476ef5580a Bug #7: Better breakpoints.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 1000
diff changeset
    48
        'breakpoint.cc',
2633
a0639de8cd8b split code from object.h/object.cc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2609
diff changeset
    49
        'type-id.cc',
a0639de8cd8b split code from object.h/object.cc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2609
diff changeset
    50
        'attribute-list.cc',
2370
5f7ad186b798 introduce ObjectBase
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2254
diff changeset
    51
        'object-base.cc',
2775
03a23eb5f1e8 bug: 147. Add RefCountBase
George F. Riley<riley@ece.gatech.edu>
parents: 2633
diff changeset
    52
        'ref-count-base.cc',
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    53
        'ptr.cc',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    54
        'object.cc',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    55
        'test.cc',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    56
        'random-variable.cc',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    57
        'rng-stream.cc',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    58
        'command-line.cc',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    59
        'type-name.cc',
1678
00452ae23a6f rewrite the TypeTraits and add some tests
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1498
diff changeset
    60
        'type-traits-test.cc',
2438
e2ac9f9aeeb9 value.h -> attribute.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2429
diff changeset
    61
        'attribute.cc',
2452
8efda0e4423a boolean-value -> boolean
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2451
diff changeset
    62
        'boolean.cc',
2454
23ab3212cec4 int-value -> integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2452
diff changeset
    63
        'integer.cc',
2455
8253e8353689 uint-value -> uinteger
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2454
diff changeset
    64
        'uinteger.cc',
2457
87f009efcb3f enum-value -> enum
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2456
diff changeset
    65
        'enum.cc',
2456
8f40bc572412 fp-value -> double
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2455
diff changeset
    66
        'double.cc',
2502
50d0da37f02f introduce the ns3::String class, get rid of the string -> Attribute implicit conversion, and get rid of MakeDataRate, port PointToPointNetDevice to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2482
diff changeset
    67
        'string.cc',
2926
96d1fc816681 Pointer class for primitive type pointer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2776
diff changeset
    68
        'pointer.cc',
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2926
diff changeset
    69
        'object-vector.cc',
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2926
diff changeset
    70
        'attribute-test.cc',
2395
ffd1c96afe4b a pretty simple wrapper around TypeId+Parameters: ObjectFactory
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2389
diff changeset
    71
        'object-factory.cc',
2467
da5d68ddf6c5 InitialValue -> GlobalValue
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2463
diff changeset
    72
        'global-value.cc',
2482
adbc284a5849 EventTraceSource -> TracedCallback, ValueTraceSource -> TracedValue.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2477
diff changeset
    73
        'traced-callback.cc',
2463
c77e43117673 actually allow connection and disconnection to trace sources registered in TypeIds
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2462
diff changeset
    74
        'trace-source-accessor.cc',
2474
1d1f77782138 A Config class which hooks into the Object Attribute/Tracing system.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2468
diff changeset
    75
        'config.cc',
3763
e46e361a4262 give attribute power to Callback.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3648
diff changeset
    76
        'callback.cc',
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    77
        ]
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    78
4064
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
    79
    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
    80
    headers.module = 'core'
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    81
    headers.source = [
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    82
        'system-wall-clock-ms.h',
760
975a88259e2e Re-sync WAF build with the latest SConstruct changes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 688
diff changeset
    83
        'empty.h',
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    84
        'callback.h',
2370
5f7ad186b798 introduce ObjectBase
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2254
diff changeset
    85
        'object-base.h',
2776
1b2520396ba9 export header.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2775
diff changeset
    86
        'ref-count-base.h',
2633
a0639de8cd8b split code from object.h/object.cc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2609
diff changeset
    87
        'type-id.h',
a0639de8cd8b split code from object.h/object.cc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2609
diff changeset
    88
        'attribute-list.h',
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    89
        'ptr.h',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    90
        'object.h',
1498
520bc8457799 log rides along for free
Craig Dowell <craigdo@ee.washington.edu>
parents: 1414
diff changeset
    91
        'log.h',
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    92
        'assert.h',
1018
99476ef5580a Bug #7: Better breakpoints.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 1000
diff changeset
    93
        'breakpoint.h',
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    94
        'fatal-error.h',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    95
        'test.h',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    96
        'random-variable.h',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    97
        'rng-stream.h',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    98
        'command-line.h',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    99
        'type-name.h',
960
f75042c35fc6 RandomVariableDefaultValue
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 953
diff changeset
   100
        'type-traits.h',
1680
151684970a80 implement the helper IntToType template
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1678
diff changeset
   101
        'int-to-type.h',
2438
e2ac9f9aeeb9 value.h -> attribute.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2429
diff changeset
   102
        'attribute.h',
2449
30127bc12056 param-spec-helper.h -> attribute-accessor-helper.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2448
diff changeset
   103
        'attribute-accessor-helper.h',
2452
8efda0e4423a boolean-value -> boolean
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2451
diff changeset
   104
        'boolean.h',
2454
23ab3212cec4 int-value -> integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2452
diff changeset
   105
        'integer.h',
2455
8253e8353689 uint-value -> uinteger
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2454
diff changeset
   106
        'uinteger.h',
2456
8f40bc572412 fp-value -> double
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2455
diff changeset
   107
        'double.h',
2457
87f009efcb3f enum-value -> enum
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2456
diff changeset
   108
        'enum.h',
2502
50d0da37f02f introduce the ns3::String class, get rid of the string -> Attribute implicit conversion, and get rid of MakeDataRate, port PointToPointNetDevice to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2482
diff changeset
   109
        'string.h',
2926
96d1fc816681 Pointer class for primitive type pointer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2776
diff changeset
   110
        'pointer.h',
2395
ffd1c96afe4b a pretty simple wrapper around TypeId+Parameters: ObjectFactory
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2389
diff changeset
   111
        'object-factory.h',
2451
8979f07befd5 value-helper.h -> attribute-helper.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2450
diff changeset
   112
        'attribute-helper.h',
2467
da5d68ddf6c5 InitialValue -> GlobalValue
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2463
diff changeset
   113
        'global-value.h',
2482
adbc284a5849 EventTraceSource -> TracedCallback, ValueTraceSource -> TracedValue.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2477
diff changeset
   114
        'traced-callback.h',
adbc284a5849 EventTraceSource -> TracedCallback, ValueTraceSource -> TracedValue.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2477
diff changeset
   115
        'traced-value.h',
2463
c77e43117673 actually allow connection and disconnection to trace sources registered in TypeIds
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2462
diff changeset
   116
        'trace-source-accessor.h',
2474
1d1f77782138 A Config class which hooks into the Object Attribute/Tracing system.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2468
diff changeset
   117
        'config.h',
2477
64ab84674302 export public header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2474
diff changeset
   118
        'object-vector.h',
3781
0eea20a7b592 bug 339: unconditional assert API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3763
diff changeset
   119
        'deprecated.h',
0eea20a7b592 bug 339: unconditional assert API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3763
diff changeset
   120
        'abort.h',
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   121
        ]
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   122
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
   123
    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
   124
        core.source.extend([
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
   125
            'win32-system-wall-clock-ms.cc',
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
   126
            ])
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
   127
    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
   128
        core.source.extend([
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
   129
            'unix-system-wall-clock-ms.cc',
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
   130
            ])
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
   131
4064
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
   132
    if bld.env['ENABLE_THREADING']:
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
   133
        core.source.extend([
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
   134
            'unix-system-thread.cc',
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
   135
            'unix-system-mutex.cc',
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
   136
            'unix-system-condition.cc',
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
   137
            ])
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
   138
        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
   139
        headers.source.extend([
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
   140
                'system-mutex.h',
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
   141
                'system-thread.h',
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
   142
                'system-condition.h',
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
   143
                ])
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
   144