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",
|
2022-07-14 21:57:54 +00:00
|
|
|
"./core/ctype/tolower.c",
|
|
|
|
"./core/ctype/toupper.c",
|
|
|
|
"./core/errno/errlist.c",
|
|
|
|
"./core/errno/perror.c",
|
|
|
|
"./core/errno/strerror.c",
|
|
|
|
"./core/locale/localeconv.c",
|
|
|
|
"./core/locale/setlocale.c",
|
|
|
|
"./core/math/asin.c",
|
|
|
|
"./core/math/atan2.c",
|
|
|
|
"./core/math/atan.c",
|
|
|
|
"./core/math/ceil.c",
|
|
|
|
"./core/math/exp.c",
|
|
|
|
"./core/math/fabs.c",
|
|
|
|
"./core/math/floor.c",
|
|
|
|
"./core/math/fmod.c",
|
|
|
|
"./core/math/frexp.e",
|
|
|
|
"./core/math/hugeval.c",
|
|
|
|
"./core/math/hypot.c",
|
|
|
|
"./core/math/isnan.c",
|
|
|
|
"./core/math/ldexp.c",
|
|
|
|
"./core/math/log10.c",
|
|
|
|
"./core/math/log.c",
|
|
|
|
"./core/math/modf.e",
|
|
|
|
"./core/math/pow.c",
|
|
|
|
"./core/math/sin.c",
|
|
|
|
"./core/math/sinh.c",
|
|
|
|
"./core/math/sqrt.c",
|
|
|
|
"./core/math/tan.c",
|
|
|
|
"./core/math/tanh.c",
|
|
|
|
"./core/misc/abort.c",
|
|
|
|
"./core/misc/assert.c",
|
|
|
|
"./core/misc/getopt.c",
|
|
|
|
"./core/misc/raise.c",
|
|
|
|
"./core/misc/termcap.c",
|
|
|
|
"./core/printf/doprnt.c",
|
|
|
|
"./core/printf/fltpr.c",
|
|
|
|
"./core/printf/fprintf.c",
|
|
|
|
"./core/printf/icompute.c",
|
|
|
|
"./core/printf/itoa.c",
|
|
|
|
"./core/printf/printf.c",
|
|
|
|
"./core/printf/snprintf.c",
|
|
|
|
"./core/printf/sprintf.c",
|
|
|
|
"./core/printf/vfprintf.c",
|
|
|
|
"./core/printf/vprintf.c",
|
|
|
|
"./core/printf/vsnprintf.c",
|
|
|
|
"./core/printf/vsprintf.c",
|
|
|
|
"./core/scanf/doscan.c",
|
|
|
|
"./core/scanf/fscanf.c",
|
|
|
|
"./core/scanf/scanf.c",
|
|
|
|
"./core/scanf/sscanf.c",
|
|
|
|
"./core/scanf/vfscanf.c",
|
|
|
|
"./core/setjmp/setjmp.e",
|
|
|
|
"./core/setjmp/sigmisc.c",
|
|
|
|
"./core/stdio/clearerr.c",
|
|
|
|
"./core/stdio/feof.c",
|
|
|
|
"./core/stdio/ferror.c",
|
|
|
|
"./core/stdio/fgetc.c",
|
|
|
|
"./core/stdio/fgetpos.c",
|
|
|
|
"./core/stdio/fgets.c",
|
|
|
|
"./core/stdio/fputc.c",
|
|
|
|
"./core/stdio/fputs.c",
|
|
|
|
"./core/stdio/fread.c",
|
|
|
|
"./core/stdio/fsetpos.c",
|
|
|
|
"./core/stdio/fwrite.c",
|
|
|
|
"./core/stdio/getc.c",
|
|
|
|
"./core/stdio/getchar.c",
|
|
|
|
"./core/stdio/gets.c",
|
|
|
|
"./core/stdio/getw.c",
|
|
|
|
"./core/stdio/putc.c",
|
|
|
|
"./core/stdio/putchar.c",
|
|
|
|
"./core/stdio/puts.c",
|
|
|
|
"./core/stdio/putw.c",
|
|
|
|
"./core/stdio/rewind.c",
|
|
|
|
"./core/stdlib/abs.c",
|
|
|
|
"./core/stdlib/atof.c",
|
|
|
|
"./core/stdlib/atoi.c",
|
|
|
|
"./core/stdlib/atol.c",
|
|
|
|
"./core/stdlib/bsearch.c",
|
|
|
|
"./core/stdlib/div.c",
|
|
|
|
"./core/stdlib/ecvt.c",
|
|
|
|
"./core/stdlib/environ.c",
|
|
|
|
"./core/stdlib/ext_comp.c",
|
|
|
|
"./core/stdlib/getenv.c",
|
|
|
|
"./core/stdlib/labs.c",
|
|
|
|
"./core/stdlib/ldiv.c",
|
|
|
|
"./core/stdlib/mblen.c",
|
|
|
|
"./core/stdlib/mbstowcs.c",
|
|
|
|
"./core/stdlib/mbtowc.c",
|
|
|
|
"./core/stdlib/putenv.c",
|
|
|
|
"./core/stdlib/qsort.c",
|
|
|
|
"./core/stdlib/rand.c",
|
|
|
|
"./core/stdlib/setenv.c",
|
|
|
|
"./core/stdlib/strtod.c",
|
|
|
|
"./core/stdlib/strtol.c",
|
|
|
|
"./core/stdlib/wcstombs.c",
|
|
|
|
"./core/stdlib/wctomb.c",
|
|
|
|
"./core/string/memchr.c",
|
|
|
|
"./core/string/memcmp.c",
|
|
|
|
"./core/string/memcpy.c",
|
|
|
|
"./core/string/memmove.c",
|
|
|
|
"./core/string/memset.c",
|
|
|
|
"./core/string/strcat.c",
|
|
|
|
"./core/string/strchr.c",
|
|
|
|
"./core/string/strcmp.c",
|
|
|
|
"./core/string/strcoll.c",
|
|
|
|
"./core/string/strcpy.c",
|
|
|
|
"./core/string/strcspn.c",
|
|
|
|
"./core/string/strdup.c",
|
|
|
|
"./core/string/strlen.c",
|
|
|
|
"./core/string/strncat.c",
|
|
|
|
"./core/string/strncmp.c",
|
|
|
|
"./core/string/strncpy.c",
|
|
|
|
"./core/string/strpbrk.c",
|
|
|
|
"./core/string/strrchr.c",
|
|
|
|
"./core/string/strspn.c",
|
|
|
|
"./core/string/strstr.c",
|
|
|
|
"./core/string/strtok.c",
|
|
|
|
"./core/string/strxfrm.c",
|
|
|
|
"./core/time/asctime.c",
|
|
|
|
"./core/time/ctime.c",
|
|
|
|
"./core/time/difftime.c",
|
|
|
|
"./core/time/gmtime.c",
|
|
|
|
"./core/time/localtime.c",
|
|
|
|
"./core/time/misc.c",
|
|
|
|
"./core/time/mktime.c",
|
|
|
|
"./core/time/strftime.c",
|
|
|
|
"./core/time/tzset.c",
|
|
|
|
"./sys/exit/atexit.c",
|
|
|
|
"./sys/exit/exit.c",
|
|
|
|
"./sys/malloc/calloc.c",
|
|
|
|
"./sys/malloc/malloc.c",
|
|
|
|
"./sys/malloc/realloc.c",
|
|
|
|
"./sys/misc/clock.c",
|
|
|
|
"./sys/misc/getpass.c",
|
|
|
|
"./sys/misc/isatty.c",
|
|
|
|
"./sys/misc/mktemp.c",
|
|
|
|
"./sys/misc/popen.c",
|
|
|
|
"./sys/misc/remove.c",
|
|
|
|
"./sys/misc/sleep.c",
|
|
|
|
"./sys/misc/system.c",
|
|
|
|
"./sys/misc/time.c",
|
|
|
|
"./sys/stdio/data.c",
|
|
|
|
"./sys/stdio/fclose.c",
|
|
|
|
"./sys/stdio/fdopen.c",
|
|
|
|
"./sys/stdio/fflush.c",
|
|
|
|
"./sys/stdio/fileno.c",
|
|
|
|
"./sys/stdio/fillbuf.c",
|
|
|
|
"./sys/stdio/flushbuf.c",
|
|
|
|
"./sys/stdio/fopen.c",
|
|
|
|
"./sys/stdio/freopen.c",
|
|
|
|
"./sys/stdio/fseek.c",
|
|
|
|
"./sys/stdio/ftell.c",
|
|
|
|
"./sys/stdio/setbuf.c",
|
|
|
|
"./sys/stdio/setvbuf.c",
|
|
|
|
"./sys/stdio/tmpfile.c",
|
|
|
|
"./sys/stdio/tmpnam.c",
|
|
|
|
"./sys/stdio/ungetc.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
|
|
|
|
|