Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
| 2 | |
Alexander Afanasyev | e76f263 | 2012-03-05 00:18:42 -0800 | [diff] [blame^] | 3 | def options(opt): |
| 4 | opt.load('compiler_c') |
| 5 | opt.load('compiler_cxx') |
| 6 | opt.tool_options('boost', tooldir=["waf-tools"]) |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 7 | |
Alexander Afanasyev | 8f25cbb | 2012-03-01 23:53:40 -0800 | [diff] [blame] | 8 | def configure(conf): |
Alexander Afanasyev | e76f263 | 2012-03-05 00:18:42 -0800 | [diff] [blame^] | 9 | conf.load("compiler_cxx") |
Alexander Afanasyev | 8f25cbb | 2012-03-01 23:53:40 -0800 | [diff] [blame] | 10 | conf.check_cfg(atleast_pkgconfig_version='0.20') |
| 11 | conf.check_cfg(package='openssl', args=['--cflags', '--libs'], uselib_store='SSL') |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 12 | |
Alexander Afanasyev | e76f263 | 2012-03-05 00:18:42 -0800 | [diff] [blame^] | 13 | 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 Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 18 | def build (bld): |
Alexander Afanasyev | e76f263 | 2012-03-05 00:18:42 -0800 | [diff] [blame^] | 19 | 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 | |
| 24 | def build_ns3 (bld): |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 25 | 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 Afanasyev | 8f25cbb | 2012-03-01 23:53:40 -0800 | [diff] [blame] | 30 | module.uselib = 'BOOST BOOST_IOSTREAMS SSL' |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 31 | |
| 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 | |