2016-07-26 21:35:30 +00:00
|
|
|
include("util/ncgg/build.lua")
|
|
|
|
|
|
|
|
definerule("build_ncg",
|
|
|
|
{
|
2022-07-14 21:57:54 +00:00
|
|
|
arch = { type="string" },
|
2016-07-26 21:35:30 +00:00
|
|
|
},
|
|
|
|
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 = {
|
2017-11-12 00:35:48 +00:00
|
|
|
"mach/proto/ncg/data.h",
|
|
|
|
"mach/proto/ncg/equiv.h",
|
|
|
|
"mach/proto/ncg/glosym.h",
|
|
|
|
"mach/proto/ncg/label.h",
|
|
|
|
"mach/proto/ncg/param.h",
|
|
|
|
"mach/proto/ncg/regvar.h",
|
|
|
|
"mach/proto/ncg/result.h",
|
|
|
|
"mach/proto/ncg/state.h",
|
|
|
|
"mach/proto/ncg/types.h",
|
2019-10-25 22:17:13 +00:00
|
|
|
"mach/proto/ncg/xmach.h",
|
2022-07-14 21:57:54 +00:00
|
|
|
"mach/"..e.arch.."/ncg+headers",
|
2016-07-26 21:35:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
local tables = ncgg {
|
|
|
|
name = e.name.."/tables",
|
|
|
|
srcs = { "mach/"..e.arch.."/ncg/table" }
|
|
|
|
}
|
|
|
|
|
|
|
|
return cprogram {
|
|
|
|
name = e.name,
|
|
|
|
srcs = {
|
2022-07-14 21:57:54 +00:00
|
|
|
"mach/proto/ncg/codegen.c",
|
|
|
|
"mach/proto/ncg/compute.c",
|
|
|
|
"mach/proto/ncg/equiv.c",
|
|
|
|
"mach/proto/ncg/fillem.c",
|
|
|
|
"mach/proto/ncg/gencode.c",
|
|
|
|
"mach/proto/ncg/glosym.c",
|
|
|
|
"mach/proto/ncg/label.c",
|
|
|
|
"mach/proto/ncg/main.c",
|
|
|
|
"mach/proto/ncg/move.c",
|
|
|
|
"mach/proto/ncg/nextem.c",
|
|
|
|
"mach/proto/ncg/reg.c",
|
|
|
|
"mach/proto/ncg/regvar.c",
|
|
|
|
"mach/proto/ncg/salloc.c",
|
|
|
|
"mach/proto/ncg/state.c",
|
|
|
|
"mach/proto/ncg/subr.c",
|
|
|
|
"mach/proto/ncg/var.c",
|
2016-08-04 22:01:55 +00:00
|
|
|
matching(filenamesof(tables), "%.c$")
|
2016-07-26 21:35:30 +00:00
|
|
|
},
|
|
|
|
deps = {
|
|
|
|
"h+emheaders",
|
|
|
|
"modules+headers",
|
|
|
|
"modules/src/flt_arith+lib",
|
|
|
|
"modules/src/object+lib",
|
2016-08-14 12:09:38 +00:00
|
|
|
"modules/src/em_data+lib",
|
2016-07-26 21:35:30 +00:00
|
|
|
headers,
|
|
|
|
tables, -- for .h file
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
)
|
|
|
|
|