summaryrefslogtreecommitdiffstats
blob: cf0f4d0147553c78abb85429f773e8b6bf956440 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import platform

Import("env")

if env["SCONS_STAGE"] == "build" :
	myenv = env.Clone()
	myenv.UseFlags(env["LUA_FLAGS"])
	myenv.UseFlags(env["SWIFTEN_FLAGS"])
	myenv.UseFlags(env["SWIFTEN_DEP_FLAGS"])
	myenv["SHLIBPREFIX"] = ""

	if myenv["PLATFORM"] == "win32" :
		myenv.Append(CPPDEFINES = ["SLUIFT_BUILD_DLL"])
	elif myenv["PLATFORM"] == "darwin" :
		myenv["SHLIBSUFFIX"] = ".so"

	# Temporarily not building plugin on amd64, because it
	# requires the whole build to be done with -fPIC
	if myenv["PLATFORM"] != "posix" or platform.machine() != "x86_64" :
		myenv.SharedLibrary("sluift", [
				"sluift.cpp",
			])