blob: c1eb9c3b97caa3f55b03f77b9ae009590cb7da27 [file] [log] [blame]
Alexander Afanasyevc9f2e252013-07-14 15:35:21 -07001## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
Alexander Afanasyev60c04622014-12-29 20:43:22 -08002
3from waflib import Utils, Logs
Alexander Afanasyevf04d4512012-02-14 18:42:47 -08004
5def build(bld):
Alexander Afanasyevc3866442013-05-05 21:56:46 -07006 # This may be necessary for visualizer to work
7 all_modules = [mod[len("ns3-"):] for mod in bld.env['NS3_ENABLED_MODULES']]
8
Spyridon Mastorakisf34b3192015-02-16 17:42:01 -08009 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 Afanasyev60c04622014-12-29 20:43:22 -080014 name = str(i)[:-len(".cpp")]
15 obj = bld.create_ns3_program(name, all_modules)
16 obj.source = [i] + bld.path.ant_glob(['%s/**/*.cpp' % name])
Alexander Afanasyevf04d4512012-02-14 18:42:47 -080017