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 | 146a51b | 2012-03-05 10:47:35 -0800 | [diff] [blame] | 12 | conf.define ('STANDALONE', 1) |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 13 | |
Alexander Afanasyev | e76f263 | 2012-03-05 00:18:42 -0800 | [diff] [blame] | 14 | conf.check_tool('boost') |
| 15 | conf.check_boost(lib='signals filesystem iostreams regex') |
| 16 | if not conf.env.LIB_BOOST: |
| 17 | conf.check_boost(lib='signals filesystem iostreams regex', libpath="/usr/lib64") |
| 18 | |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 19 | def build (bld): |
Alexander Afanasyev | ec1d4a7 | 2012-03-05 11:06:54 -0800 | [diff] [blame^] | 20 | synclib = bld.new_task_gen (target="sync", features=['cxx', 'cxxshlib']) |
| 21 | synclib.source = bld.path.ant_glob(['model/sync-*.cc', |
| 22 | 'helper/sync-*.cc']) |
| 23 | synclib.uselib = 'BOOST BOOST_IOSTREAMS SSL' |
| 24 | |
| 25 | testapp = bld.new_task_gen (target="testapp", features=['cxx', 'cxxprogram']) |
| 26 | testapp.source = "test/testapp.cc" |
| 27 | # testapp.uselib = 'BOOST BOOST_IOSTREAMS SSL' |
| 28 | testapp.uselib_local = 'sync' |
Alexander Afanasyev | e76f263 | 2012-03-05 00:18:42 -0800 | [diff] [blame] | 29 | |
Alexander Afanasyev | 146a51b | 2012-03-05 10:47:35 -0800 | [diff] [blame] | 30 | # def build_ns3 (bld): |
| 31 | # deps = ['core', 'network', 'NDNabstraction'] |
| 32 | # if bld.env['ENABLE_PYTHON_BINDINGS']: |
| 33 | # deps.append ('visualizer') |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 34 | |
Alexander Afanasyev | 146a51b | 2012-03-05 10:47:35 -0800 | [diff] [blame] | 35 | # module = bld.create_ns3_module ('sync', deps) |
| 36 | # module.uselib = 'BOOST BOOST_IOSTREAMS SSL' |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 37 | |
Alexander Afanasyev | 146a51b | 2012-03-05 10:47:35 -0800 | [diff] [blame] | 38 | # # tests = bld.create_ns3_module_test_library('sync') |
| 39 | # # tests.source = [ |
| 40 | # # 'test/sync-test-suite.cc', |
| 41 | # # ] |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 42 | |
Alexander Afanasyev | 146a51b | 2012-03-05 10:47:35 -0800 | [diff] [blame] | 43 | # headers = bld.new_task_gen(features=['ns3header']) |
| 44 | # headers.module = 'sync' |
| 45 | # headers.source = [ |
| 46 | # 'model/sync-app.h', |
| 47 | # ] |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 48 | |
Alexander Afanasyev | 146a51b | 2012-03-05 10:47:35 -0800 | [diff] [blame] | 49 | # # if not bld.env['ENABLE_NDN_ABSTRACT']: |
| 50 | # # bld.env['MODULES_NOT_BUILT'].append('NDNabstraction') |
| 51 | # # return |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 52 | |
Alexander Afanasyev | 146a51b | 2012-03-05 10:47:35 -0800 | [diff] [blame] | 53 | # module.source = bld.path.ant_glob(['model/*.cc', |
| 54 | # 'helper/*.cc']) |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 55 | |
Alexander Afanasyev | 146a51b | 2012-03-05 10:47:35 -0800 | [diff] [blame] | 56 | # # if bld.env.ENABLE_EXAMPLES: |
| 57 | # # bld.add_subdirs('examples') |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 58 | |
Alexander Afanasyev | 146a51b | 2012-03-05 10:47:35 -0800 | [diff] [blame] | 59 | # # bld.ns3_python_bindings() |
Alexander Afanasyev | 7a696fb | 2012-03-01 17:17:22 -0800 | [diff] [blame] | 60 | |