summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-23 21:12:18 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-24 18:14:46 (GMT)
commit442420335b9533b2a43c6e3f09758a94af045a84 (patch)
tree3fa350e115340f7db4dfbf1a4aa5845bf4a724c5 /3rdParty/Lua/SConscript
parentf0142e0ea71a1f89b8c46ab6bde7e188c0bc79f4 (diff)
downloadswift-contrib-442420335b9533b2a43c6e3f09758a94af045a84.zip
swift-contrib-442420335b9533b2a43c6e3f09758a94af045a84.tar.bz2
Added initial version of Sluift.
Diffstat (limited to '3rdParty/Lua/SConscript')
-rw-r--r--3rdParty/Lua/SConscript72
1 files changed, 72 insertions, 0 deletions
diff --git a/3rdParty/Lua/SConscript b/3rdParty/Lua/SConscript
new file mode 100644
index 0000000..9d0315e
--- /dev/null
+++ b/3rdParty/Lua/SConscript
@@ -0,0 +1,72 @@
+Import(["env", "conf_env"])
+
+if env.get("LUA_BUNDLED", False) :
+
+################################################################################
+# Module flags
+################################################################################
+
+ if env["SCONS_STAGE"] == "flags" :
+ cppdefines = []
+ if env["PLATFORM"] == "win32" :
+ pass
+ elif env["PLATFORM"] == "darwin" :
+ cppdefines = ["LUA_USE_POSIX", "LUA_USE_DLOPEN"]
+ else :
+ cppdefines = ["LUA_USE_POSIX", "LUA_USE_DLOPEN"]
+
+ env["LUA_FLAGS"] = {
+ "CPPDEFINES": cppdefines,
+ "CPPPATH": [Dir("src")],
+ "LIBPATH": [Dir(".")],
+ "LIBS": ["Swiften_Lua"],
+ }
+
+################################################################################
+# Build
+################################################################################
+
+ if env["SCONS_STAGE"] == "build" :
+ myenv = env.Clone()
+
+ # Remove warn flags
+ myenv.Replace(CCFLAGS = [flag for flag in env["CCFLAGS"] if flag not in ["-W", "-Wall"]])
+
+ myenv.MergeFlags(myenv["LUA_FLAGS"])
+ myenv.StaticLibrary("Swiften_Lua", [
+ "src/lapi.c",
+ "src/lcode.c",
+ "src/ldebug.c",
+ "src/ldo.c",
+ "src/ldump.c",
+ "src/lfunc.c",
+ "src/lgc.c",
+ "src/llex.c",
+ "src/lmem.c",
+ "src/lobject.c",
+ "src/lopcodes.c",
+ "src/lparser.c",
+ "src/lstate.c",
+ "src/lstring.c",
+ "src/ltable.c",
+ "src/ltm.c",
+ "src/lundump.c",
+ "src/lvm.c",
+ "src/lzio.c",
+ "src/lauxlib.c",
+ "src/lbaselib.c",
+ "src/ldblib.c",
+ "src/liolib.c",
+ "src/lmathlib.c",
+ "src/loslib.c",
+ "src/ltablib.c",
+ "src/lstrlib.c",
+ "src/loadlib.c",
+ ])
+
+ lua_env = myenv.Clone()
+ lua_env.MergeFlags(lua_env["LUA_FLAGS"])
+ lua_env.Program("lua", [
+ "src/linit.c",
+ "src/lua.c",
+ ])