fixed building with mingw

This commit is contained in:
oy 2014-06-21 19:59:43 +02:00
parent 27da041e00
commit 4b41440f6b

10
bam.lua
View file

@ -48,13 +48,13 @@ function CHash(output, ...)
return output return output
end end
function ResCompile(scriptfile) function ResCompile(scriptfile, compiler)
scriptfile = Path(scriptfile) scriptfile = Path(scriptfile)
local output = nil local output = nil
if config.compiler.driver == "cl" then if compiler == "cl" then
output = PathJoin(generated_icon_dir, PathBase(PathFilename(scriptfile)) .. ".res") output = PathJoin(generated_icon_dir, PathBase(PathFilename(scriptfile)) .. ".res")
AddJob(output, "rc " .. scriptfile, "rc /fo " .. output .. " " .. scriptfile) AddJob(output, "rc " .. scriptfile, "rc /fo " .. output .. " " .. scriptfile)
elseif config.compiler.driver == "gcc" or config.compiler.driver == "clang" then elseif compiler == "gcc" or compiler == "clang" then
output = PathJoin(generated_icon_dir, PathBase(PathFilename(scriptfile)) .. ".coff") output = PathJoin(generated_icon_dir, PathBase(PathFilename(scriptfile)) .. ".coff")
AddJob(output, "windres " .. scriptfile, "windres -i " .. scriptfile .. " -o " .. output) AddJob(output, "windres " .. scriptfile, "windres -i " .. scriptfile .. " -o " .. output)
end end
@ -299,8 +299,8 @@ end
shared_icons = {} shared_icons = {}
function SharedIcons(compiler) function SharedIcons(compiler)
if not shared_icons[compiler] then if not shared_icons[compiler] then
local server_icon = ResCompile("other/icons/teeworlds_srv_" .. compiler .. ".rc") local server_icon = ResCompile("other/icons/teeworlds_srv_" .. compiler .. ".rc", compiler)
local client_icon = ResCompile("other/icons/teeworlds_" .. compiler .. ".rc") local client_icon = ResCompile("other/icons/teeworlds_" .. compiler .. ".rc", compiler)
shared_icons[compiler] = {server=server_icon, client=client_icon} shared_icons[compiler] = {server=server_icon, client=client_icon}
end end
return shared_icons[compiler] return shared_icons[compiler]