summaryrefslogtreecommitdiffstats
blob: a830b848a42e0b3d9aa6de318cc128bb48d4f053 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Import("env")

if env["SCONS_STAGE"] == "build" and not GetOption("help") and not env.get("HAVE_LUA", 0) :
	print "Warning: Lua was not found. Swiftob will not be built."
	if "Sluift" in env["PROJECTS"] :
		env["PROJECTS"].remove("Sluift")

elif env["SCONS_STAGE"] == "build":
	myenv = env.Clone()
	# Too many compile warnings here at the moment
	myenv.Replace(CXXFLAGS = [flag for flag in env["CXXFLAGS"] if flag != "-Weverything"])
	myenv.UseFlags(myenv.get("LUA_FLAGS", {}))
	myenv.UseFlags(myenv["SWIFTEN_FLAGS"])
	myenv.UseFlags(myenv["SWIFTEN_DEP_FLAGS"])
	sources = [
		"linit.c",
		"Swiftob.cpp",
		"Users.cpp",
		"Commands.cpp",
		"MUCs.cpp",
		"Storage.cpp",
		"LuaCommands.cpp",
		"main.cpp"
	]
	swiftob = myenv.Program("swiftob", sources)