From b00c5e751e58b0add9888086fbe5602e70c4ff51 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Wed, 22 Apr 2009 13:06:22 +0200 Subject: [PATCH] enable static libns3 builds for python module --- bindings/python/wscript | 4 ++++ wscript | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bindings/python/wscript b/bindings/python/wscript index d33fdf381..6d39fe62d 100644 --- a/bindings/python/wscript +++ b/bindings/python/wscript @@ -445,6 +445,10 @@ def build(bld): pymod.target = 'ns3/_ns3' pymod.name = 'ns3module' pymod.uselib_local = "ns3" + if pymod.env['ENABLE_STATIC_NS3']: + pymod.env.append_value('LINKFLAGS', '-Wl,--whole-archive,-Bstatic') + pymod.env.append_value('LINKFLAGS', '-lns3') + pymod.env.append_value('LINKFLAGS', '-Wl,-Bdynamic,--no-whole-archive') defines = list(pymod.env['CXXDEFINES']) defines.extend(['NS_DEPRECATED=', 'NS3_DEPRECATED_H']) diff --git a/wscript b/wscript index 1be89ff62..fdcc6e1bf 100644 --- a/wscript +++ b/wscript @@ -291,7 +291,6 @@ def configure(conf): conf.find_program('valgrind', var='VALGRIND') if Options.options.enable_static and \ - not conf.env['ENABLE_PYTHON_BINDINGS'] and \ env['PLATFORM'].startswith('linux'): conf.env['ENABLE_STATIC_NS3'] = Options.options.enable_static