2010-05-29 07:25:38 +00:00
|
|
|
CheckVersion("0.4")
|
2008-10-21 12:34:33 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
Import("configure.lua")
|
2009-10-27 14:38:53 +00:00
|
|
|
Import("other/sdl/sdl.lua")
|
2010-05-29 07:25:38 +00:00
|
|
|
Import("other/freetype/freetype.lua")
|
2008-11-29 10:19:00 +00:00
|
|
|
|
2010-06-03 20:39:40 +00:00
|
|
|
--- Setup Config -------
|
2008-05-10 17:18:56 +00:00
|
|
|
config = NewConfig()
|
2009-10-27 14:38:53 +00:00
|
|
|
config:Add(OptCCompiler("compiler"))
|
2009-01-08 09:48:42 +00:00
|
|
|
config:Add(OptTestCompileC("stackprotector", "int main(){return 0;}", "-fstack-protector -fstack-protector-all"))
|
2012-06-10 17:56:23 +00:00
|
|
|
config:Add(OptTestCompileC("minmacosxsdk", "int main(){return 0;}", "-mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk"))
|
2012-10-07 13:35:33 +00:00
|
|
|
config:Add(OptTestCompileC("macosxppc", "int main(){return 0;}", "-arch ppc"))
|
2009-10-27 14:38:53 +00:00
|
|
|
config:Add(OptLibrary("zlib", "zlib.h", false))
|
2009-01-08 09:48:42 +00:00
|
|
|
config:Add(SDL.OptFind("sdl", true))
|
2010-05-29 07:25:38 +00:00
|
|
|
config:Add(FreeType.OptFind("freetype", true))
|
2015-02-07 22:15:58 +00:00
|
|
|
config:Add(OptString("websockets", false))
|
2010-05-29 10:22:18 +00:00
|
|
|
config:Finalize("config.lua")
|
2007-05-22 15:05:28 +00:00
|
|
|
|
2007-08-02 08:20:53 +00:00
|
|
|
-- data compiler
|
2008-06-12 10:51:48 +00:00
|
|
|
function Script(name)
|
|
|
|
if family == "windows" then
|
2010-12-01 18:52:00 +00:00
|
|
|
return str_replace(name, "/", "\\")
|
2008-04-20 22:30:59 +00:00
|
|
|
end
|
2008-06-12 10:51:48 +00:00
|
|
|
return "python " .. name
|
2008-02-24 16:03:58 +00:00
|
|
|
end
|
2007-08-22 21:13:33 +00:00
|
|
|
|
|
|
|
function CHash(output, ...)
|
2010-05-29 07:25:38 +00:00
|
|
|
local inputs = TableFlatten({...})
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2007-08-22 21:13:33 +00:00
|
|
|
output = Path(output)
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2007-08-22 21:13:33 +00:00
|
|
|
-- compile all the files
|
2009-01-08 09:48:42 +00:00
|
|
|
local cmd = Script("scripts/cmd5.py") .. " "
|
|
|
|
for index, inname in ipairs(inputs) do
|
2011-04-13 18:37:12 +00:00
|
|
|
cmd = cmd .. Path(inname) .. " "
|
2007-08-22 21:13:33 +00:00
|
|
|
end
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2008-06-12 10:51:48 +00:00
|
|
|
cmd = cmd .. " > " .. output
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2009-01-08 09:48:42 +00:00
|
|
|
AddJob(output, "cmd5 " .. output, cmd)
|
|
|
|
for index, inname in ipairs(inputs) do
|
|
|
|
AddDependency(output, inname)
|
2007-08-22 21:13:33 +00:00
|
|
|
end
|
2010-05-29 15:39:15 +00:00
|
|
|
AddDependency(output, "scripts/cmd5.py")
|
2007-08-22 21:13:33 +00:00
|
|
|
return output
|
|
|
|
end
|
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
--[[
|
|
|
|
function DuplicateDirectoryStructure(orgpath, srcpath, dstpath)
|
|
|
|
for _,v in pairs(CollectDirs(srcpath .. "/")) do
|
|
|
|
MakeDirectory(dstpath .. "/" .. string.sub(v, string.len(orgpath)+2))
|
|
|
|
DuplicateDirectoryStructure(orgpath, v, dstpath)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
DuplicateDirectoryStructure("src", "src", "objs")
|
|
|
|
]]
|
|
|
|
|
2007-08-07 17:46:04 +00:00
|
|
|
function ResCompile(scriptfile)
|
|
|
|
scriptfile = Path(scriptfile)
|
2010-11-14 11:50:23 +00:00
|
|
|
if config.compiler.driver == "cl" then
|
|
|
|
output = PathBase(scriptfile) .. ".res"
|
|
|
|
AddJob(output, "rc " .. scriptfile, "rc /fo " .. output .. " " .. scriptfile)
|
|
|
|
elseif config.compiler.driver == "gcc" then
|
|
|
|
output = PathBase(scriptfile) .. ".coff"
|
|
|
|
AddJob(output, "windres " .. scriptfile, "windres -i " .. scriptfile .. " -o " .. output)
|
|
|
|
end
|
2009-01-08 09:48:42 +00:00
|
|
|
AddDependency(output, scriptfile)
|
2007-08-07 17:46:04 +00:00
|
|
|
return output
|
|
|
|
end
|
|
|
|
|
2007-07-24 22:53:43 +00:00
|
|
|
function Dat2c(datafile, sourcefile, arrayname)
|
2007-07-13 13:40:04 +00:00
|
|
|
datafile = Path(datafile)
|
2007-07-24 22:53:43 +00:00
|
|
|
sourcefile = Path(sourcefile)
|
2008-06-12 10:51:48 +00:00
|
|
|
|
2009-01-08 09:48:42 +00:00
|
|
|
AddJob(
|
2008-06-12 10:51:48 +00:00
|
|
|
sourcefile,
|
|
|
|
"dat2c " .. PathFilename(sourcefile) .. " = " .. PathFilename(datafile),
|
2011-04-13 18:37:12 +00:00
|
|
|
Script("scripts/dat2c.py").. "\" " .. sourcefile .. " " .. datafile .. " " .. arrayname
|
2008-06-12 10:51:48 +00:00
|
|
|
)
|
2009-01-08 09:48:42 +00:00
|
|
|
AddDependency(sourcefile, datafile)
|
2007-07-24 22:53:43 +00:00
|
|
|
return sourcefile
|
2007-07-13 13:40:04 +00:00
|
|
|
end
|
|
|
|
|
2008-06-12 10:51:48 +00:00
|
|
|
function ContentCompile(action, output)
|
|
|
|
output = Path(output)
|
2009-01-08 09:48:42 +00:00
|
|
|
AddJob(
|
2008-06-12 10:51:48 +00:00
|
|
|
output,
|
|
|
|
action .. " > " .. output,
|
2010-11-14 11:51:51 +00:00
|
|
|
--Script("datasrc/compile.py") .. "\" ".. Path(output) .. " " .. action
|
2011-04-13 18:37:12 +00:00
|
|
|
Script("datasrc/compile.py") .. " " .. action .. " > " .. Path(output)
|
2008-06-12 10:51:48 +00:00
|
|
|
)
|
2009-01-08 09:48:42 +00:00
|
|
|
AddDependency(output, Path("datasrc/content.py")) -- do this more proper
|
|
|
|
AddDependency(output, Path("datasrc/network.py"))
|
|
|
|
AddDependency(output, Path("datasrc/compile.py"))
|
|
|
|
AddDependency(output, Path("datasrc/datatypes.py"))
|
2008-06-12 10:51:48 +00:00
|
|
|
return output
|
2007-07-13 13:40:04 +00:00
|
|
|
end
|
2007-05-22 15:05:28 +00:00
|
|
|
|
2008-06-12 10:51:48 +00:00
|
|
|
-- Content Compile
|
2010-05-29 07:25:38 +00:00
|
|
|
network_source = ContentCompile("network_source", "src/game/generated/protocol.cpp")
|
|
|
|
network_header = ContentCompile("network_header", "src/game/generated/protocol.h")
|
|
|
|
client_content_source = ContentCompile("client_content_source", "src/game/generated/client_data.cpp")
|
|
|
|
client_content_header = ContentCompile("client_content_header", "src/game/generated/client_data.h")
|
|
|
|
server_content_source = ContentCompile("server_content_source", "src/game/generated/server_data.cpp")
|
|
|
|
server_content_header = ContentCompile("server_content_header", "src/game/generated/server_data.h")
|
2007-07-24 23:46:29 +00:00
|
|
|
|
2009-01-08 09:48:42 +00:00
|
|
|
AddDependency(network_source, network_header)
|
|
|
|
AddDependency(client_content_source, client_content_header)
|
|
|
|
AddDependency(server_content_source, server_content_header)
|
2007-08-22 21:13:33 +00:00
|
|
|
|
2011-04-19 14:10:50 +00:00
|
|
|
nethash = CHash("src/game/generated/nethash.cpp", "src/engine/shared/protocol.h", "src/game/generated/protocol.h", "src/game/tuning.h", "src/game/gamecore.cpp", network_header)
|
2007-08-22 21:13:33 +00:00
|
|
|
|
2007-08-07 17:46:04 +00:00
|
|
|
client_link_other = {}
|
2009-01-11 12:57:29 +00:00
|
|
|
client_depends = {}
|
2011-03-03 00:44:15 +00:00
|
|
|
server_link_other = {}
|
2010-12-01 18:52:00 +00:00
|
|
|
server_sql_depends = {}
|
2009-01-11 12:57:29 +00:00
|
|
|
|
|
|
|
if family == "windows" then
|
2011-12-04 21:28:58 +00:00
|
|
|
if platform == "win32" then
|
|
|
|
table.insert(client_depends, CopyToDirectory(".", "other\\freetype\\lib32\\freetype.dll"))
|
|
|
|
table.insert(client_depends, CopyToDirectory(".", "other\\sdl\\lib32\\SDL.dll"))
|
2015-02-05 16:54:42 +00:00
|
|
|
|
2015-02-05 18:52:13 +00:00
|
|
|
table.insert(client_depends, CopyToDirectory(".", "other\\curl\\windows\\lib32\\libcurl.dll"))
|
|
|
|
table.insert(client_depends, CopyToDirectory(".", "other\\curl\\windows\\lib32\\libeay32.dll"))
|
|
|
|
table.insert(client_depends, CopyToDirectory(".", "other\\curl\\windows\\lib32\\libidn-11.dll"))
|
|
|
|
table.insert(client_depends, CopyToDirectory(".", "other\\curl\\windows\\lib32\\ssleay32.dll"))
|
|
|
|
table.insert(client_depends, CopyToDirectory(".", "other\\curl\\windows\\lib32\\zlib1.dll"))
|
2015-02-05 16:54:42 +00:00
|
|
|
|
|
|
|
table.insert(client_depends, CopyToDirectory(".", "other\\opus\\windows\\lib32\\libgcc_s_sjlj-1.dll"))
|
|
|
|
table.insert(client_depends, CopyToDirectory(".", "other\\opus\\windows\\lib32\\libogg-0.dll"))
|
|
|
|
table.insert(client_depends, CopyToDirectory(".", "other\\opus\\windows\\lib32\\libopus-0.dll"))
|
|
|
|
table.insert(client_depends, CopyToDirectory(".", "other\\opus\\windows\\lib32\\libopusfile-0.dll"))
|
2011-12-04 21:28:58 +00:00
|
|
|
else
|
|
|
|
table.insert(client_depends, CopyToDirectory(".", "other\\freetype\\lib64\\freetype.dll"))
|
|
|
|
table.insert(client_depends, CopyToDirectory(".", "other\\sdl\\lib64\\SDL.dll"))
|
2015-02-05 16:54:42 +00:00
|
|
|
|
2015-02-05 18:52:13 +00:00
|
|
|
table.insert(client_depends, CopyToDirectory(".", "other\\curl\\windows\\lib64\\libcurl.dll"))
|
|
|
|
table.insert(client_depends, CopyToDirectory(".", "other\\curl\\windows\\lib64\\libeay32.dll"))
|
|
|
|
table.insert(client_depends, CopyToDirectory(".", "other\\curl\\windows\\lib64\\ssleay32.dll"))
|
|
|
|
table.insert(client_depends, CopyToDirectory(".", "other\\curl\\windows\\lib64\\zlib1.dll"))
|
2015-02-05 16:54:42 +00:00
|
|
|
|
|
|
|
--table.insert(client_depends, CopyToDirectory(".", "other\\opus\\windows\\lib64\\libgcc_s_sjlj-1.dll"))
|
|
|
|
--table.insert(client_depends, CopyToDirectory(".", "other\\opus\\windows\\lib64\\libogg-0.dll"))
|
|
|
|
--table.insert(client_depends, CopyToDirectory(".", "other\\opus\\windows\\lib64\\libopus-0.dll"))
|
|
|
|
--table.insert(client_depends, CopyToDirectory(".", "other\\opus\\windows\\lib64\\libopusfile-0.dll"))
|
2011-12-04 21:28:58 +00:00
|
|
|
end
|
2010-12-01 18:52:00 +00:00
|
|
|
table.insert(server_sql_depends, CopyToDirectory(".", "other\\mysql\\vc2005libs\\mysqlcppconn.dll"))
|
|
|
|
table.insert(server_sql_depends, CopyToDirectory(".", "other\\mysql\\vc2005libs\\libmysql.dll"))
|
2009-01-08 09:48:42 +00:00
|
|
|
|
2010-11-17 23:42:40 +00:00
|
|
|
if config.compiler.driver == "cl" then
|
|
|
|
client_link_other = {ResCompile("other/icons/teeworlds_cl.rc")}
|
2011-03-03 00:44:15 +00:00
|
|
|
server_link_other = {ResCompile("other/icons/teeworlds_srv_cl.rc")}
|
2010-11-17 23:42:40 +00:00
|
|
|
elseif config.compiler.driver == "gcc" then
|
|
|
|
client_link_other = {ResCompile("other/icons/teeworlds_gcc.rc")}
|
2011-03-03 00:44:15 +00:00
|
|
|
server_link_other = {ResCompile("other/icons/teeworlds_srv_gcc.rc")}
|
2010-11-17 23:42:40 +00:00
|
|
|
end
|
2007-08-07 17:46:04 +00:00
|
|
|
end
|
|
|
|
|
2009-01-08 09:48:42 +00:00
|
|
|
function Intermediate_Output(settings, input)
|
2010-05-29 07:25:38 +00:00
|
|
|
return "objs/" .. string.sub(PathBase(input), string.len("src/")+1) .. settings.config_ext
|
2007-12-15 10:24:49 +00:00
|
|
|
end
|
|
|
|
|
2012-04-12 14:46:47 +00:00
|
|
|
function build(settings)
|
2011-08-18 22:10:58 +00:00
|
|
|
-- apply compiler settings
|
|
|
|
config.compiler:Apply(settings)
|
|
|
|
|
2009-01-08 09:48:42 +00:00
|
|
|
--settings.objdir = Path("objs")
|
|
|
|
settings.cc.Output = Intermediate_Output
|
|
|
|
|
2015-01-10 00:18:08 +00:00
|
|
|
--settings.cc.flags:Add("-m32")
|
|
|
|
--settings.link.flags:Add("-m32")
|
2013-07-22 22:15:50 +00:00
|
|
|
|
2013-02-03 14:34:41 +00:00
|
|
|
cflags = os.getenv("CFLAGS")
|
|
|
|
if cflags then
|
|
|
|
settings.cc.flags:Add(cflags)
|
|
|
|
end
|
|
|
|
ldflags = os.getenv("LDFLAGS")
|
|
|
|
if ldflags then
|
|
|
|
settings.link.flags:Add(ldflags)
|
|
|
|
end
|
|
|
|
|
2015-02-07 22:15:58 +00:00
|
|
|
if config.websockets.value then
|
|
|
|
settings.cc.defines:Add("WEBSOCKETS")
|
|
|
|
end
|
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
if config.compiler.driver == "cl" then
|
2009-01-08 09:48:42 +00:00
|
|
|
settings.cc.flags:Add("/wd4244")
|
2014-10-19 14:00:53 +00:00
|
|
|
settings.cc.flags:Add("/EHsc")
|
2007-08-02 08:20:53 +00:00
|
|
|
else
|
2013-12-30 03:54:29 +00:00
|
|
|
settings.cc.flags:Add("-Wall")
|
2012-01-07 23:01:34 +00:00
|
|
|
if family == "windows" then
|
2015-01-17 05:35:08 +00:00
|
|
|
if config.compiler.driver == "gcc" then
|
|
|
|
settings.link.flags:Add("-static-libgcc")
|
|
|
|
settings.link.flags:Add("-static-libstdc++")
|
|
|
|
end
|
2012-01-07 23:01:34 +00:00
|
|
|
-- disable visibility attribute support for gcc on windows
|
|
|
|
settings.cc.defines:Add("NO_VIZ")
|
|
|
|
elseif platform == "macosx" then
|
2011-04-09 22:05:34 +00:00
|
|
|
settings.cc.flags:Add("-mmacosx-version-min=10.5")
|
|
|
|
settings.link.flags:Add("-mmacosx-version-min=10.5")
|
2012-06-10 17:56:23 +00:00
|
|
|
if config.minmacosxsdk.value == 1 then
|
|
|
|
settings.cc.flags:Add("-isysroot /Developer/SDKs/MacOSX10.5.sdk")
|
|
|
|
settings.link.flags:Add("-isysroot /Developer/SDKs/MacOSX10.5.sdk")
|
|
|
|
end
|
2008-10-20 16:18:02 +00:00
|
|
|
elseif config.stackprotector.value == 1 then
|
2009-01-08 09:48:42 +00:00
|
|
|
settings.cc.flags:Add("-fstack-protector", "-fstack-protector-all")
|
|
|
|
settings.link.flags:Add("-fstack-protector", "-fstack-protector-all")
|
2008-10-20 16:18:02 +00:00
|
|
|
end
|
2007-08-02 08:20:53 +00:00
|
|
|
end
|
2007-07-24 23:46:29 +00:00
|
|
|
|
2009-01-08 09:48:42 +00:00
|
|
|
settings.cc.includes:Add("src")
|
2014-10-28 08:51:15 +00:00
|
|
|
settings.cc.includes:Add("src/engine/external")
|
2014-10-28 09:00:46 +00:00
|
|
|
settings.cc.includes:Add("src/engine/external/ogg")
|
2014-10-28 13:38:50 +00:00
|
|
|
settings.cc.includes:Add("other/opus/include")
|
|
|
|
settings.cc.includes:Add("other/opus/include/opus")
|
2015-02-05 16:54:42 +00:00
|
|
|
settings.cc.includes:Add("other/curl/include")
|
2010-12-01 18:52:00 +00:00
|
|
|
settings.cc.includes:Add("other/mysql/include")
|
2007-08-22 07:52:33 +00:00
|
|
|
|
2014-10-28 09:00:46 +00:00
|
|
|
-- set some platform specific settings
|
2011-01-06 03:46:10 +00:00
|
|
|
if family == "unix" then
|
2011-04-13 18:37:12 +00:00
|
|
|
if platform == "macosx" then
|
2009-01-08 09:48:42 +00:00
|
|
|
settings.link.frameworks:Add("Carbon")
|
|
|
|
settings.link.frameworks:Add("AppKit")
|
2013-12-30 03:54:29 +00:00
|
|
|
settings.link.libs:Add("dl")
|
2015-02-05 18:52:13 +00:00
|
|
|
settings.link.libs:Add("crypto")
|
2007-08-22 07:52:33 +00:00
|
|
|
else
|
2009-01-08 09:48:42 +00:00
|
|
|
settings.link.libs:Add("pthread")
|
2013-12-30 03:54:29 +00:00
|
|
|
settings.link.libs:Add("dl")
|
|
|
|
settings.link.libs:Add("rt")
|
2007-08-22 07:52:33 +00:00
|
|
|
end
|
2011-09-08 23:41:53 +00:00
|
|
|
|
|
|
|
if platform == "solaris" then
|
2014-10-28 09:00:46 +00:00
|
|
|
settings.link.flags:Add("-lsocket")
|
|
|
|
settings.link.flags:Add("-lnsl")
|
2011-09-08 23:41:53 +00:00
|
|
|
end
|
2007-08-22 07:52:33 +00:00
|
|
|
elseif family == "windows" then
|
2009-01-08 09:48:42 +00:00
|
|
|
settings.link.libs:Add("gdi32")
|
|
|
|
settings.link.libs:Add("user32")
|
|
|
|
settings.link.libs:Add("ws2_32")
|
|
|
|
settings.link.libs:Add("ole32")
|
|
|
|
settings.link.libs:Add("shell32")
|
2007-08-22 07:52:33 +00:00
|
|
|
end
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2008-05-10 17:18:56 +00:00
|
|
|
-- compile zlib if needed
|
|
|
|
if config.zlib.value == 1 then
|
2009-01-08 09:48:42 +00:00
|
|
|
settings.link.libs:Add("z")
|
2008-05-10 17:18:56 +00:00
|
|
|
if config.zlib.include_path then
|
2009-01-08 09:48:42 +00:00
|
|
|
settings.cc.includes:Add(config.zlib.include_path)
|
2008-05-10 17:18:56 +00:00
|
|
|
end
|
|
|
|
zlib = {}
|
|
|
|
else
|
|
|
|
zlib = Compile(settings, Collect("src/engine/external/zlib/*.c"))
|
2009-01-08 09:48:42 +00:00
|
|
|
settings.cc.includes:Add("src/engine/external/zlib")
|
2008-05-10 17:18:56 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
-- build the small libraries
|
|
|
|
wavpack = Compile(settings, Collect("src/engine/external/wavpack/*.c"))
|
|
|
|
pnglite = Compile(settings, Collect("src/engine/external/pnglite/*.c"))
|
2014-12-31 14:06:13 +00:00
|
|
|
jsonparser = Compile(settings, Collect("src/engine/external/json-parser/*.cpp"))
|
2011-02-07 15:37:26 +00:00
|
|
|
md5 = Compile(settings, "src/engine/external/md5/md5.c")
|
2015-02-07 22:15:58 +00:00
|
|
|
if config.websockets.value then
|
|
|
|
libwebsockets = Compile(settings, Collect("src/engine/external/libwebsockets/*.c"))
|
|
|
|
end
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2008-03-22 18:40:27 +00:00
|
|
|
-- build game components
|
2009-01-08 09:48:42 +00:00
|
|
|
engine_settings = settings:Copy()
|
|
|
|
server_settings = engine_settings:Copy()
|
|
|
|
client_settings = engine_settings:Copy()
|
2009-01-13 21:02:02 +00:00
|
|
|
launcher_settings = engine_settings:Copy()
|
2007-10-02 08:26:08 +00:00
|
|
|
|
|
|
|
if family == "unix" then
|
2012-04-12 14:46:47 +00:00
|
|
|
if string.find(settings.config_name, "sql") then
|
2010-12-01 18:52:00 +00:00
|
|
|
server_settings.link.libs:Add("mysqlcppconn-static")
|
|
|
|
server_settings.link.libs:Add("mysqlclient")
|
2014-05-20 21:20:05 +00:00
|
|
|
server_settings.link.libs:Add("dl")
|
2014-08-31 21:53:38 +00:00
|
|
|
server_settings.link.libs:Add("rt")
|
2010-12-01 18:52:00 +00:00
|
|
|
end
|
|
|
|
|
2011-01-06 03:46:10 +00:00
|
|
|
if platform == "macosx" then
|
2009-01-08 09:48:42 +00:00
|
|
|
client_settings.link.frameworks:Add("OpenGL")
|
2011-04-13 18:37:12 +00:00
|
|
|
client_settings.link.frameworks:Add("AGL")
|
|
|
|
client_settings.link.frameworks:Add("Carbon")
|
|
|
|
client_settings.link.frameworks:Add("Cocoa")
|
|
|
|
launcher_settings.link.frameworks:Add("Cocoa")
|
2014-10-28 15:59:53 +00:00
|
|
|
|
2015-02-05 18:52:13 +00:00
|
|
|
client_settings.link.libs:Add("crypto")
|
|
|
|
client_settings.link.libs:Add("ssl")
|
|
|
|
|
2014-10-28 16:49:42 +00:00
|
|
|
client_settings.link.libs:Add("opusfile")
|
|
|
|
client_settings.link.libs:Add("opus")
|
|
|
|
client_settings.link.libs:Add("ogg")
|
2015-02-05 16:54:42 +00:00
|
|
|
client_settings.link.libs:Add("curl")
|
2014-10-28 16:49:42 +00:00
|
|
|
|
|
|
|
if string.find(settings.config_name, "64") then
|
2014-10-28 15:59:53 +00:00
|
|
|
client_settings.link.libpath:Add("other/opus/mac/lib64")
|
2015-02-05 16:54:42 +00:00
|
|
|
client_settings.link.libpath:Add("other/curl/mac/lib64")
|
2014-10-28 15:59:53 +00:00
|
|
|
else
|
|
|
|
client_settings.link.libpath:Add("other/opus/mac/lib32")
|
2015-02-05 16:54:42 +00:00
|
|
|
client_settings.link.libpath:Add("other/curl/mac/lib32")
|
2014-10-28 15:59:53 +00:00
|
|
|
end
|
|
|
|
|
2012-04-12 14:46:47 +00:00
|
|
|
if string.find(settings.config_name, "sql") then
|
2011-02-10 01:51:24 +00:00
|
|
|
if arch == "amd64" then
|
|
|
|
server_settings.link.libpath:Add("other/mysql/mac/lib64")
|
|
|
|
else
|
|
|
|
server_settings.link.libpath:Add("other/mysql/mac/lib32")
|
|
|
|
end
|
2010-12-01 18:52:00 +00:00
|
|
|
end
|
2007-10-02 08:26:08 +00:00
|
|
|
else
|
2009-01-08 09:48:42 +00:00
|
|
|
client_settings.link.libs:Add("X11")
|
|
|
|
client_settings.link.libs:Add("GL")
|
|
|
|
client_settings.link.libs:Add("GLU")
|
2014-10-28 15:03:11 +00:00
|
|
|
client_settings.link.libs:Add("opusfile")
|
|
|
|
client_settings.link.libs:Add("opus")
|
|
|
|
client_settings.link.libs:Add("ogg")
|
2015-02-05 16:54:42 +00:00
|
|
|
client_settings.link.libs:Add("curl")
|
2014-10-28 15:03:11 +00:00
|
|
|
|
2015-01-10 00:18:08 +00:00
|
|
|
if arch == "amd64" then
|
|
|
|
client_settings.link.libpath:Add("other/opus/linux/lib64")
|
2015-02-05 16:54:42 +00:00
|
|
|
client_settings.link.libpath:Add("other/curl/linux/lib64")
|
2015-01-10 00:18:08 +00:00
|
|
|
else
|
2014-10-28 15:03:11 +00:00
|
|
|
client_settings.link.libpath:Add("other/opus/linux/lib32")
|
2015-02-05 16:54:42 +00:00
|
|
|
client_settings.link.libpath:Add("other/curl/linux/lib32")
|
2015-01-10 00:18:08 +00:00
|
|
|
end
|
2014-10-28 15:03:11 +00:00
|
|
|
|
2012-04-12 14:46:47 +00:00
|
|
|
if string.find(settings.config_name, "sql") then
|
2010-12-01 18:52:00 +00:00
|
|
|
if arch == "amd64" then
|
|
|
|
server_settings.link.libpath:Add("other/mysql/linux/lib64")
|
|
|
|
else
|
|
|
|
server_settings.link.libpath:Add("other/mysql/linux/lib32")
|
|
|
|
end
|
|
|
|
end
|
2007-10-02 08:26:08 +00:00
|
|
|
end
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2007-10-02 08:26:08 +00:00
|
|
|
elseif family == "windows" then
|
2014-10-28 15:47:18 +00:00
|
|
|
client_settings.link.libpath:Add("other/opus/windows/lib32")
|
2015-02-05 16:54:42 +00:00
|
|
|
client_settings.link.libpath:Add("other/curl/windows/lib32")
|
2009-01-08 09:48:42 +00:00
|
|
|
client_settings.link.libs:Add("opengl32")
|
|
|
|
client_settings.link.libs:Add("glu32")
|
|
|
|
client_settings.link.libs:Add("winmm")
|
2014-10-28 15:17:53 +00:00
|
|
|
client_settings.link.libs:Add("libopusfile-0")
|
2015-02-05 16:54:42 +00:00
|
|
|
client_settings.link.libs:Add("curl")
|
2012-04-12 14:46:47 +00:00
|
|
|
if string.find(settings.config_name, "sql") then
|
2010-12-01 18:52:00 +00:00
|
|
|
server_settings.link.libpath:Add("other/mysql/vc2005libs")
|
|
|
|
server_settings.link.libs:Add("mysqlcppconn")
|
|
|
|
end
|
2008-05-10 17:18:56 +00:00
|
|
|
end
|
2008-10-21 16:31:19 +00:00
|
|
|
|
|
|
|
-- apply sdl settings
|
2009-01-08 09:48:42 +00:00
|
|
|
config.sdl:Apply(client_settings)
|
2010-05-29 07:25:38 +00:00
|
|
|
-- apply freetype settings
|
|
|
|
config.freetype:Apply(client_settings)
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
engine = Compile(engine_settings, Collect("src/engine/shared/*.cpp", "src/base/*.c"))
|
2009-10-27 14:38:53 +00:00
|
|
|
client = Compile(client_settings, Collect("src/engine/client/*.cpp"))
|
|
|
|
server = Compile(server_settings, Collect("src/engine/server/*.cpp"))
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2008-09-03 18:09:06 +00:00
|
|
|
versionserver = Compile(settings, Collect("src/versionsrv/*.cpp"))
|
2007-07-21 18:07:27 +00:00
|
|
|
masterserver = Compile(settings, Collect("src/mastersrv/*.cpp"))
|
2014-11-24 22:22:37 +00:00
|
|
|
twping = Compile(settings, Collect("src/twping/*.cpp"))
|
2008-06-12 10:51:48 +00:00
|
|
|
game_shared = Compile(settings, Collect("src/game/*.cpp"), nethash, network_source)
|
2014-06-16 11:29:18 +00:00
|
|
|
game_client = Compile(client_settings, CollectRecursive("src/game/client/*.cpp"), client_content_source)
|
2009-01-08 09:48:42 +00:00
|
|
|
game_server = Compile(settings, CollectRecursive("src/game/server/*.cpp"), server_content_source)
|
2008-01-12 15:07:57 +00:00
|
|
|
game_editor = Compile(settings, Collect("src/game/editor/*.cpp"))
|
2007-07-21 18:07:27 +00:00
|
|
|
|
2007-09-23 18:27:04 +00:00
|
|
|
-- build tools (TODO: fix this so we don't get double _d_d stuff)
|
2007-07-24 22:53:43 +00:00
|
|
|
tools_src = Collect("src/tools/*.cpp", "src/tools/*.c")
|
2008-10-08 16:33:08 +00:00
|
|
|
|
2009-01-12 20:04:14 +00:00
|
|
|
client_osxlaunch = {}
|
|
|
|
server_osxlaunch = {}
|
2008-10-23 16:18:33 +00:00
|
|
|
if platform == "macosx" then
|
2009-01-12 20:04:14 +00:00
|
|
|
client_osxlaunch = Compile(client_settings, "src/osxlaunch/client.m")
|
2009-01-13 21:02:02 +00:00
|
|
|
server_osxlaunch = Compile(launcher_settings, "src/osxlaunch/server.m")
|
2008-10-21 15:59:32 +00:00
|
|
|
end
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2007-07-24 22:53:43 +00:00
|
|
|
tools = {}
|
2009-01-08 09:48:42 +00:00
|
|
|
for i,v in ipairs(tools_src) do
|
2007-09-09 18:21:14 +00:00
|
|
|
toolname = PathFilename(PathBase(v))
|
2011-02-07 15:37:26 +00:00
|
|
|
tools[i] = Link(settings, toolname, Compile(settings, v), engine, zlib, pnglite, md5)
|
2007-07-24 22:53:43 +00:00
|
|
|
end
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2008-09-03 18:09:06 +00:00
|
|
|
-- build client, server, version server and master server
|
2014-03-28 23:24:34 +00:00
|
|
|
client_exe = Link(client_settings, "DDNet", game_shared, game_client,
|
2014-10-28 00:34:15 +00:00
|
|
|
engine, client, game_editor, zlib, pnglite, wavpack,
|
2011-02-07 15:37:26 +00:00
|
|
|
client_link_other, client_osxlaunch, jsonparser, libwebsockets, md5)
|
2007-10-02 08:26:08 +00:00
|
|
|
|
2014-03-28 23:24:34 +00:00
|
|
|
server_exe = Link(server_settings, "DDNet-Server", engine, server,
|
2011-02-07 15:37:26 +00:00
|
|
|
game_shared, game_server, zlib, server_link_other, libwebsockets, md5)
|
2009-01-12 20:04:14 +00:00
|
|
|
|
|
|
|
serverlaunch = {}
|
|
|
|
if platform == "macosx" then
|
2009-01-13 21:02:02 +00:00
|
|
|
serverlaunch = Link(launcher_settings, "serverlaunch", server_osxlaunch)
|
2009-01-12 20:04:14 +00:00
|
|
|
end
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2008-09-03 18:09:06 +00:00
|
|
|
versionserver_exe = Link(server_settings, "versionsrv", versionserver,
|
2011-02-07 15:37:26 +00:00
|
|
|
engine, zlib, libwebsockets, md5)
|
2007-10-02 08:26:08 +00:00
|
|
|
|
|
|
|
masterserver_exe = Link(server_settings, "mastersrv", masterserver,
|
2011-02-07 15:37:26 +00:00
|
|
|
engine, zlib, md5)
|
2007-08-02 08:20:53 +00:00
|
|
|
|
2014-11-24 22:22:37 +00:00
|
|
|
twping_exe = Link(server_settings, "twping", twping,
|
2011-02-07 15:37:26 +00:00
|
|
|
engine, zlib, md5)
|
2014-11-24 20:16:03 +00:00
|
|
|
|
2007-08-02 08:20:53 +00:00
|
|
|
-- make targets
|
2009-01-11 12:57:29 +00:00
|
|
|
c = PseudoTarget("client".."_"..settings.config_name, client_exe, client_depends)
|
2011-04-15 00:58:39 +00:00
|
|
|
if string.find(settings.config_name, "sql") then
|
2011-04-15 05:02:02 +00:00
|
|
|
s = PseudoTarget("server".."_"..settings.config_name, server_exe, serverlaunch, server_sql_depends)
|
2010-12-01 19:10:45 +00:00
|
|
|
else
|
2011-04-15 00:58:39 +00:00
|
|
|
s = PseudoTarget("server".."_"..settings.config_name, server_exe, serverlaunch)
|
2010-12-01 18:52:00 +00:00
|
|
|
end
|
2009-01-08 09:48:42 +00:00
|
|
|
g = PseudoTarget("game".."_"..settings.config_name, client_exe, server_exe)
|
|
|
|
|
2008-09-03 18:09:06 +00:00
|
|
|
v = PseudoTarget("versionserver".."_"..settings.config_name, versionserver_exe)
|
2007-08-02 08:20:53 +00:00
|
|
|
m = PseudoTarget("masterserver".."_"..settings.config_name, masterserver_exe)
|
|
|
|
t = PseudoTarget("tools".."_"..settings.config_name, tools)
|
2014-11-24 22:22:37 +00:00
|
|
|
p = PseudoTarget("twping".."_"..settings.config_name, twping_exe)
|
2007-12-19 18:47:47 +00:00
|
|
|
|
2014-11-24 20:16:03 +00:00
|
|
|
all = PseudoTarget(settings.config_name, c, s, v, m, t, p)
|
2007-08-02 08:20:53 +00:00
|
|
|
return all
|
2007-07-21 18:07:27 +00:00
|
|
|
end
|
2007-05-22 15:05:28 +00:00
|
|
|
|
2009-01-21 22:59:52 +00:00
|
|
|
|
2012-04-12 14:46:47 +00:00
|
|
|
debug_settings = NewSettings()
|
|
|
|
debug_settings.config_name = "debug"
|
|
|
|
debug_settings.config_ext = "_d"
|
|
|
|
debug_settings.debug = 1
|
|
|
|
debug_settings.optimize = 0
|
|
|
|
debug_settings.cc.defines:Add("CONF_DEBUG")
|
|
|
|
|
|
|
|
debug_sql_settings = NewSettings()
|
|
|
|
debug_sql_settings.config_name = "sql_debug"
|
|
|
|
debug_sql_settings.config_ext = "_sql_d"
|
|
|
|
debug_sql_settings.debug = 1
|
|
|
|
debug_sql_settings.optimize = 0
|
|
|
|
debug_sql_settings.cc.defines:Add("CONF_DEBUG", "CONF_SQL")
|
|
|
|
|
|
|
|
release_settings = NewSettings()
|
|
|
|
release_settings.config_name = "release"
|
|
|
|
release_settings.config_ext = ""
|
|
|
|
release_settings.debug = 0
|
|
|
|
release_settings.optimize = 1
|
|
|
|
release_settings.cc.defines:Add("CONF_RELEASE")
|
|
|
|
|
|
|
|
release_sql_settings = NewSettings()
|
|
|
|
release_sql_settings.config_name = "sql_release"
|
|
|
|
release_sql_settings.config_ext = "_sql"
|
|
|
|
release_sql_settings.debug = 0
|
|
|
|
release_sql_settings.optimize = 1
|
|
|
|
release_sql_settings.cc.defines:Add("CONF_RELEASE", "CONF_SQL")
|
|
|
|
|
|
|
|
if platform == "macosx" then
|
|
|
|
debug_settings_ppc = debug_settings:Copy()
|
|
|
|
debug_settings_ppc.config_name = "debug_ppc"
|
|
|
|
debug_settings_ppc.config_ext = "_ppc_d"
|
|
|
|
debug_settings_ppc.cc.flags:Add("-arch ppc")
|
|
|
|
debug_settings_ppc.link.flags:Add("-arch ppc")
|
|
|
|
debug_settings_ppc.cc.defines:Add("CONF_DEBUG")
|
|
|
|
|
|
|
|
debug_sql_settings_ppc = debug_sql_settings:Copy()
|
|
|
|
debug_sql_settings_ppc.config_name = "sql_debug_ppc"
|
|
|
|
debug_sql_settings_ppc.config_ext = "_sql_ppc_d"
|
|
|
|
debug_sql_settings_ppc.cc.flags:Add("-arch ppc")
|
|
|
|
debug_sql_settings_ppc.link.flags:Add("-arch ppc")
|
|
|
|
debug_sql_settings_ppc.cc.defines:Add("CONF_DEBUG", "CONF_SQL")
|
|
|
|
|
|
|
|
release_settings_ppc = release_settings:Copy()
|
|
|
|
release_settings_ppc.config_name = "release_ppc"
|
|
|
|
release_settings_ppc.config_ext = "_ppc"
|
|
|
|
release_settings_ppc.cc.flags:Add("-arch ppc")
|
|
|
|
release_settings_ppc.link.flags:Add("-arch ppc")
|
|
|
|
release_settings_ppc.cc.defines:Add("CONF_RELEASE")
|
|
|
|
|
|
|
|
release_sql_settings_ppc = release_sql_settings:Copy()
|
|
|
|
release_sql_settings_ppc.config_name = "sql_release_ppc"
|
|
|
|
release_sql_settings_ppc.config_ext = "_sql_ppc"
|
|
|
|
release_sql_settings_ppc.cc.flags:Add("-arch ppc")
|
|
|
|
release_sql_settings_ppc.link.flags:Add("-arch ppc")
|
|
|
|
release_sql_settings_ppc.cc.defines:Add("CONF_RELEASE", "CONF_SQL")
|
|
|
|
|
|
|
|
ppc_d = build(debug_settings_ppc)
|
|
|
|
ppc_r = build(release_settings_ppc)
|
|
|
|
sql_ppc_d = build(debug_sql_settings_ppc)
|
|
|
|
sql_ppc_r = build(release_sql_settings_ppc)
|
|
|
|
|
|
|
|
if arch == "ia32" or arch == "amd64" then
|
|
|
|
debug_settings_x86 = debug_settings:Copy()
|
|
|
|
debug_settings_x86.config_name = "debug_x86"
|
|
|
|
debug_settings_x86.config_ext = "_x86_d"
|
|
|
|
debug_settings_x86.cc.flags:Add("-arch i386")
|
|
|
|
debug_settings_x86.link.flags:Add("-arch i386")
|
|
|
|
debug_settings_x86.cc.defines:Add("CONF_DEBUG")
|
|
|
|
|
|
|
|
debug_sql_settings_x86 = debug_sql_settings:Copy()
|
|
|
|
debug_sql_settings_x86.config_name = "sql_debug_x86"
|
|
|
|
debug_sql_settings_x86.config_ext = "_sql_x86_d"
|
|
|
|
debug_sql_settings_x86.cc.flags:Add("-arch i386")
|
|
|
|
debug_sql_settings_x86.link.flags:Add("-arch i386")
|
|
|
|
debug_sql_settings_x86.cc.defines:Add("CONF_DEBUG", "CONF_SQL")
|
|
|
|
|
|
|
|
release_settings_x86 = release_settings:Copy()
|
|
|
|
release_settings_x86.config_name = "release_x86"
|
|
|
|
release_settings_x86.config_ext = "_x86"
|
|
|
|
release_settings_x86.cc.flags:Add("-arch i386")
|
|
|
|
release_settings_x86.link.flags:Add("-arch i386")
|
|
|
|
release_settings_x86.cc.defines:Add("CONF_RELEASE")
|
|
|
|
|
|
|
|
release_sql_settings_x86 = release_sql_settings:Copy()
|
|
|
|
release_sql_settings_x86.config_name = "sql_release_x86"
|
|
|
|
release_sql_settings_x86.config_ext = "_sql_x86"
|
|
|
|
release_sql_settings_x86.cc.flags:Add("-arch i386")
|
|
|
|
release_sql_settings_x86.link.flags:Add("-arch i386")
|
|
|
|
release_sql_settings_x86.cc.defines:Add("CONF_RELEASE", "CONF_SQL")
|
|
|
|
|
|
|
|
x86_d = build(debug_settings_x86)
|
|
|
|
sql_x86_d = build(debug_sql_settings_x86)
|
|
|
|
x86_r = build(release_settings_x86)
|
|
|
|
sql_x86_r = build(release_sql_settings_x86)
|
2011-11-13 00:29:19 +00:00
|
|
|
end
|
|
|
|
|
2012-04-12 14:46:47 +00:00
|
|
|
if arch == "amd64" then
|
|
|
|
debug_settings_x86_64 = debug_settings:Copy()
|
|
|
|
debug_settings_x86_64.config_name = "debug_x86_64"
|
|
|
|
debug_settings_x86_64.config_ext = "_x86_64_d"
|
|
|
|
debug_settings_x86_64.cc.flags:Add("-arch x86_64")
|
|
|
|
debug_settings_x86_64.link.flags:Add("-arch x86_64")
|
|
|
|
debug_settings_x86_64.cc.defines:Add("CONF_DEBUG")
|
|
|
|
|
|
|
|
debug_sql_settings_x86_64 = debug_sql_settings:Copy()
|
|
|
|
debug_sql_settings_x86_64.config_name = "sql_debug_x86_64"
|
|
|
|
debug_sql_settings_x86_64.config_ext = "_sql_x86_64_d"
|
|
|
|
debug_sql_settings_x86_64.cc.flags:Add("-arch x86_64")
|
|
|
|
debug_sql_settings_x86_64.link.flags:Add("-arch x86_64")
|
|
|
|
debug_sql_settings_x86_64.cc.defines:Add("CONF_DEBUG", "CONF_SQL")
|
|
|
|
|
|
|
|
release_settings_x86_64 = release_settings:Copy()
|
|
|
|
release_settings_x86_64.config_name = "release_x86_64"
|
|
|
|
release_settings_x86_64.config_ext = "_x86_64"
|
|
|
|
release_settings_x86_64.cc.flags:Add("-arch x86_64")
|
|
|
|
release_settings_x86_64.link.flags:Add("-arch x86_64")
|
|
|
|
release_settings_x86_64.cc.defines:Add("CONF_RELEASE")
|
|
|
|
|
|
|
|
release_sql_settings_x86_64 = release_sql_settings:Copy()
|
|
|
|
release_sql_settings_x86_64.config_name = "sql_release_x86_64"
|
|
|
|
release_sql_settings_x86_64.config_ext = "_sql_x86_64"
|
|
|
|
release_sql_settings_x86_64.cc.flags:Add("-arch x86_64")
|
|
|
|
release_sql_settings_x86_64.link.flags:Add("-arch x86_64")
|
|
|
|
release_sql_settings_x86_64.cc.defines:Add("CONF_RELEASE", "CONF_SQL")
|
|
|
|
|
2013-12-30 01:53:13 +00:00
|
|
|
x86_64_d = build(debug_settings_x86_64)
|
|
|
|
sql_x86_64_d = build(debug_sql_settings_x86_64)
|
|
|
|
x86_64_r = build(release_settings_x86_64)
|
|
|
|
sql_x86_64_r = build(release_sql_settings_x86_64)
|
2011-11-13 00:29:19 +00:00
|
|
|
end
|
2013-12-30 01:53:13 +00:00
|
|
|
|
2012-04-12 14:46:47 +00:00
|
|
|
DefaultTarget("game_debug_x86")
|
2013-12-30 01:53:13 +00:00
|
|
|
|
|
|
|
if config.macosxppc.value == 1 then
|
|
|
|
if arch == "ia32" then
|
|
|
|
PseudoTarget("release", ppc_r, x86_r)
|
|
|
|
PseudoTarget("debug", ppc_d, x86_d)
|
|
|
|
PseudoTarget("server_release", "server_release_ppc", "server_release_x86")
|
|
|
|
PseudoTarget("server_debug", "server_debug_ppc", "server_debug_x86")
|
|
|
|
PseudoTarget("client_release", "client_release_ppc", "client_release_x86")
|
|
|
|
PseudoTarget("client_debug", "client_debug_ppc", "client_debug_x86")
|
|
|
|
PseudoTarget("sql_release", sql_ppc_r, sql_x86_r)
|
|
|
|
PseudoTarget("sql_debug", sql_ppc_d, sql_x86_d)
|
|
|
|
PseudoTarget("server_sql_release", "server_sql_release_ppc", "server_sql_release_x86")
|
|
|
|
PseudoTarget("server_sql_debug", "server_sql_debug_ppc", "server_sql_debug_x86")
|
|
|
|
elseif arch == "amd64" then
|
|
|
|
PseudoTarget("release", ppc_r, x86_r, x86_64_r)
|
|
|
|
PseudoTarget("debug", ppc_d, x86_d, x86_64_d)
|
|
|
|
PseudoTarget("server_release", "server_release_ppc", "server_release_x86", "server_release_x86_64")
|
|
|
|
PseudoTarget("server_debug", "server_debug_ppc", "server_debug_x86", "server_debug_x86_64")
|
|
|
|
PseudoTarget("client_release", "client_release_ppc", "client_release_x86", "client_release_x86_64")
|
|
|
|
PseudoTarget("client_debug", "client_debug_ppc", "client_debug_x86", "client_debug_x86_64")
|
|
|
|
PseudoTarget("sql_release", sql_ppc_r, sql_x86_r, sql_x86_64_r)
|
|
|
|
PseudoTarget("sql_debug", sql_ppc_d, sql_x86_d, sql_x86_64_d)
|
|
|
|
PseudoTarget("server_sql_release", "server_sql_release_ppc", "server_sql_release_x86", "server_sql_release_x86_64")
|
|
|
|
PseudoTarget("server_sql_debug", "server_sql_debug_ppc", "server_sql_debug_x86", "server_sql_debug_x86_64")
|
|
|
|
else
|
|
|
|
PseudoTarget("release", ppc_r)
|
|
|
|
PseudoTarget("debug", ppc_d)
|
|
|
|
PseudoTarget("server_release", "server_release_ppc")
|
|
|
|
PseudoTarget("server_debug", "server_debug_ppc")
|
|
|
|
PseudoTarget("client_release", "client_release_ppc")
|
|
|
|
PseudoTarget("client_debug", "client_debug_ppc")
|
|
|
|
PseudoTarget("sql_release", sql_ppc_r)
|
|
|
|
PseudoTarget("sql_debug", sql_ppc_d)
|
|
|
|
PseudoTarget("server_sql_release", "server_sql_release_ppc")
|
|
|
|
PseudoTarget("server_sql_debug", "server_sql_debug_ppc")
|
|
|
|
end
|
2011-11-13 00:29:19 +00:00
|
|
|
else
|
2013-12-30 01:53:13 +00:00
|
|
|
if arch == "ia32" then
|
|
|
|
PseudoTarget("release", x86_r)
|
|
|
|
PseudoTarget("debug", x86_d)
|
|
|
|
PseudoTarget("server_release", "server_release_x86")
|
|
|
|
PseudoTarget("server_debug", "server_debug_x86")
|
|
|
|
PseudoTarget("client_release", "client_release_x86")
|
|
|
|
PseudoTarget("client_debug", "client_debug_x86")
|
|
|
|
PseudoTarget("sql_release", sql_x86_r)
|
|
|
|
PseudoTarget("sql_debug", sql_x86_d)
|
|
|
|
PseudoTarget("server_sql_release", "server_sql_release_x86")
|
|
|
|
PseudoTarget("server_sql_debug", "server_sql_debug_x86")
|
|
|
|
elseif arch == "amd64" then
|
|
|
|
PseudoTarget("release", x86_r, x86_64_r)
|
|
|
|
PseudoTarget("debug", x86_d, x86_64_d)
|
|
|
|
PseudoTarget("server_release", "server_release_x86", "server_release_x86_64")
|
|
|
|
PseudoTarget("server_debug", "server_debug_x86", "server_debug_x86_64")
|
|
|
|
PseudoTarget("client_release", "client_release_x86", "client_release_x86_64")
|
|
|
|
PseudoTarget("client_debug", "client_debug_x86", "client_debug_x86_64")
|
|
|
|
PseudoTarget("sql_release", sql_x86_r, sql_x86_64_r)
|
|
|
|
PseudoTarget("sql_debug", sql_x86_d, sql_x86_64_d)
|
|
|
|
PseudoTarget("server_sql_release", "server_sql_release_x86", "server_sql_release_x86_64")
|
|
|
|
PseudoTarget("server_sql_debug", "server_sql_debug_x86", "server_sql_debug_x86_64")
|
|
|
|
end
|
2011-11-13 00:29:19 +00:00
|
|
|
end
|
2012-03-27 20:49:19 +00:00
|
|
|
else
|
2012-04-12 14:46:47 +00:00
|
|
|
build(debug_settings)
|
|
|
|
build(debug_sql_settings)
|
|
|
|
build(release_settings)
|
|
|
|
build(release_sql_settings)
|
|
|
|
DefaultTarget("game_debug")
|
2009-01-11 12:10:30 +00:00
|
|
|
end
|