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