merge with trunk
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Wed, 29 Aug 2007 09:36:28 +0200
changeset 1309 039265895a2e
parent 1308 5c5937a4150d (current diff)
parent 1307 fa2e8988fda7 (diff)
child 1311 5710e4388a79
merge with trunk
--- a/src/wscript	Wed Aug 29 09:35:53 2007 +0200
+++ b/src/wscript	Wed Aug 29 09:36:28 2007 +0200
@@ -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	Wed Aug 29 09:35:53 2007 +0200
+++ b/wscript	Wed Aug 29 09:36:28 2007 +0200
@@ -145,6 +145,9 @@
 
 
 def build(bld):
+    print "Entering directory `%s/build'" % Params.g_build.m_curdirnode.abspath()
+    Params.g_cwd_launch = Params.g_build.m_curdirnode.abspath()
+
     bld.create_ns3_program = types.MethodType(create_ns3_program, bld)
 
     variant_name = bld.env_of_name('default')['NS3_ACTIVE_VARIANT']
@@ -165,6 +168,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