blob: 20711d2bfc70a4a26172bfd11564373d01ecc6d4 [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):
26 bld.program(
jeraldabraham420dbf02014-04-25 22:58:31 -070027 target='ndn-traffic',
28 source='src/ndn-traffic-client.cpp',
Davide Pesavento29db0fd2017-08-29 13:32:00 -040029 use='NDN_CXX')
jeraldabrahamf9543a42014-02-11 06:37:34 -070030
jeraldabraham420dbf02014-04-25 22:58:31 -070031 bld.program(
jeraldabraham420dbf02014-04-25 22:58:31 -070032 target='ndn-traffic-server',
33 source='src/ndn-traffic-server.cpp',
Davide Pesavento29db0fd2017-08-29 13:32:00 -040034 use='NDN_CXX')
Alexander Afanasyevfda32a32014-03-20 10:50:00 -070035
36 bld.install_files('${SYSCONFDIR}/ndn', ['ndn-traffic-client.conf.sample',
37 'ndn-traffic-server.conf.sample'])