Alexander Afanasyev | c9f2e25 | 2013-07-14 15:35:21 -0700 | [diff] [blame] | 1 | ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
Alexander Afanasyev | 60c0462 | 2014-12-29 20:43:22 -0800 | [diff] [blame] | 2 | |
| 3 | from waflib import Utils, Logs |
Alexander Afanasyev | f04d451 | 2012-02-14 18:42:47 -0800 | [diff] [blame] | 4 | |
| 5 | def build(bld): |
Alexander Afanasyev | c386644 | 2013-05-05 21:56:46 -0700 | [diff] [blame] | 6 | # This may be necessary for visualizer to work |
| 7 | all_modules = [mod[len("ns3-"):] for mod in bld.env['NS3_ENABLED_MODULES']] |
| 8 | |
Spyridon Mastorakis | f34b319 | 2015-02-16 17:42:01 -0800 | [diff] [blame] | 9 | examples = bld.path.ant_glob(['*.cpp'], excl=['*-mpi.cpp']) |
| 10 | if 'NS3_MPI' in bld.env['DEFINES_MPI']: |
| 11 | examples += bld.path.ant_glob(['*-mpi.cpp']) |
| 12 | |
| 13 | for i in examples: |
Alexander Afanasyev | 77f84c6 | 2018-10-08 13:37:42 -0400 | [diff] [blame] | 14 | name = i.change_ext('').path_from(bld.path.get_bld()) |
Alexander Afanasyev | 60c0462 | 2014-12-29 20:43:22 -0800 | [diff] [blame] | 15 | obj = bld.create_ns3_program(name, all_modules) |
| 16 | obj.source = [i] + bld.path.ant_glob(['%s/**/*.cpp' % name]) |
Alexander Afanasyev | f04d451 | 2012-02-14 18:42:47 -0800 | [diff] [blame] | 17 | |