wscript
author Hajime Tazaki <tazaki@nict.go.jp>
Thu, 20 Sep 2012 11:17:36 +0900
changeset 275 9055b93b8b08
parent 274 d45e93cd80f0
child 300 65899b480bb9
permissions -rw-r--r--
build elf-loader by default, improve test-case to cover pthread/ucontext, dlm/cooja, with vdl/no-vdl
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     1
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     3
import os
63
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
     4
import Options
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
     5
import os.path
64
015a353a487b initial build of module
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 63
diff changeset
     6
import ns3waf
66
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
     7
import sys
225
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
     8
import types
63
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
     9
64
015a353a487b initial build of module
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 63
diff changeset
    10
def options(opt):
63
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
    11
    opt.tool_options('compiler_cc') 
64
015a353a487b initial build of module
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 63
diff changeset
    12
    ns3waf.options(opt)
65
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    13
    opt.add_option('--enable-kernel-stack',
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    14
                   help=('Path to the prefix where the kernel wrapper headers are installed'),
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    15
                   default=None,
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    16
                   dest='kernel_stack', type="string")
260
5505950f8e49 Add MPI support.
frederic.urbani@inria.fr
parents: 254
diff changeset
    17
    opt.add_option('--enable-mpi',
5505950f8e49 Add MPI support.
frederic.urbani@inria.fr
parents: 254
diff changeset
    18
                   help=('Enable MPI and distributed simulation support'),
5505950f8e49 Add MPI support.
frederic.urbani@inria.fr
parents: 254
diff changeset
    19
                   dest='enable_mpi', action='store_true',
5505950f8e49 Add MPI support.
frederic.urbani@inria.fr
parents: 254
diff changeset
    20
                   default=False)
271
d59f2c1dbafd Add optimized option to waf script.
frederic.urbani@inria.fr
parents: 260
diff changeset
    21
    opt.add_option('--enable-opt',
d59f2c1dbafd Add optimized option to waf script.
frederic.urbani@inria.fr
parents: 260
diff changeset
    22
                   help=('Enable use of DCE and NS-3 optimized compilation'),
d59f2c1dbafd Add optimized option to waf script.
frederic.urbani@inria.fr
parents: 260
diff changeset
    23
                   dest='enable_opt', action='store_true',
d59f2c1dbafd Add optimized option to waf script.
frederic.urbani@inria.fr
parents: 260
diff changeset
    24
                   default=False)    
d59f2c1dbafd Add optimized option to waf script.
frederic.urbani@inria.fr
parents: 260
diff changeset
    25
                                  
65
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    26
def search_file(files):
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    27
    for f in files:
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    28
        if os.path.isfile (f):
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    29
            return f
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    30
    return None
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    31
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    32
def configure(conf):
64
015a353a487b initial build of module
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 63
diff changeset
    33
    ns3waf.check_modules(conf, ['core', 'network', 'internet'], mandatory = True)
148
5dd2d890f1a0 Update documentation and build script.
frederic.urbani@inria.fr
parents: 146
diff changeset
    34
    ns3waf.check_modules(conf, ['point-to-point', 'tap-bridge', 'netanim'], mandatory = False)
184
6d13960b94c5 Alexander Afanasyev Implementing (reimplementing based on ns-3-dce-quagga-umip branch)
frederic.urbani@inria.fr
parents: 183
diff changeset
    35
    ns3waf.check_modules(conf, ['wifi', 'point-to-point', 'csma', 'mobility'], mandatory = False)
6d13960b94c5 Alexander Afanasyev Implementing (reimplementing based on ns-3-dce-quagga-umip branch)
frederic.urbani@inria.fr
parents: 183
diff changeset
    36
    ns3waf.check_modules(conf, ['point-to-point-layout'], mandatory = False)
260
5505950f8e49 Add MPI support.
frederic.urbani@inria.fr
parents: 254
diff changeset
    37
    ns3waf.check_modules(conf, ['mpi'], mandatory = False)
63
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
    38
    conf.check_tool('compiler_cc')
115
f9b5b78b896a Adjust to ns3.11 release.
frederic.urbani@inria.fr
parents: 113
diff changeset
    39
    conf.check(header_name='stdint.h', define_name='HAVE_STDINT_H', mandatory=False)
f9b5b78b896a Adjust to ns3.11 release.
frederic.urbani@inria.fr
parents: 113
diff changeset
    40
    conf.check(header_name='inttypes.h', define_name='HAVE_INTTYPES_H', mandatory=False)
f9b5b78b896a Adjust to ns3.11 release.
frederic.urbani@inria.fr
parents: 113
diff changeset
    41
    conf.check(header_name='sys/inttypes.h', define_name='HAVE_SYS_INT_TYPES_H', mandatory=False)
f9b5b78b896a Adjust to ns3.11 release.
frederic.urbani@inria.fr
parents: 113
diff changeset
    42
    conf.check(header_name='sys/types.h', define_name='HAVE_SYS_TYPES_H', mandatory=False)
f9b5b78b896a Adjust to ns3.11 release.
frederic.urbani@inria.fr
parents: 113
diff changeset
    43
    conf.check(header_name='sys/stat.h', define_name='HAVE_SYS_STAT_H', mandatory=False)
f9b5b78b896a Adjust to ns3.11 release.
frederic.urbani@inria.fr
parents: 113
diff changeset
    44
    conf.check(header_name='dirent.h', define_name='HAVE_DIRENT_H', mandatory=False)
64
015a353a487b initial build of module
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 63
diff changeset
    45
260
5505950f8e49 Add MPI support.
frederic.urbani@inria.fr
parents: 254
diff changeset
    46
    if Options.options.enable_mpi:
5505950f8e49 Add MPI support.
frederic.urbani@inria.fr
parents: 254
diff changeset
    47
         conf.env.append_value ('DEFINES', 'DCE_MPI=1')
5505950f8e49 Add MPI support.
frederic.urbani@inria.fr
parents: 254
diff changeset
    48
         conf.env['MPI'] = '1'
5505950f8e49 Add MPI support.
frederic.urbani@inria.fr
parents: 254
diff changeset
    49
         
211
eda6bf18fff0 Add Ccn Helper.
frederic.urbani@inria.fr
parents: 209
diff changeset
    50
    conf.env.prepend_value('LINKFLAGS', '-Wl,--no-as-needed')
63
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
    51
    conf.env.append_value('LINKFLAGS', '-pthread')
66
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
    52
    conf.check (lib='dl', mandatory = True)
216
50dd0158ab4d Add Fedora 16 64 support.
frederic.urbani@inria.fr
parents: 213
diff changeset
    53
    conf.check_cc(fragment='int main() {__get_cpu_features();}\n', msg='Checking for glibc get_cpu_features', define_name='HAVE_GETCPUFEATURES', mandatory=False)
50dd0158ab4d Add Fedora 16 64 support.
frederic.urbani@inria.fr
parents: 213
diff changeset
    54
     
64
015a353a487b initial build of module
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 63
diff changeset
    55
    vg_h = conf.check(header_name='valgrind/valgrind.h', mandatory=False)
015a353a487b initial build of module
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 63
diff changeset
    56
    vg_memcheck_h = conf.check(header_name='valgrind/memcheck.h', mandatory=False)
63
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
    57
    if vg_h and vg_memcheck_h:
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
    58
        conf.env.append_value('CXXDEFINES', 'HAVE_VALGRIND_H')
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
    59
65
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    60
    conf.start_msg('Searching C library')
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    61
    libc = search_file ([
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    62
            '/lib64/libc.so.6',
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    63
            '/lib/libc.so.6',
209
8fc38415c441 Update libc and pthread librairies search path.
frederic.urbani@inria.fr
parents: 207
diff changeset
    64
            '/lib/x86_64-linux-gnu/libc.so.6',
8fc38415c441 Update libc and pthread librairies search path.
frederic.urbani@inria.fr
parents: 207
diff changeset
    65
            '/lib/i386-linux-gnu/libc.so.6',
65
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    66
            ])
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    67
    if libc is None:
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    68
        conf.fatal('not found')
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    69
    else:
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    70
        conf.end_msg(libc, True)
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    71
    conf.env['LIBC_FILE'] = libc
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    72
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    73
    conf.start_msg('Searching pthread library')
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    74
    libpthread = search_file ([
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    75
            '/lib64/libpthread.so.0',
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    76
            '/lib/libpthread.so.0',
209
8fc38415c441 Update libc and pthread librairies search path.
frederic.urbani@inria.fr
parents: 207
diff changeset
    77
            '/lib/x86_64-linux-gnu/libpthread.so.0',
8fc38415c441 Update libc and pthread librairies search path.
frederic.urbani@inria.fr
parents: 207
diff changeset
    78
            '/lib/i386-linux-gnu/libpthread.so.0',
65
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    79
            ])
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    80
    if libpthread is None:
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    81
        conf.fatal('not found')
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    82
    else:
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    83
        conf.end_msg(libpthread, True)
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    84
    conf.env['LIBPTHREAD_FILE'] = libpthread
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
    85
251
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
    86
    conf.start_msg('Searching rt library')
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
    87
    librt = search_file ([
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
    88
            '/lib64/librt.so.1',
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
    89
            '/lib/librt.so.1',
254
92860e84c41d modify librt path in 64bit environment
Hajime Tazaki <tazaki@nict.go.jp>
parents: 252
diff changeset
    90
            '/lib/x86_64-linux-gnu/librt.so.1',
252
017ae26155ef add librt search path
Hajime Tazaki <tazaki@nict.go.jp>
parents: 251
diff changeset
    91
            '/lib/i386-linux-gnu/librt.so.1',
251
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
    92
            ])
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
    93
    if librt is None:
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
    94
        conf.fatal('not found')
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
    95
    else:
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
    96
        conf.end_msg(librt, True)
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
    97
    conf.env['LIBRT_FILE'] = librt
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
    98
75
9c15a394a814 add support of socket of domain AF_UNIX in libc emulation
frederic.urbani@inria.fr
parents: 69
diff changeset
    99
    conf.find_program('readversiondef', var='READVERSIONDEF', mandatory=True)
9c15a394a814 add support of socket of domain AF_UNIX in libc emulation
frederic.urbani@inria.fr
parents: 69
diff changeset
   100
65
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   101
    if Options.options.kernel_stack is not None and os.path.isdir(Options.options.kernel_stack):
79
ff5a849455da Add much test case in test-select test, then fix dce select implementation.
frederic.urbani@inria.fr
parents: 75
diff changeset
   102
        conf.check(header_name='sim.h',
ff5a849455da Add much test case in test-select test, then fix dce select implementation.
frederic.urbani@inria.fr
parents: 75
diff changeset
   103
                   includes=os.path.join(Options.options.kernel_stack, 'sim/include'))
ff5a849455da Add much test case in test-select test, then fix dce select implementation.
frederic.urbani@inria.fr
parents: 75
diff changeset
   104
      #  conf.check()
65
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   105
        conf.env['KERNEL_STACK'] = Options.options.kernel_stack
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   106
225
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   107
    conf_myscripts(conf)
236
1ba94266f3ad Add VDL option to waf to build dce-runner in order to run dce scenario using the VDL loader.
frederic.urbani@inria.fr
parents: 233
diff changeset
   108
    
275
9055b93b8b08 build elf-loader by default, improve test-case to cover pthread/ucontext, dlm/cooja, with vdl/no-vdl
Hajime Tazaki <tazaki@nict.go.jp>
parents: 274
diff changeset
   109
    conf.recurse(os.path.join('utils'))
66
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   110
    ns3waf.print_feature_summary(conf)
236
1ba94266f3ad Add VDL option to waf to build dce-runner in order to run dce scenario using the VDL loader.
frederic.urbani@inria.fr
parents: 233
diff changeset
   111
    
66
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   112
def build_netlink(bld):
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   113
    module_source = [
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   114
        'netlink/netlink-socket.cc',
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   115
        'netlink/netlink-socket-address.cc',
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   116
        'netlink/netlink-socket-factory.cc',
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   117
        'netlink/netlink-attribute.cc',
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   118
        'netlink/netlink-message.cc',
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   119
        'netlink/netlink-message-route.cc',
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   120
        ]
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   121
    module_headers = [
181
231e0431cf57 Merge with Alexander Afanasyev changes :
frederic.urbani@inria.fr
parents: 178
diff changeset
   122
        'netlink/netlink-socket-factory.h',
231e0431cf57 Merge with Alexander Afanasyev changes :
frederic.urbani@inria.fr
parents: 178
diff changeset
   123
        'netlink/netlink-socket-address.h',
66
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   124
        ]
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   125
    module = ns3waf.create_module(bld, 
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   126
                                  name='netlink',
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   127
                                  needed = ['internet', 'core'],
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   128
                                  source=module_source,
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   129
                                  headers=module_headers)
66
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   130
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   131
    module_tests = [
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   132
        'test/netlink-socket-test.cc',
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   133
        ]
115
f9b5b78b896a Adjust to ns3.11 release.
frederic.urbani@inria.fr
parents: 113
diff changeset
   134
    module.add_runner_test(needed = ['internet', 'point-to-point', 'core', 'netlink', 'dce'],
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   135
                           source=module_tests)
66
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   136
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   137
def dce_kw(**kw):
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   138
    d = dict(**kw)
66
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   139
    if os.uname()[4] == 'x86_64':
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   140
        mcmodel = ['-mcmodel=large']
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   141
    else:
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   142
        mcmodel = []
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   143
    nofortify = ['-U_FORTIFY_SOURCE']
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   144
    #debug_dl = ['-Wl,--dynamic-linker=/usr/lib/debug/ld-linux-x86-64.so.2']
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   145
    debug_dl = []
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   146
    d['cxxflags'] = d.get('cxxflags', []) + ['-fpie'] + mcmodel + nofortify
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   147
    d['cflags'] = d.get('cflags', []) + ['-fpie'] + mcmodel + nofortify
251
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
   148
    d['linkflags'] = d.get('linkflags', []) + ['-pie'] + ['-lrt'] + debug_dl
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   149
    return d
66
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   150
148
5dd2d890f1a0 Update documentation and build script.
frederic.urbani@inria.fr
parents: 146
diff changeset
   151
def build_dce_tests(module, kern):
5dd2d890f1a0 Update documentation and build script.
frederic.urbani@inria.fr
parents: 146
diff changeset
   152
    if kern:
5dd2d890f1a0 Update documentation and build script.
frederic.urbani@inria.fr
parents: 146
diff changeset
   153
        module.add_runner_test(needed=['core', 'dce', 'internet'],  source=['test/dce-manager-test.cc', 'test/with-kernel.cc'])
275
9055b93b8b08 build elf-loader by default, improve test-case to cover pthread/ucontext, dlm/cooja, with vdl/no-vdl
Hajime Tazaki <tazaki@nict.go.jp>
parents: 274
diff changeset
   154
        module.add_runner_test(needed=['core', 'dce', 'internet'],  source=['test/dce-manager-test.cc', 'test/with-kernel.cc'],
9055b93b8b08 build elf-loader by default, improve test-case to cover pthread/ucontext, dlm/cooja, with vdl/no-vdl
Hajime Tazaki <tazaki@nict.go.jp>
parents: 274
diff changeset
   155
                               linkflags = ['-Wl,--dynamic-linker=' + os.path.abspath ('../build/lib/ldso')], name='vdl')
148
5dd2d890f1a0 Update documentation and build script.
frederic.urbani@inria.fr
parents: 146
diff changeset
   156
    else:
5dd2d890f1a0 Update documentation and build script.
frederic.urbani@inria.fr
parents: 146
diff changeset
   157
        module.add_runner_test(needed=['core', 'dce', 'internet'], source=['test/dce-manager-test.cc','test/without-kernel.cc'])
275
9055b93b8b08 build elf-loader by default, improve test-case to cover pthread/ucontext, dlm/cooja, with vdl/no-vdl
Hajime Tazaki <tazaki@nict.go.jp>
parents: 274
diff changeset
   158
        module.add_runner_test(needed=['core', 'dce', 'internet'], source=['test/dce-manager-test.cc','test/without-kernel.cc'],
9055b93b8b08 build elf-loader by default, improve test-case to cover pthread/ucontext, dlm/cooja, with vdl/no-vdl
Hajime Tazaki <tazaki@nict.go.jp>
parents: 274
diff changeset
   159
                               linkflags = ['-Wl,--dynamic-linker=' + os.path.abspath ('../build/lib/ldso')], name='vdl')
148
5dd2d890f1a0 Update documentation and build script.
frederic.urbani@inria.fr
parents: 146
diff changeset
   160
    	    
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   161
    module.add_test(features='cxx cxxshlib', source=['test/test-macros.cc'], 
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   162
                    target='lib/test', linkflags=['-Wl,-soname=libtest.so'])
66
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   163
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   164
    tests = [['test-empty', []],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   165
             ['test-sleep', []],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   166
             ['test-nanosleep', []],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   167
             ['test-pthread', ['PTHREAD']],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   168
             ['test-mutex', ['PTHREAD']],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   169
             ['test-once', ['PTHREAD']],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   170
             ['test-pthread-key', ['PTHREAD']],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   171
             ['test-sem', ['PTHREAD']],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   172
             ['test-malloc', []],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   173
             ['test-malloc-2', []],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   174
             ['test-fd-simple', []],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   175
             ['test-strerror', []],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   176
             ['test-stdio', []],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   177
             ['test-string', []],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   178
             ['test-netdb', []],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   179
             ['test-env', []],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   180
             ['test-cond', ['PTHREAD']],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   181
             ['test-timer-fd', []],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   182
             ['test-stdlib', []],
75
9c15a394a814 add support of socket of domain AF_UNIX in libc emulation
frederic.urbani@inria.fr
parents: 69
diff changeset
   183
             ['test-select', ['PTHREAD']],
66
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   184
             ['test-random', []],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   185
             ['test-ioctl', []],
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   186
             ['test-fork', []],
75
9c15a394a814 add support of socket of domain AF_UNIX in libc emulation
frederic.urbani@inria.fr
parents: 69
diff changeset
   187
             ['test-local-socket', ['PTHREAD']],
81
7518a53aab9d fix bug in TCP(NS3) Socket: read should unblock and return 0 when remote close the connection.
frederic.urbani@inria.fr
parents: 79
diff changeset
   188
             ['test-poll', ['PTHREAD']],
82
f17e45eddedc Fix some bugs in TCP sockets, add getpeername too.
frederic.urbani@inria.fr
parents: 81
diff changeset
   189
             ['test-tcp-socket', ['PTHREAD']],
127
5f0926babda5 execv first implementation, need more tests.
frederic.urbani@inria.fr
parents: 125
diff changeset
   190
             ['test-exec', []],
146
6447d6aa3282 Add support of socket of domain AF_PACKET and type SOCK_RAW.
frederic.urbani@inria.fr
parents: 143
diff changeset
   191
             ['test-exec-target-1', []],
157
ed52e89aa2db New Poll/select implementation, without kernel support.
frederic.urbani@inria.fr
parents: 152
diff changeset
   192
             ['test-raw-socket', []],
178
a462a7e5330d Add ping and iperf samples.
frederic.urbani@inria.fr
parents: 157
diff changeset
   193
             ['test-fork-fd', []],
190
63d1cec0cd39 Add pipe support.
frederic.urbani@inria.fr
parents: 186
diff changeset
   194
             ['test-iperf', []],
63d1cec0cd39 Add pipe support.
frederic.urbani@inria.fr
parents: 186
diff changeset
   195
             ['test-name', []],
193
2f4779397ec1 Add dirent.
frederic.urbani@inria.fr
parents: 190
diff changeset
   196
             ['test-pipe', []],
241
304a850ab6be support ns-3-dce-quagga
Hajime Tazaki <tazaki@nict.go.jp>
parents: 239
diff changeset
   197
             ['test-dirent', []],
304a850ab6be support ns-3-dce-quagga
Hajime Tazaki <tazaki@nict.go.jp>
parents: 239
diff changeset
   198
             ['test-socket', []],
304a850ab6be support ns-3-dce-quagga
Hajime Tazaki <tazaki@nict.go.jp>
parents: 239
diff changeset
   199
             ['test-bug-multi-select', []],
250
9c972df8a320 Add test-tsearch in wat script.
frederic.urbani@inria.fr
parents: 241
diff changeset
   200
             ['test-tsearch', []],
251
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
   201
             ['test-signal', []],
66
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   202
             ]
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   203
    for name,uselib in tests:
202
0d6612e7d5f5 Improve binary search in order to shell script starting line like '#!/bin/sh'
frederic.urbani@inria.fr
parents: 199
diff changeset
   204
        module.add_test(**dce_kw(target='bin_dce/' + name, source = ['test/' + name + '.cc'],
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   205
                                 use = uselib + ['lib/test']))
68
a384d3f2f086 build examples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 66
diff changeset
   206
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   207
def build_dce_examples(module):
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   208
    dce_examples = [['udp-server', []],
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   209
                    ['udp-client', []],
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   210
                    ['udp-perf', ['m']],
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   211
                    ['tcp-server', []],
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   212
                    ['tcp-client', []],
121
dfac94445129 Add some documentation.
frederic.urbani@inria.fr
parents: 115
diff changeset
   213
                    ['tcp-loopback', []],
75
9c15a394a814 add support of socket of domain AF_UNIX in libc emulation
frederic.urbani@inria.fr
parents: 69
diff changeset
   214
                    ['unix-server', []],
9c15a394a814 add support of socket of domain AF_UNIX in libc emulation
frederic.urbani@inria.fr
parents: 69
diff changeset
   215
                    ['unix-client', []],
111
fe79531738cd Add sscanf support.
frederic.urbani@inria.fr
parents: 107
diff changeset
   216
                    ['udp-echo-server', []],
fe79531738cd Add sscanf support.
frederic.urbani@inria.fr
parents: 107
diff changeset
   217
                    ['udp-echo-client', []],
213
34195a532e9e fix wscript
frederic.urbani@inria.fr
parents: 211
diff changeset
   218
#                    ['little-cout', []],
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   219
                    ]
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   220
    for name,lib in dce_examples:
207
e7e165717a73 First changes to support or re-support Ubuntu 10.04.
frederic.urbani@inria.fr
parents: 202
diff changeset
   221
        module.add_example(**dce_kw(target = 'bin_dce/' + name, 
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   222
                                    source = ['example/' + name + '.cc'],
213
34195a532e9e fix wscript
frederic.urbani@inria.fr
parents: 211
diff changeset
   223
                                    lib = lib))
68
a384d3f2f086 build examples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 66
diff changeset
   224
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   225
    module.add_example(needed = ['core', 'internet', 'dce'], 
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   226
                       target='bin/dce-tcp-simple',
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   227
                       source=['example/dce-tcp-simple.cc'])
68
a384d3f2f086 build examples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 66
diff changeset
   228
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   229
    module.add_example(needed = ['core', 'internet', 'dce'], 
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   230
                       target='bin/dce-udp-simple',
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   231
                       source=['example/dce-udp-simple.cc'])
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   232
    
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   233
    module.add_example(needed = ['core', 'internet', 'dce', 'point-to-point'], 
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   234
                       target='bin/dce-udp-perf',
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   235
                       source=['example/dce-udp-perf.cc'])
68
a384d3f2f086 build examples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 66
diff changeset
   236
125
8048bdeed7e6 Add NetAnim in 2 ccnx samples.
frederic.urbani@inria.fr
parents: 124
diff changeset
   237
    module.add_example(needed = ['core', 'internet', 'dce', 'point-to-point', 'netanim'], 
102
497888348d54 add implemetation of: index, rindex, strtok* and getnameinfo (IPV4 only).
frederic.urbani@inria.fr
parents: 91
diff changeset
   238
                       target='bin/dce-ccnd-udp-2-nodes',
141
9e242a5ac065 Adapt ccnx samples to be usabe with kernel linux.
frederic.urbani@inria.fr
parents: 137
diff changeset
   239
                       source=['example/ccnx/dce-ccnd-udp-2-nodes.cc', 'example/ccnx/misc-tools.cc'])
102
497888348d54 add implemetation of: index, rindex, strtok* and getnameinfo (IPV4 only).
frederic.urbani@inria.fr
parents: 91
diff changeset
   240
75
9c15a394a814 add support of socket of domain AF_UNIX in libc emulation
frederic.urbani@inria.fr
parents: 69
diff changeset
   241
    module.add_example(needed = ['core', 'internet', 'dce'], 
102
497888348d54 add implemetation of: index, rindex, strtok* and getnameinfo (IPV4 only).
frederic.urbani@inria.fr
parents: 91
diff changeset
   242
                       target='bin/dce-ccnd-simple',
104
c8e4eab30114 Add ccnx example, tested with CCNX 0.4.0.
frederic.urbani@inria.fr
parents: 102
diff changeset
   243
                       source=['example/ccnx/dce-ccnd-simple.cc'])
102
497888348d54 add implemetation of: index, rindex, strtok* and getnameinfo (IPV4 only).
frederic.urbani@inria.fr
parents: 91
diff changeset
   244
                       
107
edcdbbf5110d improve ccnx tests.
frederic.urbani@inria.fr
parents: 104
diff changeset
   245
    module.add_example(needed = ['core', 'internet', 'dce'], 
edcdbbf5110d improve ccnx tests.
frederic.urbani@inria.fr
parents: 104
diff changeset
   246
                       target='bin/dce-ccnd-short-stuff',
edcdbbf5110d improve ccnx tests.
frederic.urbani@inria.fr
parents: 104
diff changeset
   247
                       source=['example/ccnx/dce-ccnd-short-stuff.cc'])
edcdbbf5110d improve ccnx tests.
frederic.urbani@inria.fr
parents: 104
diff changeset
   248
                       
148
5dd2d890f1a0 Update documentation and build script.
frederic.urbani@inria.fr
parents: 146
diff changeset
   249
    module.add_example(needed = ['core', 'internet', 'dce', 'tap-bridge', 'point-to-point', 'csma'],
111
fe79531738cd Add sscanf support.
frederic.urbani@inria.fr
parents: 107
diff changeset
   250
                       target='bin/dce-tap-udp-echo',
fe79531738cd Add sscanf support.
frederic.urbani@inria.fr
parents: 107
diff changeset
   251
                       source=['example/ccnx/dce-tap-udp-echo.cc'])                
fe79531738cd Add sscanf support.
frederic.urbani@inria.fr
parents: 107
diff changeset
   252
148
5dd2d890f1a0 Update documentation and build script.
frederic.urbani@inria.fr
parents: 146
diff changeset
   253
    module.add_example(needed = ['core', 'internet', 'dce', 'tap-bridge', 'csma' ], 
111
fe79531738cd Add sscanf support.
frederic.urbani@inria.fr
parents: 107
diff changeset
   254
                       target='bin/dce-tap-ccnd',
148
5dd2d890f1a0 Update documentation and build script.
frederic.urbani@inria.fr
parents: 146
diff changeset
   255
                       source=['example/ccnx/dce-tap-ccnd.cc'])       
5dd2d890f1a0 Update documentation and build script.
frederic.urbani@inria.fr
parents: 146
diff changeset
   256
                       
125
8048bdeed7e6 Add NetAnim in 2 ccnx samples.
frederic.urbani@inria.fr
parents: 124
diff changeset
   257
    module.add_example(needed = ['core', 'internet', 'dce', 'point-to-point', 'netanim'], 
113
858825f2de97 Add CCNx sample.
frederic.urbani@inria.fr
parents: 111
diff changeset
   258
                       target='bin/dce-ccnd-linear-multiple',
141
9e242a5ac065 Adapt ccnx samples to be usabe with kernel linux.
frederic.urbani@inria.fr
parents: 137
diff changeset
   259
                       source=['example/ccnx/dce-ccnd-linear-multiple.cc', 'example/ccnx/misc-tools.cc'])
113
858825f2de97 Add CCNx sample.
frederic.urbani@inria.fr
parents: 111
diff changeset
   260
                       
152
f2b3b42571ee Add CCN VLC TAP sample.
frederic.urbani@inria.fr
parents: 148
diff changeset
   261
    module.add_example(needed = ['core', 'internet', 'dce', 'tap-bridge', 'csma' ], 
f2b3b42571ee Add CCN VLC TAP sample.
frederic.urbani@inria.fr
parents: 148
diff changeset
   262
                       target='bin/dce-tap-vlc',
f2b3b42571ee Add CCN VLC TAP sample.
frederic.urbani@inria.fr
parents: 148
diff changeset
   263
                       source=['example/ccnx/dce-tap-vlc.cc'])       
178
a462a7e5330d Add ping and iperf samples.
frederic.urbani@inria.fr
parents: 157
diff changeset
   264
    
225
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   265
#    module.add_example(needed = ['core', 'internet', 'dce', 'point-to-point', 'netanim'], 
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   266
#                       target='bin/dce-ping',
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   267
#                       source=['example/dce-ping.cc', 'example/ccnx/misc-tools.cc'])
152
f2b3b42571ee Add CCN VLC TAP sample.
frederic.urbani@inria.fr
parents: 148
diff changeset
   268
233
bd42624aad1d Update waf script.
frederic.urbani@inria.fr
parents: 225
diff changeset
   269
    module.add_example(needed = ['core', 'internet', 'dce', 'point-to-point', 'netanim', 'csma'], 
178
a462a7e5330d Add ping and iperf samples.
frederic.urbani@inria.fr
parents: 157
diff changeset
   270
                       target='bin/dce-iperf',
a462a7e5330d Add ping and iperf samples.
frederic.urbani@inria.fr
parents: 157
diff changeset
   271
                       source=['example/dce-iperf.cc', 'example/ccnx/misc-tools.cc'])
190
63d1cec0cd39 Add pipe support.
frederic.urbani@inria.fr
parents: 186
diff changeset
   272
    
63d1cec0cd39 Add pipe support.
frederic.urbani@inria.fr
parents: 186
diff changeset
   273
    module.add_example(needed = ['core', 'internet', 'dce' ], 
63d1cec0cd39 Add pipe support.
frederic.urbani@inria.fr
parents: 186
diff changeset
   274
                       target='bin/dce-bash-simple',
63d1cec0cd39 Add pipe support.
frederic.urbani@inria.fr
parents: 186
diff changeset
   275
                       source=['example/bash/dce-bash-simple.cc'])
211
eda6bf18fff0 Add Ccn Helper.
frederic.urbani@inria.fr
parents: 209
diff changeset
   276
eda6bf18fff0 Add Ccn Helper.
frederic.urbani@inria.fr
parents: 209
diff changeset
   277
    module.add_example(needed = ['core', 'internet', 'dce', 'point-to-point', 'netanim'], 
eda6bf18fff0 Add Ccn Helper.
frederic.urbani@inria.fr
parents: 209
diff changeset
   278
                       target='bin/dce-ccn-cache',
213
34195a532e9e fix wscript
frederic.urbani@inria.fr
parents: 211
diff changeset
   279
                       source=['example/ccnx/dce-ccn-cache.cc', 'example/ccnx/misc-tools.cc'])
225
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   280
                       
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   281
#    module.add_example(needed = ['core', 'internet', 'dce', 'point-to-point', 'netanim'], 
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   282
#                       target='bin/dce-xorp-simple',
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   283
#                       source=['example/xorp/dce-xorp-simple.cc', 'example/ccnx/misc-tools.cc'])
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   284
                                              
213
34195a532e9e fix wscript
frederic.urbani@inria.fr
parents: 211
diff changeset
   285
#    module.add_example(needed = ['core', 'internet', 'dce', 'csma' ], 
34195a532e9e fix wscript
frederic.urbani@inria.fr
parents: 211
diff changeset
   286
#                       target='bin/dce-udp-multicast',
34195a532e9e fix wscript
frederic.urbani@inria.fr
parents: 211
diff changeset
   287
#                       source=['example/dce-udp-multicast.cc'])
34195a532e9e fix wscript
frederic.urbani@inria.fr
parents: 211
diff changeset
   288
#    module.add_example(needed = ['core', 'dce', ], 
34195a532e9e fix wscript
frederic.urbani@inria.fr
parents: 211
diff changeset
   289
#                       target='bin/dce-cout-bug',
34195a532e9e fix wscript
frederic.urbani@inria.fr
parents: 211
diff changeset
   290
#                       source=['example/dce-cout-bug.cc'])
207
e7e165717a73 First changes to support or re-support Ubuntu 10.04.
frederic.urbani@inria.fr
parents: 202
diff changeset
   291
                                                                
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   292
def build_dce_kernel_examples(module):
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   293
    module.add_example(needed = ['core', 'network', 'dce'], 
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   294
                       target='bin/dce-linux-simple',
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   295
                       source=['example/dce-linux-simple.cc'])
68
a384d3f2f086 build examples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 66
diff changeset
   296
137
c128768c23a9 Use dce-manager-helper in dce-manager-test, add finished callback to dce-application.
frederic.urbani@inria.fr
parents: 134
diff changeset
   297
    module.add_example(needed = ['core', 'network', 'dce', 'wifi', 'point-to-point', 'csma', 'mobility' ],
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   298
                       target='bin/dce-linux',
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   299
                       source=['example/dce-linux.cc'])
68
a384d3f2f086 build examples
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 66
diff changeset
   300
225
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   301
# Add a script to build system 
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   302
def build_a_script(bld, name, needed = [], **kw):
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   303
    external = [i for i in needed if not i == name]
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   304
    if not ns3waf.modules_found(bld, external):
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   305
    	return
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   306
    kw['use'] = kw.get('use', []) + ns3waf.modules_uselib(bld, needed)
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   307
    if 'features' not in kw:
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   308
        kw['features'] = 'cxx cxxprogram'
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   309
    bld(**kw)
66
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   310
225
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   311
# Add directories under myscripts dir
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   312
def add_myscripts(bld):
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   313
    for dir in os.listdir('myscripts'):
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   314
        if dir.startswith('.') or dir == 'CVS':
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   315
            continue
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   316
        if os.path.isdir(os.path.join('myscripts', dir)):
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   317
             bld.add_subdirs(os.path.join('myscripts', dir))
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   318
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   319
# Configure directories under myscripts dir
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   320
def conf_myscripts(conf):
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   321
    for dir in os.listdir('myscripts'):
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   322
        if dir.startswith('.') or dir == 'CVS':
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   323
            continue
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   324
        if os.path.isdir(os.path.join('myscripts', dir)):
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   325
             conf.recurse(os.path.join('myscripts', dir))
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   326
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   327
	
0
0a55bed4c895 process -> dce
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   328
def build(bld):
66
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   329
    build_netlink(bld)
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   330
65
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   331
    if bld.env['KERNEL_STACK']:
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   332
        kernel_source = [
79
ff5a849455da Add much test case in test-select test, then fix dce select implementation.
frederic.urbani@inria.fr
parents: 75
diff changeset
   333
            'model/linux-socket-fd-factory.cc',
ff5a849455da Add much test case in test-select test, then fix dce select implementation.
frederic.urbani@inria.fr
parents: 75
diff changeset
   334
            'model/linux-socket-fd.cc',
65
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   335
            ]
79
ff5a849455da Add much test case in test-select test, then fix dce select implementation.
frederic.urbani@inria.fr
parents: 75
diff changeset
   336
        kernel_headers = [ 'model/linux-socket-fd-factory.h']
ff5a849455da Add much test case in test-select test, then fix dce select implementation.
frederic.urbani@inria.fr
parents: 75
diff changeset
   337
        kernel_includes = [bld.env['KERNEL_STACK']]
65
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   338
    else:
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   339
        kernel_source = []
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   340
        kernel_headers = []
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   341
        kernel_includes = []
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   342
64
015a353a487b initial build of module
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 63
diff changeset
   343
    module_source = [
63
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   344
        'model/dce-manager.cc',
157
ed52e89aa2db New Poll/select implementation, without kernel support.
frederic.urbani@inria.fr
parents: 152
diff changeset
   345
	    'model/dce-application.cc',
63
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   346
        'model/dce.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   347
        'model/dce-signal.cc',
181
231e0431cf57 Merge with Alexander Afanasyev changes :
frederic.urbani@inria.fr
parents: 178
diff changeset
   348
        'model/libc-dce.cc',
63
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   349
        'model/utils.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   350
        'model/unix-fd.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   351
        'model/unix-file-fd.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   352
        'model/unix-socket-fd.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   353
        'model/unix-datagram-socket-fd.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   354
        'model/unix-stream-socket-fd.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   355
        'model/unix-timer-fd.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   356
        'model/dce-fd.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   357
        'model/dce-stdio.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   358
        'model/dce-pthread.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   359
        'model/dce-stdlib.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   360
        'model/dce-debug.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   361
        'model/dce-semaphore.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   362
        'model/dce-pthread-mutex.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   363
        'model/dce-cxa.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   364
        'model/dce-netdb.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   365
        'model/dce-string.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   366
        'model/dce-env.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   367
        'model/dce-pthread-cond.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   368
        'model/dce-timerfd.cc',
181
231e0431cf57 Merge with Alexander Afanasyev changes :
frederic.urbani@inria.fr
parents: 178
diff changeset
   369
        'model/dce-time.cc',
63
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   370
        'model/dce-stat.cc',
183
0d88d8de4739 Alexander Afanasyev: Implementing DCE version of syslog functions. Everything is redirected
frederic.urbani@inria.fr
parents: 181
diff changeset
   371
        'model/dce-syslog.cc',
63
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   372
        'model/dce-global-variables.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   373
        'model/cmsg.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   374
        'model/waiter.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   375
        'model/kingsley-alloc.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   376
        'model/dce-alloc.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   377
        'model/fiber-manager.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   378
        'model/ucontext-fiber-manager.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   379
        'model/pthread-fiber-manager.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   380
        'model/task-manager.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   381
        'model/task-scheduler.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   382
        'model/rr-task-scheduler.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   383
        'model/loader-factory.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   384
        'model/elf-dependencies.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   385
        'model/elf-cache.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   386
        'model/cooja-loader-factory.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   387
        'model/copy-loader-factory.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   388
        'model/dlm-loader-factory.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   389
        'model/socket-fd-factory.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   390
        'model/ns3-socket-fd-factory.cc',
75
9c15a394a814 add support of socket of domain AF_UNIX in libc emulation
frederic.urbani@inria.fr
parents: 69
diff changeset
   391
        'model/local-socket-fd.cc',
87
77f277cef341 Add Unix Socket Datagram Implementation.
frederic.urbani@inria.fr
parents: 82
diff changeset
   392
        'model/local-stream-socket-fd.cc',
77f277cef341 Add Unix Socket Datagram Implementation.
frederic.urbani@inria.fr
parents: 82
diff changeset
   393
        'model/local-datagram-socket-fd.cc',
75
9c15a394a814 add support of socket of domain AF_UNIX in libc emulation
frederic.urbani@inria.fr
parents: 69
diff changeset
   394
        'model/local-socket-fd-factory.cc',
91
be088fad2750 Add umask and abort support.
frederic.urbani@inria.fr
parents: 87
diff changeset
   395
        'model/dce-umask.cc',
124
6148bf06ebd0 Upgrade uname emulation: use names of NS3 instead of real uname.
frederic.urbani@inria.fr
parents: 121
diff changeset
   396
        'model/dce-misc.cc',
6148bf06ebd0 Upgrade uname emulation: use names of NS3 instead of real uname.
frederic.urbani@inria.fr
parents: 121
diff changeset
   397
        'model/dce-node-context.cc',
143
35c44b159fc7 Add wait support.
frederic.urbani@inria.fr
parents: 141
diff changeset
   398
        'model/dce-wait.cc',
157
ed52e89aa2db New Poll/select implementation, without kernel support.
frederic.urbani@inria.fr
parents: 152
diff changeset
   399
        'model/wait-queue.cc',
ed52e89aa2db New Poll/select implementation, without kernel support.
frederic.urbani@inria.fr
parents: 152
diff changeset
   400
        'model/file-usage.cc',
ed52e89aa2db New Poll/select implementation, without kernel support.
frederic.urbani@inria.fr
parents: 152
diff changeset
   401
        'model/dce-poll.cc',
186
51d6e9e0e2ae Alexander Afanasyev Many improvements of Netlink socket implementation.
frederic.urbani@inria.fr
parents: 184
diff changeset
   402
        'model/ipv4-dce-routing.cc',
190
63d1cec0cd39 Add pipe support.
frederic.urbani@inria.fr
parents: 186
diff changeset
   403
        'model/dce-credentials.cc',
63d1cec0cd39 Add pipe support.
frederic.urbani@inria.fr
parents: 186
diff changeset
   404
        'model/dce-pwd.cc',
63d1cec0cd39 Add pipe support.
frederic.urbani@inria.fr
parents: 186
diff changeset
   405
        'model/pipe-fd.cc',
63d1cec0cd39 Add pipe support.
frederic.urbani@inria.fr
parents: 186
diff changeset
   406
        'model/fifo-buffer.cc',
193
2f4779397ec1 Add dirent.
frederic.urbani@inria.fr
parents: 190
diff changeset
   407
        'model/dce-dirent.cc',
199
458fa0e6a08c add fchdir, unlinkat, __fxstatat .
frederic.urbani@inria.fr
parents: 195
diff changeset
   408
        'model/dce-at.cc',
202
0d6612e7d5f5 Improve binary search in order to shell script starting line like '#!/bin/sh'
frederic.urbani@inria.fr
parents: 199
diff changeset
   409
        'model/exec-utils.cc',
239
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents: 238
diff changeset
   410
        'model/linux/ipv4-linux.cc',
274
d45e93cd80f0 Update wscript.
frederic.urbani@inria.fr
parents: 271
diff changeset
   411
        'model/dce-vfs.cc',
271
d59f2c1dbafd Add optimized option to waf script.
frederic.urbani@inria.fr
parents: 260
diff changeset
   412
        'model/elf-ldd.cc',
63
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   413
        # helper.
186
51d6e9e0e2ae Alexander Afanasyev Many improvements of Netlink socket implementation.
frederic.urbani@inria.fr
parents: 184
diff changeset
   414
        'helper/ipv4-dce-routing-helper.cc',
63
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   415
        'helper/dce-manager-helper.cc',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   416
        'helper/dce-application-helper.cc',
233
bd42624aad1d Update waf script.
frederic.urbani@inria.fr
parents: 225
diff changeset
   417
        'helper/ccn-client-helper.cc',
239
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents: 238
diff changeset
   418
        'helper/linux-stack-helper.cc',
63
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   419
        ]
64
015a353a487b initial build of module
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 63
diff changeset
   420
    module_headers = [
63
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   421
        'model/dce-manager.h',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   422
        'model/task-scheduler.h',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   423
        'model/task-manager.h',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   424
        'model/socket-fd-factory.h',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   425
        'model/loader-factory.h',
181
231e0431cf57 Merge with Alexander Afanasyev changes :
frederic.urbani@inria.fr
parents: 178
diff changeset
   426
        'model/dce-application.h',
186
51d6e9e0e2ae Alexander Afanasyev Many improvements of Netlink socket implementation.
frederic.urbani@inria.fr
parents: 184
diff changeset
   427
        'model/ipv4-dce-routing.h',
239
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents: 238
diff changeset
   428
        'model/linux/ipv4-linux.h',
63
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   429
        'helper/dce-manager-helper.h',
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   430
        'helper/dce-application-helper.h',
211
eda6bf18fff0 Add Ccn Helper.
frederic.urbani@inria.fr
parents: 209
diff changeset
   431
        'helper/ccn-client-helper.h',
241
304a850ab6be support ns-3-dce-quagga
Hajime Tazaki <tazaki@nict.go.jp>
parents: 239
diff changeset
   432
        'helper/linux-stack-helper.h',
304a850ab6be support ns-3-dce-quagga
Hajime Tazaki <tazaki@nict.go.jp>
parents: 239
diff changeset
   433
        'helper/ipv4-dce-routing-helper.h',
63
e89dca438df6 more fixes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 59
diff changeset
   434
        ]
65
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   435
    module_source = module_source + kernel_source
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   436
    module_headers = module_headers + kernel_headers
66
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   437
    uselib = ns3waf.modules_uselib(bld, ['core', 'network', 'internet', 'netlink'])
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   438
    module = ns3waf.create_module(bld, name='dce',
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   439
                                  source=module_source,
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   440
                                  headers=module_headers,
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   441
                                  use=uselib,
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   442
                                  includes=kernel_includes,
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   443
                                  lib=['dl'])
195
30a796abb0ac Fix some memory faults.
frederic.urbani@inria.fr
parents: 193
diff changeset
   444
#                                  lib=['dl','efence'])
148
5dd2d890f1a0 Update documentation and build script.
frederic.urbani@inria.fr
parents: 146
diff changeset
   445
    build_dce_tests(module, bld.env['KERNEL_STACK'])
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   446
    build_dce_examples(module)
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   447
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   448
    if bld.env['KERNEL_STACK']:
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   449
        build_dce_kernel_examples(module)
225
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   450
    
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   451
    bld.build_a_script = types.MethodType(build_a_script, bld)
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   452
dd5e3466cb3c Add a myscripts directories for user scripts build.
frederic.urbani@inria.fr
parents: 216
diff changeset
   453
    add_myscripts(bld)
65
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   454
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   455
    bld.add_group('dce_version_files')
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   456
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   457
    bld(source=['model/libc-ns3.version'],
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   458
        target='model/libc.version',
75
9c15a394a814 add support of socket of domain AF_UNIX in libc emulation
frederic.urbani@inria.fr
parents: 69
diff changeset
   459
        rule='%s %s | cat ${SRC[0].abspath()} - > ${TGT}' %
9c15a394a814 add support of socket of domain AF_UNIX in libc emulation
frederic.urbani@inria.fr
parents: 69
diff changeset
   460
        (bld.env['READVERSIONDEF'], bld.env['LIBC_FILE']))
65
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   461
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   462
    bld(source=['model/libpthread-ns3.version'],
69
19d7af80f47f cleanup build script
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 68
diff changeset
   463
        target='model/libpthread.version',
75
9c15a394a814 add support of socket of domain AF_UNIX in libc emulation
frederic.urbani@inria.fr
parents: 69
diff changeset
   464
        rule='%s %s | cat ${SRC[0].abspath()} - > ${TGT}' %
9c15a394a814 add support of socket of domain AF_UNIX in libc emulation
frederic.urbani@inria.fr
parents: 69
diff changeset
   465
        (bld.env['READVERSIONDEF'], bld.env['LIBPTHREAD_FILE']))
65
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   466
251
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
   467
    bld(source=['model/librt-ns3.version'],
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
   468
        target='model/librt.version',
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
   469
        rule='%s %s | cat ${SRC[0].abspath()} - > ${TGT}' %
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
   470
        (bld.env['READVERSIONDEF'], bld.env['LIBRT_FILE']))
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
   471
65
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   472
    bld.add_group('dce_use_version_files')
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   473
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   474
    # The very small libc used to replace the glibc
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   475
    # and forward to the dce_* code
181
231e0431cf57 Merge with Alexander Afanasyev changes :
frederic.urbani@inria.fr
parents: 178
diff changeset
   476
    bld.shlib(source = ['model/libc.cc', 'model/libc-setup.cc', 'model/libc-global-variables.cc'],
66
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   477
              target='lib/c-ns3', cflags=['-g'],
65
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   478
              defines=['LIBSETUP=libc_setup'],
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   479
              linkflags=['-nostdlib', 
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   480
                         '-Wl,--version-script=' + os.path.join('model', 'libc.version'),
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   481
                         '-Wl,-soname=libc.so.6'])
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   482
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   483
    # The very small libpthread used to replace the glibc
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   484
    # and forward to the dce_* code
181
231e0431cf57 Merge with Alexander Afanasyev changes :
frederic.urbani@inria.fr
parents: 178
diff changeset
   485
    bld.shlib(source = ['model/libc.cc', 'model/libc-setup.cc'],
66
2fe1f3e576c9 make it somewhat build sanely
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 65
diff changeset
   486
              target='lib/pthread-ns3', cflags=['-g'],
65
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   487
              defines=['LIBSETUP=libpthread_setup'],
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   488
              linkflags=['-nostdlib', '-lc',
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   489
                         '-Wl,--version-script=' + os.path.join('model', 'libpthread.version'),
227f6347e4e1 build fake c and pthread libraries
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 64
diff changeset
   490
                         '-Wl,-soname=libpthread.so.0'])
251
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
   491
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
   492
    # The very small librt used to replace the glibc
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
   493
    # and forward to the dce_* code
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
   494
    bld.shlib(source = ['model/libc.cc', 'model/libc-setup.cc'],
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
   495
              target='lib/rt-ns3', cflags=['-g'],
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
   496
              defines=['LIBSETUP=librt_setup'],
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
   497
              linkflags=['-nostdlib', '-lc',
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
   498
                         '-Wl,--version-script=' + os.path.join('model', 'librt.version'),
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
   499
                         '-Wl,-soname=librt.so.1'])
5df5053d47ad support umip(mip6d) with ns-3-linux for NEMO/MIP6
Hajime Tazaki <tazaki@nict.go.jp>
parents: 250
diff changeset
   500
275
9055b93b8b08 build elf-loader by default, improve test-case to cover pthread/ucontext, dlm/cooja, with vdl/no-vdl
Hajime Tazaki <tazaki@nict.go.jp>
parents: 274
diff changeset
   501
    bld.add_subdirs(['utils'])