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