forked from KolibriOS/kolibrios
Implement autobuild for(this libs in [`programs/develop/ktcc/bin/lib/`](https://git.kolibrios.org/KolibriOS/kolibrios/src/branch/main/programs/develop/ktcc/bin/lib)): + `crt0.o` + `libtcc1.a` + `tiny.o` + `libshell.a` + `libcryptal.a` + `libsound.a` it autobuild for kolibrios image and programs build. `link_tcc` automatically add this libs to `extra_inputs` roots of this grow from #311 --------- Co-authored-by: Burer <burer@kolibrios.org> Reviewed-on: KolibriOS/kolibrios#339 Reviewed-by: Burer <burer@kolibrios.org> Reviewed-by: Mikhail Frolov <mixa.frolov2003@gmail.com> Co-authored-by: Егор <y.yarin@inbox.ru> Co-committed-by: Егор <y.yarin@inbox.ru>
53 lines
1.1 KiB
Lua
Executable File
53 lines
1.1 KiB
Lua
Executable File
FASM_SRC = {
|
|
"crt/crt0.asm",
|
|
}
|
|
|
|
if tup.getconfig("NO_TCC") == "" then
|
|
|
|
CFLAGS = " -r -nostdinc -nostdlib -DGNUC -D_BUILD_LIBC "
|
|
INCLUDES = " -I../include"
|
|
|
|
GAS_SRC = {
|
|
"setjmp/setjmp.s",
|
|
"setjmp/longjmp.s",
|
|
"math/round.s",
|
|
"math/atan.s",
|
|
"math/pow2.s",
|
|
"math/log10.s",
|
|
"math/exp.s",
|
|
"math/pow10.s",
|
|
"math/log.s",
|
|
"math/pow.s",
|
|
"math/ceil.s",
|
|
"math/cos.s",
|
|
"math/sin.s",
|
|
"math/asin.s",
|
|
"math/modf.s",
|
|
"math/floor.s",
|
|
"math/fabs.s",
|
|
"math/fmod.s",
|
|
"math/log2.s",
|
|
"math/acos.s",
|
|
"math/modfl.s",
|
|
"math/atan2.s",
|
|
"math/sqrt.s",
|
|
"math/tan.s",
|
|
"string/memset.s",
|
|
"string/memmove.s"
|
|
}
|
|
|
|
OBJS = { "libc.c" }
|
|
|
|
tup.append_table(OBJS, tup.foreach_rule(GAS_SRC, "as --32 %f -o %o", "%B.o"))
|
|
|
|
tup.rule(OBJS, "kos32-tcc" .. CFLAGS .. INCLUDES .. " %f -o %o " .. " && strip %o --strip-unneeded ", "libc.o")
|
|
tup.rule("libc.o", "objconv -fcoff32 %f %o " .. tup.getconfig("KPACK_CMD"), "%B.obj")
|
|
|
|
end
|
|
|
|
if tup.getconfig("NO_FASM") == "" then
|
|
|
|
tup.rule(FASM_SRC, "fasm %f %o", "%B.o")
|
|
|
|
end
|