summaryrefslogtreecommitdiffstats
path: root/Sluift
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-03-01 20:29:51 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-03-01 20:29:51 (GMT)
commit48389cafdbf211d70fa56f453c6d3b652482a139 (patch)
tree1605d755328795d22291b96dda4ad45e70960eec /Sluift
parentca3f25d09a703ff7c27267a5591ce5379886e1c9 (diff)
downloadswift-48389cafdbf211d70fa56f453c6d3b652482a139.zip
swift-48389cafdbf211d70fa56f453c6d3b652482a139.tar.bz2
Fixed linking order.
Diffstat (limited to 'Sluift')
-rw-r--r--Sluift/SConscript29
1 files changed, 15 insertions, 14 deletions
diff --git a/Sluift/SConscript b/Sluift/SConscript
index 816c234..eeb2f24 100644
--- a/Sluift/SConscript
+++ b/Sluift/SConscript
@@ -1,7 +1,16 @@
Import(["env", "conf_env"])
if env["SCONS_STAGE"] == "build" :
+ lib_env = env.Clone()
+ lib_env.UseFlags(env["LUA_FLAGS"])
+ lib_env.UseFlags(env["SWIFTEN_FLAGS"])
+ lib_env.UseFlags(env["SWIFTEN_DEP_FLAGS"])
+ sluift_lib = lib_env.StaticLibrary("SluiftCore", [
+ "sluift.cpp"
+ ]);
+
myenv = env.Clone()
+ myenv.Append(LIBS = sluift_lib)
myenv.UseFlags(env["LUA_FLAGS"])
myenv.UseFlags(env["SWIFTEN_FLAGS"])
myenv.UseFlags(env["SWIFTEN_DEP_FLAGS"])
@@ -11,10 +20,6 @@ if env["SCONS_STAGE"] == "build" :
elif myenv["PLATFORM"] == "darwin" :
myenv["SHLIBSUFFIX"] = ".so"
- sluift_lib = myenv.StaticLibrary("SluiftCore", [
- "sluift.cpp"
- ]);
-
def patchLua(env, target, source) :
f = open(source[0].abspath, "r")
contents = f.read()
@@ -25,17 +30,13 @@ if env["SCONS_STAGE"] == "build" :
f.write(contents)
f.close()
- sluift_bin_env = myenv.Clone()
- sluift_bin_env.Append(LIBS = sluift_lib)
- sluift_bin_env.Command("lua.c", ["#/3rdParty/Lua/src/lua.c"], env.Action(patchLua, cmdstr = "$GENCOMSTR"))
- if sluift_bin_env.get("HAVE_READLINE", False) :
- sluift_bin_env.Append(CPPDEFINES = ["LUA_USE_READLINE"])
- sluift_bin_env.MergeFlags(sluift_bin_env["READLINE_FLAGS"])
- env["SLUIFT"] = sluift_bin_env.Program("sluift", [
+ myenv.Command("lua.c", ["#/3rdParty/Lua/src/lua.c"], env.Action(patchLua, cmdstr = "$GENCOMSTR"))
+ if myenv.get("HAVE_READLINE", False) :
+ myenv.Append(CPPDEFINES = ["LUA_USE_READLINE"])
+ myenv.MergeFlags(myenv["READLINE_FLAGS"])
+ env["SLUIFT"] = myenv.Program("sluift", [
"lua.c",
"linit.c",
])
- sluift_dll_env = myenv.Clone()
- sluift_dll_env.Append(LIBS = sluift_lib)
- sluift_dll_env.SharedLibrary("sluift", []);
+ myenv.SharedLibrary("sluift", []);