blob: 60c7aa1c9ed4d1998d43366639e39e7d8c6b8b16 [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 Afanasyev146a51b2012-03-05 10:47:35 -080012 conf.define ('STANDALONE', 1)
Alexander Afanasyev2fc2d672012-03-05 16:57:39 -080013 # conf.define ('DIGEST_BASE64', 1) # base64 is not working and probably will not work at all
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080014
Alexander Afanasyeve76f2632012-03-05 00:18:42 -080015 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 Afanasyev7a696fb2012-03-01 17:17:22 -080020def build (bld):
Alexander Afanasyevec1d4a72012-03-05 11:06:54 -080021 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 Afanasyeve76f2632012-03-05 00:18:42 -080030
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080031# def build_ns3 (bld):
32# deps = ['core', 'network', 'NDNabstraction']
33# if bld.env['ENABLE_PYTHON_BINDINGS']:
34# deps.append ('visualizer')
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080035
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080036# module = bld.create_ns3_module ('sync', deps)
37# module.uselib = 'BOOST BOOST_IOSTREAMS SSL'
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080038
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080039# # tests = bld.create_ns3_module_test_library('sync')
40# # tests.source = [
41# # 'test/sync-test-suite.cc',
42# # ]
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080043
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080044# headers = bld.new_task_gen(features=['ns3header'])
45# headers.module = 'sync'
46# headers.source = [
47# 'model/sync-app.h',
48# ]
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080049
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080050# # if not bld.env['ENABLE_NDN_ABSTRACT']:
51# # bld.env['MODULES_NOT_BUILT'].append('NDNabstraction')
52# # return
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080053
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080054# module.source = bld.path.ant_glob(['model/*.cc',
55# 'helper/*.cc'])
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080056
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080057# # if bld.env.ENABLE_EXAMPLES:
58# # bld.add_subdirs('examples')
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080059
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080060# # bld.ns3_python_bindings()
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080061