blob: 900bc17047f3148babbe308f728e59ce9c4f893e [file] [log] [blame]
Junxiao Shif7191242015-03-19 05:53:41 -07001# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2import os
3
4VERSION='0.1'
Junxiao Shi2219a052015-05-28 02:53:48 -07005APPNAME='ndn-tools'
Junxiao Shif7191242015-03-19 05:53:41 -07006
7def options(opt):
8 opt.load(['compiler_cxx', 'gnu_dirs'])
Junxiao Shi2219a052015-05-28 02:53:48 -07009 opt.load(['default-compiler-flags', 'sphinx_build'], tooldir=['.waf-tools'])
Junxiao Shif7191242015-03-19 05:53:41 -070010
11def configure(conf):
12 conf.load(['compiler_cxx', 'gnu_dirs',
Junxiao Shi2219a052015-05-28 02:53:48 -070013 'default-compiler-flags', 'sphinx_build'])
Junxiao Shif7191242015-03-19 05:53:41 -070014
15 if not os.environ.has_key('PKG_CONFIG_PATH'):
16 os.environ['PKG_CONFIG_PATH'] = ':'.join([
17 '/usr/lib/pkgconfig',
18 '/usr/local/lib/pkgconfig',
19 '/opt/local/lib/pkgconfig'])
20 conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'],
21 uselib_store='NDN_CXX', mandatory=True)
22
23 conf.recurse('tools')
24
25def build(bld):
Junxiao Shi2219a052015-05-28 02:53:48 -070026 bld.env['VERSION'] = VERSION
27
Junxiao Shif7191242015-03-19 05:53:41 -070028 bld(
29 target='core-objects',
30 name='core-objects',
31 features='cxx',
32 source=bld.path.ant_glob(['core/*.cpp']),
33 use='NDN_CXX',
34 export_includes='.',
35 )
36
37 bld.recurse('tools')
Junxiao Shi2219a052015-05-28 02:53:48 -070038 bld.recurse('manpages')