ddnet/default.bam

65 lines
1.9 KiB
Plaintext
Raw Normal View History

2007-05-22 15:05:28 +00:00
--
function copy(output, input)
print("copy " .. PathFilename(output))
local copy_command
if family == "windows" then
copy_command = "copy"
input = str_replace(input, "/", "\\")
output = str_replace(output, "/", "\\")
else
copy_command = "cp"
end
os.execute(copy_command .. " " .. input .. " " .. output)
return 0
end
function Copy(outputdir, ...)
local inputs = collect_input(arg)
local outputs = {}
-- compile all the files
for index, inname in inputs do
output = Path(outputdir .. "/" .. PathFilename(inname))
input = Path(inname)
bam_add_job("copy", output, input)
bam_add_dependency(output, input)
table.insert(outputs, output)
end
return outputs
end
--
--baselib = Import("src/baselib/baselib.bam")
baselib = Import("../baselib/baselib.bam")
2007-05-22 15:05:28 +00:00
settings = NewSettings()
baselib.apply(settings, "all")
server_settings = NewSettings()
baselib.apply(server_settings, "network")
2007-05-22 15:05:28 +00:00
settings.cc.debug = 1
settings.cc.optimize = 0
settings.cc.flags = "-Wall"
settings.cc.includes:add("src")
settings.cc.includes:add("../baselib/src/external/zlib")
2007-05-22 15:05:28 +00:00
2007-06-01 11:17:10 +00:00
engine = Compile(settings, Collect("src/engine/*.cpp"))
client = Compile(settings, Collect("src/engine/client/*.cpp", "src/engine/client/pnglite/*.c"))
server = Compile(settings, Collect("src/engine/server/*.cpp"))
game_shared = Compile(settings, Collect("src/game/*.cpp"))
game_client = Compile(settings, Collect("src/game/client/*.cpp"))
game_server = Compile(settings, Collect("src/game/server/*.cpp"))
editor = Compile(settings, Collect("src/editor/*.cpp"))
2007-05-22 15:05:28 +00:00
client_exe = Link(settings, "teewars", engine, client, game_shared, game_client)
server_exe = Link(server_settings, "teewars_srv", engine, server, game_shared, game_server)
-- editor_exe = Link(settings, "editor", engine, game_shared, editor)
2007-05-22 15:05:28 +00:00
Target(PseudoTarget("client", client_exe))
Target(PseudoTarget("server", server_exe))
-- Target(PseudoTarget("editor", editor_exe))