Files
kolibrios/programs/develop/ktcc/Tupfile.lua
T
Egor00fandBurer 175bd31489 add autobuild of some tcc libs (#339)
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>
2026-05-16 08:30:18 +00:00

37 lines
1.1 KiB
Lua

local LIBS = {}
if tup.getconfig("NO_FASM") == "" then
tup.append_table(LIBS, {
tup.getcwd() .. "/libc.obj/source/crt0.o",
tup.getcwd() .. "/lib/tiny/tiny.o",
})
end
if tup.getconfig("NO_TCC") == "" then
tup.append_table(LIBS, {
tup.getcwd() .. "/lib/libcryptal/libcryptal.a",
tup.getcwd() .. "/lib/libshell/libshell.a",
})
end
if tup.getconfig("NO_FASM") == "" and tup.getconfig("NO_TCC") == "" then
tup.append_table(LIBS, {
tup.getcwd() .. "/libc.obj/source/libtcc1/libtcc1.a",
})
end
tup.foreach_rule(LIBS, "cp %f %o", { tup.getcwd() .. "/bin/lib/%b", "<%b>" })
-- libsound.a lives in another subtree (contrib/), so reference its group
-- explicitly via extra_inputs to keep Tup ordering correct across trees.
if tup.getconfig("NO_FASM") == "" then
tup.rule(
{
"../../../contrib/sdk/sources/sound/libsound.a",
extra_inputs = { "../../../contrib/sdk/sources/sound/<libsound.a>" },
},
"cp %f %o",
{ tup.getcwd() .. "/bin/lib/libsound.a", "<libsound.a>" }
)
end