From 3ff8dda3d458612fcbbfc9570a7fc344c887b730 Mon Sep 17 00:00:00 2001 From: turbocat Date: Wed, 12 Jan 2022 18:26:44 +0000 Subject: [PATCH] SHELL: now uses autoimport. git-svn-id: svn://kolibrios.org@9624 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/system/shell/Tupfile.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/programs/system/shell/Tupfile.lua b/programs/system/shell/Tupfile.lua index 064303fe72..cded93ee67 100644 --- a/programs/system/shell/Tupfile.lua +++ b/programs/system/shell/Tupfile.lua @@ -1,8 +1,9 @@ if tup.getconfig("NO_TCC") ~= "" then return end - -TCC="kos32-tcc" -CFLAGS = "-I../../develop/ktcc/trunk/libc.obj/include" -LDFLAGS = "-nostdlib ../../develop/ktcc/trunk/bin/lib/crt0.o -L../../develop/ktcc/trunk/bin/lib" +if tup.getconfig("HELPERDIR") == "" +then + HELPERDIR = "../../../programs" +end +tup.include(HELPERDIR .. "/use_tcc.lua") if tup.getconfig("LANG") == "ru" then C_LANG = "LANG_RUS" @@ -16,7 +17,6 @@ then tup.rule('echo #define ' .. C_LANG .. ' 1 > %o', {"lang.h"}) else tup.rule('echo "#define" ' .. C_LANG .. ' 1 > %o', {"lang.h"}) end -LIBS = "-ltcc -lc.obj" -COMMAND=string.format("%s %s %s %s %s", TCC, CFLAGS, LDFLAGS , "%f -o %o", LIBS) +LIBS = "" -tup.rule({"shell.c", "system/kolibri.c", extra_inputs = {"lang.h"}}, COMMAND .. tup.getconfig("KPACK_CMD"), "shell") \ No newline at end of file +link_tcc({"shell.c", "system/kolibri.c", extra_inputs = {"lang.h"}}, "shell");