diff options
author | Nathan Binkert <nate@binkert.org> | 2008-10-09 04:58:23 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2008-10-09 04:58:23 -0700 |
commit | a589eb4053d9a902f9e9047830955963aec94e64 (patch) | |
tree | 632750baf207005392f7cfc7ab170576dc04d18c /src/sim | |
parent | 0b83563a9c7368ffdb82d70054ceda3cb7f3828f (diff) | |
download | gem5-a589eb4053d9a902f9e9047830955963aec94e64.tar.xz |
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.
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/init.cc | 7 |
1 files changed, 7 insertions, 0 deletions
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")); +} |