diff options
Diffstat (limited to 'SConscript')
-rw-r--r-- | SConscript | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/SConscript b/SConscript index 444f71afe..7f9e56f70 100644 --- a/SConscript +++ b/SConscript @@ -28,6 +28,7 @@ import os import sys +from os.path import isdir # This file defines how to build a particular configuration of M5 # based on variable settings in the 'env' build environment. @@ -187,6 +188,9 @@ base_sources = Split(''' mem/trace/mem_trace_writer.cc mem/trace/m5_writer.cc + python/pyconfig.cc + python/embedded_py.cc + sim/builder.cc sim/configfile.cc sim/debug.cc @@ -203,8 +207,6 @@ base_sources = Split(''' sim/stat_control.cc sim/trace_context.cc sim/universe.cc - sim/pyconfig/pyconfig.cc - sim/pyconfig/embedded_py.cc ''') # MySql sources @@ -340,18 +342,17 @@ else: extra_libraries = [] env.Append(LIBS=['z']) -if env['USE_MYSQL']: +if isdir('/usr/lib64/mysql') or isdir('/usr/lib/mysql') or \ + isdir('/usr/local/lib/mysql'): + print 'Compiling with MySQL support!' + env.Append(LIBPATH=['/usr/lib64/mysql', '/usr/local/lib/mysql/', + '/usr/lib/mysql']) + env.Append(CPPPATH=['/usr/local/include/mysql', '/usr/include/mysql']) sources += mysql_sources env.Append(CPPDEFINES = 'USE_MYSQL') env.Append(CPPDEFINES = 'STATS_BINNING') - env.Append(CPPPATH=['/usr/local/include/mysql', '/usr/include/mysql']) - if os.path.isdir('/usr/lib64'): - env.Append(LIBPATH=['/usr/lib64/mysql']) - else: - env.Append(LIBPATH=['/usr/lib/mysql/']) env.Append(LIBS=['mysqlclient']) - ################################################### # # Special build rules. @@ -380,8 +381,8 @@ env.Command(Split('''arch/alpha/decoder.cc # SConscript-local is the per-config build, which just copies some # header files into a place where they can be found. SConscript('libelf/SConscript-local', exports = 'env', duplicate=0) -SConscript('sim/pyconfig/SConscript', exports = ['env'], duplicate=0) - +SConscript('python/SConscript', exports = ['env'], duplicate=0) +SConscript('simobj/SConscript', exports = 'env', duplicate=0) # This function adds the specified sources to the given build # environment, and returns a list of all the corresponding SCons |