2021-06-12 23:34:41 +02:00
|
|
|
if tup.getconfig("NO_TCC") ~= "" then return end
|
2022-04-24 17:05:38 +02:00
|
|
|
|
|
|
|
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
|
2022-01-12 19:26:44 +01:00
|
|
|
tup.include(HELPERDIR .. "/use_tcc.lua")
|
2024-05-21 16:45:21 +02:00
|
|
|
CFLAGS += " -I" .. tup.getvariantdir()
|
2014-09-12 17:15:23 +02:00
|
|
|
|
2021-06-12 23:38:18 +02:00
|
|
|
if tup.getconfig("LANG") == "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
|
|
|
|
|
2022-01-12 19:26:44 +01:00
|
|
|
LIBS = ""
|
2021-06-12 23:34:41 +02:00
|
|
|
|
2022-01-12 19:26:44 +01:00
|
|
|
link_tcc({"shell.c", "system/kolibri.c", extra_inputs = {"lang.h"}}, "shell");
|