Alexander Afanasyev | 4ffcff2 | 2014-09-02 15:39:20 -0700 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
| 2 | |
Shock Jiang | 0b165f4 | 2014-10-24 09:08:09 -0700 | [diff] [blame] | 3 | import os.path |
| 4 | |
Alexander Afanasyev | 4ffcff2 | 2014-09-02 15:39:20 -0700 | [diff] [blame] | 5 | top = '..' |
| 6 | |
| 7 | def build(bld): |
Shock Jiang | 0b165f4 | 2014-10-24 09:08:09 -0700 | [diff] [blame] | 8 | for app in bld.path.ant_glob('**/*', dir=True): |
Alexander Afanasyev | 4ffcff2 | 2014-09-02 15:39:20 -0700 | [diff] [blame] | 9 | if os.path.isdir(app.abspath()): |
| 10 | bld(features=['cxx', 'cxxprogram'], |
Alexander Afanasyev | 1364494 | 2016-12-27 10:55:15 -0800 | [diff] [blame^] | 11 | target = '../bin/%s' % app.path_from(bld.path), |
Alexander Afanasyev | 4ffcff2 | 2014-09-02 15:39:20 -0700 | [diff] [blame] | 12 | source = app.ant_glob(['**/*.cpp']), |
| 13 | use = 'ndns-objects', |
| 14 | ) |
| 15 | |
Shock Jiang | 0b165f4 | 2014-10-24 09:08:09 -0700 | [diff] [blame] | 16 | for app in bld.path.ant_glob('**/*.cpp'): |
Alexander Afanasyev | 1364494 | 2016-12-27 10:55:15 -0800 | [diff] [blame^] | 17 | name = app.path_from(bld.path)[:-len(".cpp")] |
Shock Jiang | 0b165f4 | 2014-10-24 09:08:09 -0700 | [diff] [blame] | 18 | bld(features=['cxx', 'cxxprogram'], |
Alexander Afanasyev | 1364494 | 2016-12-27 10:55:15 -0800 | [diff] [blame^] | 19 | target = '../bin/%s' % name, |
Alexander Afanasyev | 4ffcff2 | 2014-09-02 15:39:20 -0700 | [diff] [blame] | 20 | source = app, |
| 21 | use = 'ndns-objects', |
| 22 | ) |