2016-07-26 21:35:30 +00:00
|
|
|
include("mach/proto/as/build.lua")
|
|
|
|
include("mach/proto/ncg/build.lua")
|
|
|
|
|
2016-07-28 22:22:49 +00:00
|
|
|
definerule("ackfile",
|
|
|
|
{
|
|
|
|
srcs = { type="targets" },
|
|
|
|
deps = { type="targets", default={} },
|
|
|
|
},
|
|
|
|
function (e)
|
|
|
|
local plat = e.vars.plat
|
|
|
|
|
|
|
|
return cfile {
|
|
|
|
name = e.name,
|
|
|
|
srcs = e.srcs,
|
|
|
|
deps = {
|
2016-08-11 22:19:51 +00:00
|
|
|
"lang/cem/cemcom.ansi+pkg",
|
2016-08-07 19:56:53 +00:00
|
|
|
"lang/cem/cpp.ansi+pkg",
|
2016-07-28 22:22:49 +00:00
|
|
|
"plat/"..plat.."+tools",
|
|
|
|
"util/ack+pkg",
|
2016-08-07 19:56:53 +00:00
|
|
|
"util/misc+pkg",
|
2016-08-04 21:51:19 +00:00
|
|
|
e.deps
|
2016-07-28 22:22:49 +00:00
|
|
|
},
|
|
|
|
commands = {
|
|
|
|
"ACKDIR=$(INSDIR) $(INSDIR)/bin/ack -m%{plat} -c -o %{outs} %{ins} %{hdrpaths} %{ackcflags}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
)
|
|
|
|
|
2016-07-29 22:39:22 +00:00
|
|
|
definerule("acklibrary",
|
|
|
|
{
|
|
|
|
srcs = { type="targets", default={} },
|
|
|
|
hdrs = { type="targets", default={} },
|
|
|
|
deps = { type="targets", default={} },
|
|
|
|
},
|
|
|
|
function (e)
|
|
|
|
return clibrary {
|
|
|
|
name = e.name,
|
|
|
|
srcs = e.srcs,
|
|
|
|
hdrs = e.hdrs,
|
|
|
|
deps = {
|
|
|
|
"util/arch+pkg",
|
2016-08-04 21:51:19 +00:00
|
|
|
e.deps
|
2016-07-29 22:39:22 +00:00
|
|
|
},
|
|
|
|
_cfile = ackfile,
|
|
|
|
commands = {
|
2016-08-04 21:51:19 +00:00
|
|
|
"rm -f %{outs[1]}",
|
2016-08-07 19:56:53 +00:00
|
|
|
"ACKDIR=$(INSDIR) $(INSDIR)/bin/aal qc %{outs[1]} %{ins}"
|
2016-07-29 22:39:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
)
|
2016-07-28 22:22:49 +00:00
|
|
|
|
|
|
|
definerule("build_plat_tools",
|
2016-07-26 21:35:30 +00:00
|
|
|
{
|
2016-07-29 22:39:22 +00:00
|
|
|
arch = { type="string" },
|
|
|
|
plat = { type="string" },
|
2016-07-26 21:35:30 +00:00
|
|
|
},
|
|
|
|
function(e)
|
|
|
|
local descr = "plat/"..e.plat.."/descr"
|
|
|
|
|
|
|
|
local as = build_as {
|
|
|
|
name = "as",
|
|
|
|
arch = e.arch
|
|
|
|
}
|
|
|
|
|
|
|
|
local ncg = build_ncg {
|
|
|
|
name = "ncg",
|
|
|
|
arch = e.arch,
|
|
|
|
}
|
|
|
|
|
|
|
|
return installable {
|
|
|
|
name = e.name,
|
|
|
|
map = {
|
2016-07-28 22:22:49 +00:00
|
|
|
["$(PLATDEP)/"..e.plat.."/as"] = as,
|
|
|
|
["$(PLATDEP)/"..e.plat.."/ncg"] = ncg,
|
|
|
|
["$(PLATIND)/descr/"..e.plat] = descr,
|
2016-08-07 19:56:53 +00:00
|
|
|
"util/opt+pkg",
|
2016-07-26 21:35:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
)
|
2016-07-29 22:39:22 +00:00
|
|
|
|
|
|
|
definerule("build_plat_libs",
|
|
|
|
{
|
|
|
|
arch = { type="string" },
|
|
|
|
plat = { type="string" },
|
|
|
|
},
|
|
|
|
function(e)
|
|
|
|
return installable {
|
|
|
|
name = e.name,
|
|
|
|
map = {
|
2016-08-11 22:24:40 +00:00
|
|
|
"lang/basic/lib+pkg_"..e.plat,
|
|
|
|
"lang/cem/libcc.ansi+pkg_"..e.plat,
|
2016-08-07 19:56:53 +00:00
|
|
|
["$(PLATIND)/"..e.plat.."/libem.a"] = "mach/"..e.arch.."/libem+lib_"..e.plat,
|
2016-08-11 22:24:40 +00:00
|
|
|
["$(PLATIND)/"..e.plat.."/libend.a"] = "mach/"..e.arch.."/libend+lib_"..e.plat,
|
2016-08-07 19:56:53 +00:00
|
|
|
["$(PLATIND)/"..e.plat.."/libsys.a"] = "mach/"..e.arch.."/libsys+lib_"..e.plat,
|
2016-07-29 22:39:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
)
|
|
|
|
|
|
|
|
|