Rev 9624 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9624 | Rev 9781 | ||
---|---|---|---|
1 | if tup.getconfig("NO_TCC") ~= "" then return end |
1 | if tup.getconfig("NO_TCC") ~= "" then return end |
2 | if tup.getconfig("HELPERDIR") == "" |
- | |
3 | then |
2 | |
4 | HELPERDIR = "../../../programs" |
3 | HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR") |
5 | end |
- | |
6 | tup.include(HELPERDIR .. "/use_tcc.lua") |
4 | tup.include(HELPERDIR .. "/use_tcc.lua") |
7 | 5 | ||
8 | if tup.getconfig("LANG") == "ru" |
6 | if tup.getconfig("LANG") == "ru" |
9 | then C_LANG = "LANG_RUS" |
7 | then C_LANG = "LANG_RUS" |
10 | else C_LANG = "LANG_ENG" -- this includes default case without config |
8 | else C_LANG = "LANG_ENG" -- this includes default case without config |
11 | end |
9 | end |
12 | 10 | ||
13 | if tup.getconfig("TUP_PLATFORM") == "win32" |
11 | if tup.getconfig("TUP_PLATFORM") == "win32" |
14 | -- on win32 '#' is not a special character, but backslash and quotes would be printed as is |
12 | -- on win32 '#' is not a special character, but backslash and quotes would be printed as is |
15 | then tup.rule('echo #define ' .. C_LANG .. ' 1 > %o', {"lang.h"}) |
13 | then tup.rule('echo #define ' .. C_LANG .. ' 1 > %o', {"lang.h"}) |
16 | -- on unix '#' should be escaped |
14 | -- on unix '#' should be escaped |
17 | else tup.rule('echo "#define" ' .. C_LANG .. ' 1 > %o', {"lang.h"}) |
15 | else tup.rule('echo "#define" ' .. C_LANG .. ' 1 > %o', {"lang.h"}) |
18 | end |
16 | end |
19 | 17 | ||
20 | LIBS = "" |
18 | LIBS = "" |
21 | 19 | ||
22 | link_tcc({"shell.c", "system/kolibri.c", extra_inputs = {"lang.h"}}, "shell"); |
20 | link_tcc({"shell.c", "system/kolibri.c", extra_inputs = {"lang.h"}}, "shell"); |