blob: eee1d9a0ae08e0031db0d05fdff22cf50c89d4e1 [file] [log] [blame]
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -08001# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2
Alexander Afanasyeve76f2632012-03-05 00:18:42 -08003def options(opt):
4 opt.load('compiler_c')
5 opt.load('compiler_cxx')
6 opt.tool_options('boost', tooldir=["waf-tools"])
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -08007
Alexander Afanasyev8f25cbb2012-03-01 23:53:40 -08008def configure(conf):
Alexander Afanasyeve76f2632012-03-05 00:18:42 -08009 conf.load("compiler_cxx")
Alexander Afanasyev8f25cbb2012-03-01 23:53:40 -080010 conf.check_cfg(atleast_pkgconfig_version='0.20')
11 conf.check_cfg(package='openssl', args=['--cflags', '--libs'], uselib_store='SSL')
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080012
Alexander Afanasyeve76f2632012-03-05 00:18:42 -080013 conf.check_tool('boost')
14 conf.check_boost(lib='signals filesystem iostreams regex')
15 if not conf.env.LIB_BOOST:
16 conf.check_boost(lib='signals filesystem iostreams regex', libpath="/usr/lib64")
17
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080018def build (bld):
Alexander Afanasyeve76f2632012-03-05 00:18:42 -080019 module = bld.new_task_gen(features=['cxx', 'cxxshlib'])
20 module.source = bld.path.ant_glob(['model/*.cc',
21 'helper/*.cc'])
22 module.uselib = 'BOOST BOOST_IOSTREAMS SSL'
23
24def build_ns3 (bld):
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080025 deps = ['core', 'network', 'NDNabstraction']
26 if bld.env['ENABLE_PYTHON_BINDINGS']:
27 deps.append ('visualizer')
28
29 module = bld.create_ns3_module ('sync', deps)
Alexander Afanasyev8f25cbb2012-03-01 23:53:40 -080030 module.uselib = 'BOOST BOOST_IOSTREAMS SSL'
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080031
32 # tests = bld.create_ns3_module_test_library('sync')
33 # tests.source = [
34 # 'test/sync-test-suite.cc',
35 # ]
36
37 headers = bld.new_task_gen(features=['ns3header'])
38 headers.module = 'sync'
39 headers.source = [
40 'model/sync-app.h',
41 ]
42
43 # if not bld.env['ENABLE_NDN_ABSTRACT']:
44 # bld.env['MODULES_NOT_BUILT'].append('NDNabstraction')
45 # return
46
47 module.source = bld.path.ant_glob(['model/*.cc',
48 'helper/*.cc'])
49
50 # if bld.env.ENABLE_EXAMPLES:
51 # bld.add_subdirs('examples')
52
53 # bld.ns3_python_bindings()
54