src/wscript
changeset 1858 68e1964c19e8
parent 1747 abbefda4216a
child 1877 b2ebc493cd58
child 2158 1bae76be026d
--- a/src/wscript	Fri Nov 16 08:47:17 2007 +0100
+++ b/src/wscript	Tue Nov 20 18:27:43 2007 +0000
@@ -36,19 +36,28 @@
                          " specific platforms, such as Linux and Solaris)"),
                    action="store_true", dest='enable_rpath', default=False)
 
+    opt.add_option('--enable-modules',
+                   help=("Build only these modules (and dependencies)"),
+                   dest='enable_modules')
+
 
 def configure(conf):
     conf.sub_config('core')
     conf.sub_config('simulator')
 
     blddir = os.path.abspath(os.path.join(conf.m_blddir, conf.env.variant()))
-    conf.env['NS3_MODULE_PATH'] = [os.path.join(blddir)]
+    conf.env['NS3_MODULE_PATH'] = [os.path.join(blddir, 'lib')]
     if Params.g_options.enable_rpath:
         conf.env.append_value('RPATH', '-Wl,-rpath=%s' % (os.path.join(blddir),))
 
     ## Used to link the 'run-tests' program with all of ns-3 code
     conf.env['NS3_MODULES'] = ['ns3-' + module.split('/')[-1] for module in all_modules]
 
+    if Params.g_options.enable_modules:
+        conf.env['NS3_ENABLED_MODULES'] = ['ns3-'+mod for mod in
+                                           Params.g_options.enable_modules.split(',')]
+
+
 def create_ns3_module(bld, name, dependencies=()):
     module = bld.create_obj('cpp', 'objects')
     module.name = 'ns3-' + name