blob: c62e6f2ff2f28512c9a89177a5d86d018fdbbb0d [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 Afanasyev7a696fb2012-03-01 17:17:22 -080013
Alexander Afanasyeve76f2632012-03-05 00:18:42 -080014 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 Afanasyev7a696fb2012-03-01 17:17:22 -080019def build (bld):
Alexander Afanasyevec1d4a72012-03-05 11:06:54 -080020 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 Afanasyeve76f2632012-03-05 00:18:42 -080029
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080030# def build_ns3 (bld):
31# deps = ['core', 'network', 'NDNabstraction']
32# if bld.env['ENABLE_PYTHON_BINDINGS']:
33# deps.append ('visualizer')
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080034
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080035# module = bld.create_ns3_module ('sync', deps)
36# module.uselib = 'BOOST BOOST_IOSTREAMS SSL'
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080037
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080038# # tests = bld.create_ns3_module_test_library('sync')
39# # tests.source = [
40# # 'test/sync-test-suite.cc',
41# # ]
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080042
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080043# headers = bld.new_task_gen(features=['ns3header'])
44# headers.module = 'sync'
45# headers.source = [
46# 'model/sync-app.h',
47# ]
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080048
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080049# # if not bld.env['ENABLE_NDN_ABSTRACT']:
50# # bld.env['MODULES_NOT_BUILT'].append('NDNabstraction')
51# # return
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080052
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080053# module.source = bld.path.ant_glob(['model/*.cc',
54# 'helper/*.cc'])
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080055
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080056# # if bld.env.ENABLE_EXAMPLES:
57# # bld.add_subdirs('examples')
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080058
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080059# # bld.ns3_python_bindings()
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080060