blob: 52de33fcc511af11ca59e36b4a12ce8dcc48786d [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
3top = '..'
4
5def build(bld):
Alexander Afanasyev28d0d942015-01-04 14:52:19 -08006 # List all .cpp files (whole example should be in one .cpp)
7 for i in bld.path.ant_glob(['*.cpp']):
8 name = str(i)[:-len(".cpp")]
Alexander Afanasyeva1ae0a12014-01-28 15:21:02 -08009 bld(features=['cxx', 'cxxprogram'],
Alexander Afanasyev28d0d942015-01-04 14:52:19 -080010 target=name,
11 source=[i] + bld.path.ant_glob(['%s/**/*.cpp' % name]),
12 use='ndn-cxx',
13 install_path=None
14 )
15
16 # List all directories files (example can has multiple .cpp in the directory)
17 for name in bld.path.ant_glob(['*'], dir=True, src=False):
18 bld(features=['cxx', 'cxxprogram'],
19 target="%s/%s" % (name, name),
20 source=bld.path.ant_glob(['%s/**/*.cpp' % name]),
21 use='ndn-cxx',
22 install_path=None,
23 includes='%s' % name,
Alexander Afanasyev766cea72014-04-24 19:16:42 -070024 )