2016-08-10 22:30:32 +00:00
|
|
|
include("plat/build.lua")
|
2016-08-08 21:55:47 +00:00
|
|
|
|
|
|
|
tabgen {
|
|
|
|
name = "ctype_tab",
|
|
|
|
srcs = { "./ctype/char.tab" }
|
|
|
|
}
|
|
|
|
|
|
|
|
normalrule {
|
|
|
|
name = "ctype_files",
|
|
|
|
ins = { "./ctype/genfiles" },
|
|
|
|
outleaves = {
|
|
|
|
"isalnum.c",
|
|
|
|
"isalpha.c",
|
|
|
|
"isascii.c",
|
|
|
|
"iscntrl.c",
|
|
|
|
"isdigit.c",
|
|
|
|
"isgraph.c",
|
|
|
|
"islower.c",
|
|
|
|
"isprint.c",
|
|
|
|
"ispunct.c",
|
|
|
|
"isspace.c",
|
|
|
|
"isupper.c",
|
|
|
|
"isxdigit.c",
|
|
|
|
},
|
|
|
|
commands = {
|
|
|
|
"sh %{ins[1]} %{dir}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-08-07 19:56:53 +00:00
|
|
|
for _, plat in ipairs(vars.plats) do
|
|
|
|
acklibrary {
|
|
|
|
name = "lib_"..plat,
|
|
|
|
srcs = {
|
2016-08-08 21:55:47 +00:00
|
|
|
"+ctype_files",
|
|
|
|
"+ctype_tab",
|
|
|
|
"./ctype/*.c",
|
|
|
|
"./errno/*.c",
|
|
|
|
"./locale/*.c",
|
2016-08-10 22:30:32 +00:00
|
|
|
"./malloc/*.c",
|
2016-08-08 21:55:47 +00:00
|
|
|
"./math/*.c",
|
|
|
|
"./misc/environ.c", -- don't build everything here as it's all obsolete
|
|
|
|
"./setjmp/*.c",
|
|
|
|
"./setjmp/*.e",
|
|
|
|
"./signal/*.c",
|
2016-08-10 22:30:32 +00:00
|
|
|
"./assert/*.c",
|
2016-08-08 21:55:47 +00:00
|
|
|
"./stdio/*.c",
|
|
|
|
"./stdlib/*.c",
|
|
|
|
"./string/*.c",
|
|
|
|
"./time/*.c",
|
|
|
|
|
2016-08-07 19:56:53 +00:00
|
|
|
},
|
2016-08-08 21:55:47 +00:00
|
|
|
hdrs = {}, -- must be empty
|
|
|
|
deps = {
|
2016-08-10 22:30:32 +00:00
|
|
|
"lang/cem/libcc.ansi/headers+headers",
|
2016-08-14 09:01:36 +00:00
|
|
|
"plat/"..plat.."/include+headers",
|
2016-08-08 21:55:47 +00:00
|
|
|
},
|
2016-08-07 19:56:53 +00:00
|
|
|
vars = { plat = plat }
|
|
|
|
}
|
|
|
|
|
|
|
|
ackfile {
|
|
|
|
name = "crt_"..plat,
|
|
|
|
srcs = { "./head_ac.e" },
|
|
|
|
vars = { plat = plat },
|
|
|
|
deps = {
|
|
|
|
"h+emheaders"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
installable {
|
|
|
|
name = "pkg_"..plat,
|
|
|
|
map = {
|
2016-08-10 22:30:32 +00:00
|
|
|
"lang/cem/libcc.ansi/headers+pkg",
|
2016-08-07 19:56:53 +00:00
|
|
|
["$(PLATIND)/"..plat.."/c-ansi.o"] = "+crt_"..plat,
|
2016-08-08 21:55:47 +00:00
|
|
|
["$(PLATIND)/"..plat.."/libc.a"] = "+lib_"..plat,
|
2016-08-07 19:56:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|