blob: 960ffb0d07280e116e2210ce388ed3dca8ff1f7c [file] [log] [blame]
jeraldabrahamf9543a42014-02-11 06:37:34 -07001# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
Jennica Guanb82cace2017-02-22 12:19:00 +08002
3VERSION = '0.1'
4APPNAME = 'ndn-traffic-generator'
5
6from waflib import Utils
7import os
jeraldabrahamf9543a42014-02-11 06:37:34 -07008
9def options(opt):
Alexander Afanasyev740812e2014-10-30 15:37:45 -070010 opt.load(['compiler_cxx', 'gnu_dirs'])
Jennica Guanb82cace2017-02-22 12:19:00 +080011 opt.load(['default-compiler-flags'],
12 tooldir=['.waf-tools'])
jeraldabrahamf9543a42014-02-11 06:37:34 -070013
14def configure(conf):
Alexander Afanasyev740812e2014-10-30 15:37:45 -070015 conf.load(['compiler_cxx', 'gnu_dirs',
16 'default-compiler-flags'])
Jennica Guanb82cace2017-02-22 12:19:00 +080017
18 if 'PKG_CONFIG_PATH' not in os.environ:
19 os.environ['PKG_CONFIG_PATH'] = Utils.subst_vars('${LIBDIR}/pkgconfig', conf.env)
jeraldabraham420dbf02014-04-25 22:58:31 -070020 conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'],
21 uselib_store='NDN_CXX', mandatory=True)
jeraldabrahamf9543a42014-02-11 06:37:34 -070022
Davide Pesavento64cafaa2018-05-24 00:50:41 -040023 conf.check_compiler_flags()
24
jeraldabraham420dbf02014-04-25 22:58:31 -070025def build(bld):
Davide Pesavento032c9802019-01-25 17:10:26 -050026 bld.program(target='ndn-traffic-client',
Davide Pesavento7eaed5c2019-01-09 20:03:43 -050027 source='src/ndn-traffic-client.cpp',
28 use='NDN_CXX')
jeraldabrahamf9543a42014-02-11 06:37:34 -070029
Davide Pesavento7eaed5c2019-01-09 20:03:43 -050030 bld.program(target='ndn-traffic-server',
31 source='src/ndn-traffic-server.cpp',
32 use='NDN_CXX')
Alexander Afanasyevfda32a32014-03-20 10:50:00 -070033
34 bld.install_files('${SYSCONFDIR}/ndn', ['ndn-traffic-client.conf.sample',
35 'ndn-traffic-server.conf.sample'])