blob: 5dc6b4b1f68bff7866bbf8ca2ad22b8dfe666a90 [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 Afanasyev77f84c62018-10-08 13:37:42 -040014 name = i.change_ext('').path_from(bld.path.get_bld())
Alexander Afanasyev60c04622014-12-29 20:43:22 -080015 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