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 | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 9 | opt.load(['default-compiler-flags', 'sphinx_build'], 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 | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 13 | 'default-compiler-flags', 'sphinx_build']) |
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 | |
| 23 | conf.recurse('tools') |
| 24 | |
| 25 | def build(bld): |
Junxiao Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 26 | bld.env['VERSION'] = VERSION |
| 27 | |
Junxiao Shi | f719124 | 2015-03-19 05:53:41 -0700 | [diff] [blame] | 28 | 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 Shi | 2219a05 | 2015-05-28 02:53:48 -0700 | [diff] [blame] | 38 | bld.recurse('manpages') |