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. --- src/sim/init.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/sim') diff --git a/src/sim/init.cc b/src/sim/init.cc index 804389dae..66eddfb6f 100644 --- a/src/sim/init.cc +++ b/src/sim/init.cc @@ -200,3 +200,10 @@ m5Main(int argc, char **argv) return 0; } + +PyMODINIT_FUNC +initm5(void) +{ + initM5Python(); + PyImport_ImportModule(PyCC("m5")); +} -- cgit v1.2.3