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>
22 lines
789 B
Lua
22 lines
789 B
Lua
if tup.getconfig("NO_TCC") ~= "" or tup.getconfig("NO_FASM") ~= "" then return end
|
|
|
|
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
|
|
tup.include(HELPERDIR .. "/use_tcc.lua")
|
|
CFLAGS += " -I" .. tup.getvariantdir()
|
|
|
|
if tup.getconfig("LANG") == "ru_RU"
|
|
then C_LANG = "LANG_RUS"
|
|
else C_LANG = "LANG_ENG" -- this includes default case without config
|
|
end
|
|
|
|
if tup.getconfig("TUP_PLATFORM") == "win32"
|
|
-- on win32 '#' is not a special character, but backslash and quotes would be printed as is
|
|
then tup.rule('echo #define ' .. C_LANG .. ' 1 > %o', {"lang.h"})
|
|
-- on unix '#' should be escaped
|
|
else tup.rule('echo "#define" ' .. C_LANG .. ' 1 > %o', {"lang.h"})
|
|
end
|
|
|
|
LIBS = ""
|
|
|
|
link_tcc({"shell.c", "system/kolibri.c", extra_inputs = {"lang.h"}}, "shell");
|