Build the ns3 library in the build/<variant> root, not in build/<variant>/src.
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Tue, 28 Aug 2007 16:53:01 +0100
changeset 1306 8834e434187f
parent 1305 27dd3e15308a
child 1307 fa2e8988fda7
Build the ns3 library in the build/<variant> root, not in build/<variant>/src.
src/wscript
wscript
--- a/src/wscript	Tue Aug 28 10:20:13 2007 -0400
+++ b/src/wscript	Tue Aug 28 16:53:01 2007 +0100
@@ -39,11 +39,9 @@
     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, 'src')]
-    for module in all_modules:
-        module_path = os.path.join(blddir, 'src', module)
-        if Params.g_options.enable_rpath:
-            conf.env.append_value('RPATH', '-Wl,-rpath=%s' % (module_path,))
+    conf.env['NS3_MODULE_PATH'] = [os.path.join(blddir)]
+    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]
@@ -64,12 +62,6 @@
     
     bld.add_subdirs(list(all_modules))
 
-    ## Create a single ns3 library containing all modules
-    lib = bld.create_obj('cpp', 'shlib')
-    lib.name = 'ns3'
-    lib.target = 'ns3'
-    lib.add_objects = list(bld.env_of_name('default')['NS3_MODULES'])
-
 
 class Ns3Header(Object.genobj):
     """A set of NS-3 header files"""
--- a/wscript	Tue Aug 28 10:20:13 2007 -0400
+++ b/wscript	Tue Aug 28 16:53:01 2007 +0100
@@ -165,6 +165,11 @@
     bld.add_subdirs('src')
     bld.add_subdirs('samples utils examples')
 
+    ## Create a single ns3 library containing all modules
+    lib = bld.create_obj('cpp', 'shlib')
+    lib.name = 'ns3'
+    lib.target = 'ns3'
+    lib.add_objects = list(bld.env_of_name('default')['NS3_MODULES'])
 
 def shutdown():
     #import UnitTest