summaryrefslogtreecommitdiffstats
blob: 92ee49319a428f159dfe6d150a8bd32aaf7bba30 (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 os

Import('env')
Import('sluift_env')
Import('sluift_variant')
Import('sluift_sources')

if sluift_variant == 'exe' :
	env["SLUIFT"] = sluift_env.Program("sluift", sluift_sources + [
		"#/Sluift/lua.c",
		"#/Sluift/linit.c",
	])
	if sluift_env.get("SLUIFT_INSTALLDIR", "") :
		sluift_env.Install(os.path.join(sluift_env["SLUIFT_INSTALLDIR"], "bin"), env["SLUIFT"])
else :
	sluift_env["SLUIFT_DLL_SUFFIX"] = "${SHLIBSUFFIX}"
	if sluift_env["PLATFORM"] == "darwin" :
		sluift_env["SLUIFT_DLL_SUFFIX"] = ".so"
	sluift_dll = sluift_env.SharedLibrary(sluift_env.File("sluift${SLUIFT_DLL_SUFFIX}"), 
			sluift_sources + ["#/Sluift/dll.c"])
	if sluift_env.get("SLUIFT_INSTALLDIR", False) and sluift_env.get("LUA_VERSION", False) :
		sluift_env.Install(
				os.path.join(sluift_env["SLUIFT_INSTALLDIR"], "lib", "lua", sluift_env["LUA_VERSION"]), 
				sluift_dll)