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>
37 lines
1.1 KiB
Lua
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
|