From a589eb4053d9a902f9e9047830955963aec94e64 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Thu, 9 Oct 2008 04:58:23 -0700 Subject: SCons: add code to provide a libm5 shared library. Targets look like libm5_debug.so. This target can be dynamically linked into another C++ program and provide just about all of the M5 features. Additionally, this library is a standalone module that can be imported into python with an "import libm5_debug" type command line. --- ext/libelf/SConscript | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ext/libelf') diff --git a/ext/libelf/SConscript b/ext/libelf/SConscript index 3db526c13..ab85308de 100644 --- a/ext/libelf/SConscript +++ b/ext/libelf/SConscript @@ -110,7 +110,10 @@ m4env.M4(target=File('libelf_fsize.c'), source=[File('elf_types.m4'), File('libelf_fsize.m4')]) m4env.M4(target=File('libelf_msize.c'), source=[File('elf_types.m4'), File('libelf_msize.m4')]) -m4env.Library('elf', elf_files) + +# Build libelf as a static library with PIC code so it can be linked +# into either m5 or the library +m4env.Library('elf', [m4env.SharedObject(f) for f in elf_files]) env.Append(CPPPATH=Dir('.')) env.Append(LIBS=['elf']) -- cgit v1.2.3