updated the bam file for the new bam

This commit is contained in:
Magnus Auvinen 2008-04-20 22:30:59 +00:00
parent 6ecc2efaec
commit 3e14fc3b2c

View file

@ -35,42 +35,66 @@ function cmd5(output, inputs)
return os.execute(cmd) return os.execute(cmd)
end end
function cmd5(output, inputs)
cmd = cmd5_tool .. " "
for i,v in inputs do
cmd = cmd .. v .. " "
end
cmd = cmd .. " > " .. output
return {"cmd5 " .. PathFilename(output), cmd}
end
function dat2c(output, data, name) function dat2c(output, data, name)
print("dat2c " .. PathFilename(output) .. " = " .. PathFilename(data)) return {
return os.execute(dat2c_compiler .. " " .. data .. " " .. name .. " > " .. output) "dat2c " .. PathFilename(output) .. " = " .. PathFilename(data),
dat2c_compiler .. " " .. data .. " " .. name .. " > " .. output,
}
end end
function dc_header(output, data, script) function dc_header(output, data, script)
print("dc_header " .. PathFilename(output) .. " = " .. PathFilename(data) .. " ~ " .. PathFilename(script)) return {
return os.execute(dc_compiler .. " " .. data .. " " .. script .. " -h " .. output) "dc_header " .. PathFilename(output) .. " = " .. PathFilename(data) .. " ~ " .. PathFilename(script),
dc_compiler .. " " .. data .. " " .. script .. " -h " .. output
}
end end
function dc_source(output, data, script, headerfile) function dc_source(output, data, script, headerfile)
print("dc_source " .. PathFilename(output) .. "+" .. PathFilename(headerfile) .. " = " .. PathFilename(data) .. " ~ " .. PathFilename(script))
cmd = dc_compiler .. " " .. data .. " " .. script .. " -s " .. output .. " " .. headerfile cmd = dc_compiler .. " " .. data .. " " .. script .. " -s " .. output .. " " .. headerfile
return os.execute(cmd) return {
"dc_source " .. PathFilename(output) .. "+" .. PathFilename(headerfile) .. " = " .. PathFilename(data) .. " ~ " .. PathFilename(script),
cmd
}
end end
function dc_data(output, data, script) function dc_data(output, data, script)
print("dc_data " .. PathFilename(output) .. " = " .. PathFilename(data) .. " ~ " .. PathFilename(script)) return {
return os.execute(dc_compiler .. " " .. data .. " " .. script .. " -d " .. output) "dc_data " .. PathFilename(output) .. " = " .. PathFilename(data) .. " ~ " .. PathFilename(script),
dc_compiler .. " " .. data .. " " .. script .. " -d " .. output
}
end end
function dc_cdata(output, data, script) function dc_cdata(output, data, script)
print("dc_cdata " .. PathFilename(output) .. " = " .. PathFilename(data) .. " ~ " .. PathFilename(script)) return {
return os.execute(dc_compiler .. " " .. data .. " " .. script .. " -c " .. output) "dc_cdata " .. PathFilename(output) .. " = " .. PathFilename(data) .. " ~ " .. PathFilename(script),
dc_compiler .. " " .. data .. " " .. script .. " -c " .. output
}
end end
function netobj_source(output, proto) function netobj_source(output, proto)
print("netobj source " .. PathFilename(output) .. " = " .. PathFilename(proto)) return {
return os.execute(netobj_compiler .. " source " .. proto .. " " .. output) "netobj source " .. PathFilename(output) .. " = " .. PathFilename(proto),
netobj_compiler .. " source " .. proto .. " " .. output
}
end end
function netobj_header(output, proto) function netobj_header(output, proto)
print("netobj header " .. PathFilename(output) .. " = " .. PathFilename(proto)) return {
return os.execute(netobj_compiler .. " header " .. proto .. " " .. output) "netobj header " .. PathFilename(output) .. " = " .. PathFilename(proto),
netobj_compiler .. " header " .. proto .. " " .. output
}
end end
function CHash(output, ...) function CHash(output, ...)
local inputs = {} local inputs = {}
local ih = collect_input(arg) local ih = collect_input(arg)
@ -113,7 +137,7 @@ function NetObjCompile(protofile, sourcefile, headerfile)
bam_add_job("netobj_header", headerfile, protofile) bam_add_job("netobj_header", headerfile, protofile)
bam_add_dependency(sourcefile, protofile) bam_add_dependency(sourcefile, protofile)
bam_add_dependency(headerfile, protofile) bam_add_dependency(headerfile, protofile)
bam_dependency_cpp(protofile, {}) bam_dependency_cpp(sourcefile, {"src"})
return {source = sourcefile, header=headerfile} return {source = sourcefile, header=headerfile}
end end