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>
26 lines
623 B
Lua
26 lines
623 B
Lua
if tup.getconfig("NO_TCC") ~= "" or tup.getconfig("NO_FASM") ~= "" then return end
|
|
|
|
local helperPath = "../../../../.."
|
|
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and helperPath or tup.getconfig("HELPERDIR")
|
|
tup.include(HELPERDIR .. "/use_tcc.lua")
|
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
|
|
|
TCC_SOURCES = {
|
|
"libtcc1.c",
|
|
}
|
|
|
|
FASM_SOURCES = {
|
|
"memcpy.asm",
|
|
"memmove.asm",
|
|
"memset.asm",
|
|
extra_inputs = {
|
|
helperPath .. "/proc32.inc"
|
|
}
|
|
}
|
|
|
|
compile_tcc(TCC_SOURCES)
|
|
|
|
tup.append_table(OBJS, tup.foreach_rule(FASM_SOURCES, FASM .. " %f %o", "%B.o"))
|
|
|
|
tup.rule(OBJS, "ar -rcs %o %f", "libtcc1.a")
|