Alexander Afanasyev | c3d2990 | 2018-06-29 18:20:55 -0400 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
| 2 | |
| 3 | top = '..' |
| 4 | |
| 5 | def build(bld): |
Davide Pesavento | d4689c8 | 2021-10-07 02:53:03 -0400 | [diff] [blame] | 6 | # List all .cpp files (whole example in one .cpp) |
| 7 | for ex in bld.path.ant_glob('*.cpp'): |
| 8 | name = ex.change_ext('').path_from(bld.path.get_bld()) |
| 9 | bld.program(name='example-%s' % name, |
| 10 | target='nac-%s' % name, |
| 11 | source=[ex], |
| 12 | use='libndn-nac', |
| 13 | install_path=None) |
Alexander Afanasyev | c3d2990 | 2018-06-29 18:20:55 -0400 | [diff] [blame] | 14 | |
Davide Pesavento | d4689c8 | 2021-10-07 02:53:03 -0400 | [diff] [blame] | 15 | # List all directories (example can have multiple .cpp in the directory) |
| 16 | for subdir in bld.path.ant_glob('*', dir=True, src=False): |
Alexander Afanasyev | c3d2990 | 2018-06-29 18:20:55 -0400 | [diff] [blame] | 17 | name = subdir.path_from(bld.path) |
Davide Pesavento | d4689c8 | 2021-10-07 02:53:03 -0400 | [diff] [blame] | 18 | bld.program(name='example-%s' % name, |
| 19 | target=name, |
| 20 | source=subdir.ant_glob('**/*.cpp'), |
| 21 | use='libndn-nac', |
| 22 | includes=name, |
| 23 | install_path=None) |