blob: 0b5aee1bb74d264c62fdf463cb873a48f02c3381 [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 Shi2222a612015-06-06 08:01:38 -07009 opt.load(['default-compiler-flags', 'sphinx_build', 'boost'], tooldir=['.waf-tools'])
Junxiao Shif7191242015-03-19 05:53:41 -070010
11def configure(conf):
12 conf.load(['compiler_cxx', 'gnu_dirs',
Junxiao Shi2222a612015-06-06 08:01:38 -070013 'default-compiler-flags', 'sphinx_build', 'boost'])
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
Junxiao Shi2222a612015-06-06 08:01:38 -070023 conf.check_boost(lib='system iostreams regex')
24
Junxiao Shif7191242015-03-19 05:53:41 -070025 conf.recurse('tools')
26
27def build(bld):
Junxiao Shi2219a052015-05-28 02:53:48 -070028 bld.env['VERSION'] = VERSION
29
Junxiao Shif7191242015-03-19 05:53:41 -070030 bld(
31 target='core-objects',
32 name='core-objects',
33 features='cxx',
34 source=bld.path.ant_glob(['core/*.cpp']),
35 use='NDN_CXX',
36 export_includes='.',
37 )
38
39 bld.recurse('tools')
Junxiao Shi2219a052015-05-28 02:53:48 -070040 bld.recurse('manpages')