wscript
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Tue, 19 Apr 2011 14:49:49 +0200
changeset 64 015a353a487b
parent 63 e89dca438df6
child 65 227f6347e4e1
permissions -rw-r--r--
initial build of module
mathieu@0
     1
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
mathieu@0
     2
mathieu@0
     3
import os
mathieu@63
     4
import Options
mathieu@63
     5
import os.path
mathieu@64
     6
import ns3waf
mathieu@63
     7
mathieu@64
     8
def options(opt):
mathieu@63
     9
    opt.tool_options('compiler_cc') 
mathieu@64
    10
    ns3waf.options(opt)
mathieu@0
    11
mathieu@0
    12
def configure(conf):
mathieu@64
    13
    ns3waf.check_modules(conf, ['core', 'network', 'internet'], mandatory = True)
mathieu@63
    14
mathieu@63
    15
    conf.check_tool('compiler_cc')
mathieu@64
    16
mathieu@63
    17
    conf.env.append_value('LINKFLAGS', '-pthread')
mathieu@63
    18
    conf.env['HAVE_DL'] = conf.check (lib='dl')
mathieu@63
    19
mathieu@64
    20
    vg_h = conf.check(header_name='valgrind/valgrind.h', mandatory=False)
mathieu@64
    21
    vg_memcheck_h = conf.check(header_name='valgrind/memcheck.h', mandatory=False)
mathieu@63
    22
    if vg_h and vg_memcheck_h:
mathieu@63
    23
        conf.env.append_value('CXXDEFINES', 'HAVE_VALGRIND_H')
mathieu@63
    24
mathieu@0
    25
def build(bld):
mathieu@64
    26
    module_source = [
mathieu@63
    27
        'model/dce-manager.cc',
mathieu@63
    28
	'model/dce-application.cc',
mathieu@63
    29
        'model/dce.cc',
mathieu@63
    30
        'model/dce-signal.cc',
mathieu@63
    31
        'model/libc-dce.c',
mathieu@63
    32
        'model/utils.cc',
mathieu@63
    33
        'model/unix-fd.cc',
mathieu@63
    34
        'model/unix-file-fd.cc',
mathieu@63
    35
        'model/unix-socket-fd.cc',
mathieu@63
    36
        'model/unix-datagram-socket-fd.cc',
mathieu@63
    37
        'model/unix-stream-socket-fd.cc',
mathieu@63
    38
        'model/unix-timer-fd.cc',
mathieu@63
    39
        'model/dce-fd.cc',
mathieu@63
    40
        'model/dce-stdio.cc',
mathieu@63
    41
        'model/dce-pthread.cc',
mathieu@63
    42
        'model/dce-stdlib.cc',
mathieu@63
    43
        'model/dce-debug.cc',
mathieu@63
    44
        'model/dce-semaphore.cc',
mathieu@63
    45
        'model/dce-pthread-mutex.cc',
mathieu@63
    46
        'model/dce-cxa.cc',
mathieu@63
    47
        'model/dce-netdb.cc',
mathieu@63
    48
        'model/dce-string.cc',
mathieu@63
    49
        'model/dce-env.cc',
mathieu@63
    50
        'model/dce-pthread-cond.cc',
mathieu@63
    51
        'model/dce-timerfd.cc',
mathieu@63
    52
        'model/dce-stat.cc',
mathieu@63
    53
        'model/dce-global-variables.cc',
mathieu@63
    54
        'model/cmsg.cc',
mathieu@63
    55
        'model/waiter.cc',
mathieu@63
    56
        'model/kingsley-alloc.cc',
mathieu@63
    57
        'model/dce-alloc.cc',
mathieu@63
    58
        'model/fiber-manager.cc',
mathieu@63
    59
        'model/ucontext-fiber-manager.cc',
mathieu@63
    60
        'model/pthread-fiber-manager.cc',
mathieu@63
    61
        'model/task-manager.cc',
mathieu@63
    62
        'model/task-scheduler.cc',
mathieu@63
    63
        'model/rr-task-scheduler.cc',
mathieu@63
    64
        'model/loader-factory.cc',
mathieu@63
    65
        'model/elf-dependencies.cc',
mathieu@63
    66
        'model/elf-cache.cc',
mathieu@63
    67
        'model/cooja-loader-factory.cc',
mathieu@63
    68
        'model/copy-loader-factory.cc',
mathieu@63
    69
        'model/dlm-loader-factory.cc',
mathieu@63
    70
        'model/socket-fd-factory.cc',
mathieu@63
    71
        'model/ns3-socket-fd-factory.cc',
mathieu@63
    72
        # netlink code
mathieu@63
    73
        'model/netlink-socket.cc',
mathieu@63
    74
        'model/netlink-socket-address.cc',
mathieu@63
    75
        'model/netlink-socket-factory.cc',
mathieu@63
    76
        'model/netlink-attribute.cc',
mathieu@63
    77
        'model/netlink-message.cc',
mathieu@63
    78
        'model/netlink-message-route.cc',
mathieu@63
    79
        # helper.
mathieu@63
    80
        'helper/dce-manager-helper.cc',
mathieu@63
    81
        'helper/dce-application-helper.cc',
mathieu@63
    82
        ]
mathieu@64
    83
    module_headers = [
mathieu@63
    84
        'model/dce-manager.h',
mathieu@63
    85
        'model/task-scheduler.h',
mathieu@63
    86
        'model/task-manager.h',
mathieu@63
    87
        'model/socket-fd-factory.h',
mathieu@63
    88
        'model/loader-factory.h',
mathieu@63
    89
	'model/dce-application.h',
mathieu@63
    90
        'helper/dce-manager-helper.h',
mathieu@63
    91
        'helper/dce-application-helper.h',
mathieu@63
    92
# needed only for test module.
mathieu@63
    93
        'model/netlink-message.h',
mathieu@63
    94
        'model/netlink-message-route.h',
mathieu@63
    95
        'model/netlink-attribute.h',
mathieu@63
    96
        'model/netlink-socket-address.h',
mathieu@63
    97
        ]
mathieu@64
    98
    module_test = [
mathieu@63
    99
        'test/dce-manager-test.cc',
mathieu@63
   100
        'test/netlink-socket-test.cc',
mathieu@63
   101
        ]
mathieu@64
   102
    uselib = ns3waf.modules_uselib(bld, ['core', 'network', 'internet'])
mathieu@64
   103
    ns3waf.build_module(bld, 'dce',
mathieu@64
   104
                        source=module_source,
mathieu@64
   105
                        headers=module_headers,
mathieu@64
   106
                        use=uselib)