summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2004-08-16 14:20:20 -0400
committerNathan Binkert <binkertn@umich.edu>2004-08-16 14:20:20 -0400
commita5fefbe07fa264b9be4be6f6f25834bca94ba2c6 (patch)
treec4d125ead0530128c27cfd48508c229f902f01fc
parent8295a8050c1096dc560f4976724adada810e56e1 (diff)
downloadgem5-a5fefbe07fa264b9be4be6f6f25834bca94ba2c6.tar.xz
Make the mysql stuff work with scons
SConscript: Make the mysql stuff work. Add specific support to statically link in the mysql client on linux machines so that we don't need to worry about what's installed on the pool. --HG-- extra : convert_revision : 2317c3163cefc8e4d857929e313afd53c616e2a5
-rw-r--r--SConscript9
1 files changed, 9 insertions, 0 deletions
diff --git a/SConscript b/SConscript
index 10722007a..19bb0f2bd 100644
--- a/SConscript
+++ b/SConscript
@@ -377,8 +377,16 @@ else:
sources += syscall_emulation_sources
obj_desc_files += syscall_emulation_obj_desc_files
+extra_libraries = []
if env['USE_MYSQL']:
sources += mysql_sources
+ env.Append(CPPPATH=['/usr/local/include/mysql', '/usr/include/mysql'])
+ env.Append(LIBS=['z'])
+ if sys.platform.lower().startswith('linux'):
+ extra_libraries.append('/usr/lib/mysql/libmysqlclient.a')
+ else:
+ env.Append(LIBS=['mysql'])
+ env.Append(LIBPATH=['/usr/local/lib/mysql/'])
###################################################
#
@@ -442,6 +450,7 @@ def make_objs(sources, env):
date_obj = env.Object('base/date.cc')
env.Depends(date_obj, objs)
objs.append(date_obj)
+ objs.extend(extra_libraries)
return objs
###################################################