jeraldabraham | f9543a4 | 2014-02-11 06:37:34 -0700 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
Jennica Guan | b82cace | 2017-02-22 12:19:00 +0800 | [diff] [blame] | 2 | |
| 3 | VERSION = '0.1' |
| 4 | APPNAME = 'ndn-traffic-generator' |
| 5 | |
| 6 | from waflib import Utils |
| 7 | import os |
jeraldabraham | f9543a4 | 2014-02-11 06:37:34 -0700 | [diff] [blame] | 8 | |
| 9 | def options(opt): |
Alexander Afanasyev | 740812e | 2014-10-30 15:37:45 -0700 | [diff] [blame] | 10 | opt.load(['compiler_cxx', 'gnu_dirs']) |
Jennica Guan | b82cace | 2017-02-22 12:19:00 +0800 | [diff] [blame] | 11 | opt.load(['default-compiler-flags'], |
| 12 | tooldir=['.waf-tools']) |
jeraldabraham | f9543a4 | 2014-02-11 06:37:34 -0700 | [diff] [blame] | 13 | |
| 14 | def configure(conf): |
Alexander Afanasyev | 740812e | 2014-10-30 15:37:45 -0700 | [diff] [blame] | 15 | conf.load(['compiler_cxx', 'gnu_dirs', |
| 16 | 'default-compiler-flags']) |
Jennica Guan | b82cace | 2017-02-22 12:19:00 +0800 | [diff] [blame] | 17 | |
| 18 | if 'PKG_CONFIG_PATH' not in os.environ: |
| 19 | os.environ['PKG_CONFIG_PATH'] = Utils.subst_vars('${LIBDIR}/pkgconfig', conf.env) |
jeraldabraham | 420dbf0 | 2014-04-25 22:58:31 -0700 | [diff] [blame] | 20 | conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'], |
| 21 | uselib_store='NDN_CXX', mandatory=True) |
jeraldabraham | f9543a4 | 2014-02-11 06:37:34 -0700 | [diff] [blame] | 22 | |
Davide Pesavento | 64cafaa | 2018-05-24 00:50:41 -0400 | [diff] [blame] | 23 | conf.check_compiler_flags() |
| 24 | |
jeraldabraham | 420dbf0 | 2014-04-25 22:58:31 -0700 | [diff] [blame] | 25 | def build(bld): |
Davide Pesavento | 032c980 | 2019-01-25 17:10:26 -0500 | [diff] [blame] | 26 | bld.program(target='ndn-traffic-client', |
Davide Pesavento | 7eaed5c | 2019-01-09 20:03:43 -0500 | [diff] [blame] | 27 | source='src/ndn-traffic-client.cpp', |
| 28 | use='NDN_CXX') |
jeraldabraham | f9543a4 | 2014-02-11 06:37:34 -0700 | [diff] [blame] | 29 | |
Davide Pesavento | 7eaed5c | 2019-01-09 20:03:43 -0500 | [diff] [blame] | 30 | bld.program(target='ndn-traffic-server', |
| 31 | source='src/ndn-traffic-server.cpp', |
| 32 | use='NDN_CXX') |
Alexander Afanasyev | fda32a3 | 2014-03-20 10:50:00 -0700 | [diff] [blame] | 33 | |
| 34 | bld.install_files('${SYSCONFDIR}/ndn', ['ndn-traffic-client.conf.sample', |
| 35 | 'ndn-traffic-server.conf.sample']) |