blob: 6bbe96f20da15c05a713ad02ffcebe32987119e1 [file] [log] [blame]
Alexander Afanasyeva1ae0a12014-01-28 15:21:02 -08001# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2
Alexander Afanasyevfff47d62014-05-11 19:24:46 -07003from waflib import Utils
4
Alexander Afanasyeva1ae0a12014-01-28 15:21:02 -08005top = '..'
6
Yingdi Yu8d7468f2014-02-21 14:49:45 -08007def configure(conf):
8 conf.find_program('sh')
9
Alexander Afanasyeva1ae0a12014-01-28 15:21:02 -080010def build(bld):
Alexander Afanasyev28d0d942015-01-04 14:52:19 -080011 # List all .cpp files (whole tool should be in one .cpp)
12 for i in bld.path.ant_glob(['*.cpp']):
13 name = str(i)[:-len(".cpp")]
Alexander Afanasyeva1ae0a12014-01-28 15:21:02 -080014 bld(features=['cxx', 'cxxprogram'],
Alexander Afanasyev28d0d942015-01-04 14:52:19 -080015 target="../bin/%s" % name,
16 source=[i] + bld.path.ant_glob(['%s/**/*.cpp' % name]),
17 use='ndn-cxx'
Alexander Afanasyev766cea72014-04-24 19:16:42 -070018 )
Yingdi Yu8d7468f2014-02-21 14:49:45 -080019
Alexander Afanasyev28d0d942015-01-04 14:52:19 -080020 # List all directories files (tool can has multiple .cpp in the directory)
21 for name in bld.path.ant_glob(['*'], dir=True, src=False, excl=['wrapper']):
22 bld(features=['cxx', 'cxxprogram'],
23 target="../bin/%s" % name,
24 source=bld.path.ant_glob(['%s/**/*.cpp' % name]),
25 use='ndn-cxx',
26 includes='%s' % name,
27 )
28
29 bld(features="subst",
30 source=bld.path.ant_glob(['wrapper/*.sh']),
31 target=['%s' % node.change_ext('', '.sh')
32 for node in bld.path.ant_glob(['wrapper/*.sh'])],
33 install_path="${BINDIR}",
34 chmod=Utils.O755,
Alexander Afanasyevfff47d62014-05-11 19:24:46 -070035 )