2016-08-10 22:30:32 +00:00
|
|
|
include("plat/build.lua")
|
2016-08-08 21:55:47 +00:00
|
|
|
|
|
|
|
tabgen {
|
|
|
|
name = "ctype_tab",
|
2018-06-21 21:24:23 +00:00
|
|
|
srcs = { "./core/ctype/char.tab" }
|
2016-08-08 21:55:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
normalrule {
|
|
|
|
name = "ctype_files",
|
2018-06-21 21:24:23 +00:00
|
|
|
ins = { "./core/ctype/genfiles" },
|
2016-08-08 21:55:47 +00:00
|
|
|
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
|
2016-11-06 20:49:47 +00:00
|
|
|
acklibrary {
|
|
|
|
name = "lib_"..plat,
|
|
|
|
srcs = {
|
2016-08-08 21:55:47 +00:00
|
|
|
"+ctype_files",
|
|
|
|
"+ctype_tab",
|
2018-06-23 21:15:42 +00:00
|
|
|
"./core/ctype/*.c",
|
2018-06-23 15:52:15 +00:00
|
|
|
"./core/errno/*.c",
|
2018-06-21 21:24:23 +00:00
|
|
|
"./core/locale/*.c",
|
2018-06-23 17:49:29 +00:00
|
|
|
"./core/math/*.c",
|
2018-06-21 21:24:23 +00:00
|
|
|
"./core/math/*.e",
|
2018-06-22 20:20:02 +00:00
|
|
|
"./core/misc/*.c",
|
2019-06-15 11:53:20 +00:00
|
|
|
"./core/printf/*.c",
|
|
|
|
"./core/scanf/*.c",
|
2018-06-23 21:15:42 +00:00
|
|
|
"./core/setjmp/*.c",
|
|
|
|
"./core/setjmp/*.e",
|
|
|
|
"./core/stdlib/*.c",
|
2019-06-15 20:22:01 +00:00
|
|
|
"./core/stdio/*.c",
|
2018-06-23 21:15:42 +00:00
|
|
|
"./core/string/*.c",
|
2018-06-23 17:49:29 +00:00
|
|
|
"./core/time/*.c",
|
2018-06-23 16:35:45 +00:00
|
|
|
"./sys/exit/*.c",
|
2018-06-23 21:15:42 +00:00
|
|
|
"./sys/malloc/*.c",
|
2018-06-23 17:18:16 +00:00
|
|
|
"./sys/misc/*.c",
|
2018-06-23 21:15:42 +00:00
|
|
|
"./sys/stdio/*.c",
|
2016-11-06 20:49:47 +00:00
|
|
|
},
|
2016-08-08 21:55:47 +00:00
|
|
|
hdrs = {}, -- must be empty
|
|
|
|
deps = {
|
2016-12-05 20:05:24 +00:00
|
|
|
"lang/cem/libcc.ansi/headers+pkg",
|
|
|
|
"plat/"..plat.."/include+pkg",
|
2018-06-21 21:24:23 +00:00
|
|
|
"./core/math/localmath.h",
|
2018-06-23 09:14:24 +00:00
|
|
|
"./core/stdlib/ext_fmt.h",
|
2018-06-23 21:15:42 +00:00
|
|
|
"./core/time/loc_time.h",
|
|
|
|
"./sys/malloc/malloc.h",
|
2016-08-08 21:55:47 +00:00
|
|
|
},
|
2016-11-06 20:49:47 +00:00
|
|
|
vars = { plat = plat }
|
|
|
|
}
|
2016-08-07 19:56:53 +00:00
|
|
|
|
|
|
|
ackfile {
|
|
|
|
name = "crt_"..plat,
|
|
|
|
srcs = { "./head_ac.e" },
|
|
|
|
vars = { plat = plat },
|
|
|
|
deps = {
|
|
|
|
"h+emheaders"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-06-10 11:25:48 +00:00
|
|
|
local suffix = plat:find("^em") and "m" or "o"
|
2016-08-07 19:56:53 +00:00
|
|
|
installable {
|
|
|
|
name = "pkg_"..plat,
|
|
|
|
map = {
|
2016-08-10 22:30:32 +00:00
|
|
|
"lang/cem/libcc.ansi/headers+pkg",
|
2018-06-10 11:25:48 +00:00
|
|
|
["$(PLATIND)/"..plat.."/c-ansi."..suffix] = "+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
|
|
|
|
|