ack/mach/proto/ncg/build.lua
2016-08-14 11:34:18 +02:00

44 lines
821 B
Lua

include("util/ncgg/build.lua")
definerule("build_ncg",
{
arch = { type="string" }
},
function(e)
-- Remember this is executed from the caller's directory; local
-- target names will resolve there
local headers = clibrary {
name = e.name.."/headers",
srcs = {},
hdrs = {
"mach/proto/ncg/*.h",
"mach/"..e.arch.."/ncg/mach.c",
"mach/"..e.arch.."/ncg/*.h",
}
}
local tables = ncgg {
name = e.name.."/tables",
srcs = { "mach/"..e.arch.."/ncg/table" }
}
return cprogram {
name = e.name,
srcs = {
"mach/proto/ncg/*.c",
matching(filenamesof(tables), "%.c$")
},
deps = {
"h+emheaders",
"modules+headers",
"modules/src/flt_arith+lib",
"modules/src/object+lib",
"util/data+em_data",
headers,
tables, -- for .h file
}
}
end
)