Junxiao Shi | f719124 | 2015-03-19 05:53:41 -0700 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
| 2 | import os |
| 3 | |
| 4 | VERSION='0.1' |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 5 | APPNAME='ndn-tools' |
Junxiao Shi | f719124 | 2015-03-19 05:53:41 -0700 | [diff] [blame] | 6 | |
| 7 | def options(opt): |
| 8 | opt.load(['compiler_cxx', 'gnu_dirs']) |
Junxiao Shi | 2222a61 | 2015-06-06 08:01:38 -0700 | [diff] [blame] | 9 | opt.load(['default-compiler-flags', 'sphinx_build', 'boost'], tooldir=['.waf-tools']) |
Junxiao Shi | f719124 | 2015-03-19 05:53:41 -0700 | [diff] [blame] | 10 | |
| 11 | def configure(conf): |
| 12 | conf.load(['compiler_cxx', 'gnu_dirs', |
Junxiao Shi | 2222a61 | 2015-06-06 08:01:38 -0700 | [diff] [blame] | 13 | 'default-compiler-flags', 'sphinx_build', 'boost']) |
Junxiao Shi | f719124 | 2015-03-19 05:53:41 -0700 | [diff] [blame] | 14 | |
| 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 Shi | 2222a61 | 2015-06-06 08:01:38 -0700 | [diff] [blame] | 23 | conf.check_boost(lib='system iostreams regex') |
| 24 | |
Junxiao Shi | f719124 | 2015-03-19 05:53:41 -0700 | [diff] [blame] | 25 | conf.recurse('tools') |
| 26 | |
| 27 | def build(bld): |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 28 | bld.env['VERSION'] = VERSION |
| 29 | |
Junxiao Shi | f719124 | 2015-03-19 05:53:41 -0700 | [diff] [blame] | 30 | 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 Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 40 | bld.recurse('manpages') |