diff -r 1a3cdef3218d build.py --- a/build.py Fri Oct 06 20:17:53 2006 +0200 +++ b/build.py Mon Oct 23 13:50:44 2006 +0200 @@ -247,6 +247,11 @@ class Ns3: env.Append (CPPPATH=[cpp_path]) header_dir = os.path.join (build_root, 'include', 'ns3') lib_path = os.path.join (build_root, 'lib') + + if env['PLATFORM'] == 'posix': + env.Append( LINKFLAGS = ' -z origin' ) + env.Append( RPATH=env.Literal(os.path.join('\\$$ORIGIN', os.pardir, 'lib')) ) + module_builders = [] for module in self.__modules: objects = self.get_obj_builders (variant, module) @@ -254,12 +259,7 @@ class Ns3: filename = self.get_mod_output (module, variant) if module.executable: - if env['PLATFORM'] == 'posix': - module_builder = env.Program (target = filename, source = objects, - LIBPATH=lib_path, LIBS=libs, - RPATH=lib_path) - else: - module_builder = env.Program (target = filename, source = objects, + module_builder = env.Program (target = filename, source = objects, LIBPATH=lib_path, LIBS=libs) else: if variant.static: