diff options
author | Remko Tronçon <git@el-tramo.be> | 2013-08-16 21:11:56 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2013-08-17 09:32:03 (GMT) |
commit | 92ffd5b909badeafabbf73b73a6946a5440c8be5 (patch) | |
tree | a33a6086ace038c63751403ae29573ae161846b2 /Sluift/SConscript | |
parent | ac6ff12e174b832326c6d89784d4c5e53044eecf (diff) | |
download | swift-92ffd5b909badeafabbf73b73a6946a5440c8be5.zip swift-92ffd5b909badeafabbf73b73a6946a5440c8be5.tar.bz2 |
Fix building sluift as .dll on Mac OS X.
Change-Id: Ia8043d66ef676048e7fe1d0347b65e8d64aa3bd5
Diffstat (limited to 'Sluift/SConscript')
-rw-r--r-- | Sluift/SConscript | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/Sluift/SConscript b/Sluift/SConscript index 2c247d8..af3cf8c 100644 --- a/Sluift/SConscript +++ b/Sluift/SConscript @@ -8,17 +8,13 @@ if env["SCONS_STAGE"] == "build" and not GetOption("help") and not env.get("HAVE env["PROJECTS"].remove("Sluift") elif 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", [ - "Lua/Value.cpp", - "sluift.cpp" - ]); + sluift_sources = [ + "Lua/Value.cpp", + "ClientHelpers.cpp", + "sluift.cpp" + ] myenv = env.Clone() - myenv.Append(LIBS = sluift_lib) myenv.UseFlags(env.get("LUA_FLAGS", {})) myenv.UseFlags(env["SWIFTEN_FLAGS"]) myenv.UseFlags(env["SWIFTEN_DEP_FLAGS"]) @@ -27,10 +23,6 @@ elif env["SCONS_STAGE"] == "build" : myenv.Append(CPPDEFINES = ["SLUIFT_BUILD_DLL"]) elif myenv["PLATFORM"] == "darwin" : myenv["SHLIBSUFFIX"] = ".so" - if env["PLATFORM"] == "win32" : - myenv.Append(CFLAGS = ["/TP"]) - else : - myenv.Append(CFLAGS = ["-x", "c++"]) myenv["SLUIFT_VERSION"] = Version.getBuildVersion(env.Dir("#").abspath, "sluift") def patchLua(env, target, source) : @@ -51,13 +43,13 @@ elif env["SCONS_STAGE"] == "build" : if myenv.get("HAVE_READLINE", False) : myenv.Append(CPPDEFINES = ["LUA_USE_READLINE"]) myenv.MergeFlags(myenv["READLINE_FLAGS"]) - env["SLUIFT"] = myenv.Program("sluift", [ + env["SLUIFT"] = myenv.Program("sluift", sluift_sources + [ "lua.c", "linit.c", ]) myenv.WriteVal("dll.c", myenv.Value("")) - myenv.SharedLibrary("sluift", ["dll.c"]) + myenv.SharedLibrary("sluift", sluift_sources + ["dll.c"]) if env["PLATFORM"] == "win32" : ssl_libs = [] |