Subversion Repositories Kolibri OS

Rev

Rev 8831 | Rev 9624 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
8827 rgimad 1
if tup.getconfig("NO_TCC") ~= "" then return end
5098 clevermous 2
 
8827 rgimad 3
TCC="kos32-tcc"
4
CFLAGS  = "-I../../develop/ktcc/trunk/libc.obj/include"
5
LDFLAGS = "-nostdlib ../../develop/ktcc/trunk/bin/lib/crt0.o -L../../develop/ktcc/trunk/bin/lib"
5098 clevermous 6
 
8828 rgimad 7
if tup.getconfig("LANG") == "ru"
8
then C_LANG = "LANG_RUS"
9
else C_LANG = "LANG_ENG" -- this includes default case without config
10
end
11
 
12
if tup.getconfig("TUP_PLATFORM") == "win32"
13
-- on win32 '#' is not a special character, but backslash and quotes would be printed as is
14
then tup.rule('echo #define ' .. C_LANG .. ' 1 > %o', {"lang.h"})
15
-- on unix '#' should be escaped
16
else tup.rule('echo "#define" ' .. C_LANG .. ' 1 > %o', {"lang.h"})
17
end
18
 
8827 rgimad 19
LIBS = "-ltcc -lc.obj"
20
COMMAND=string.format("%s %s %s %s %s", TCC, CFLAGS, LDFLAGS , "%f -o %o",  LIBS)
21
 
8832 rgimad 22
tup.rule({"shell.c", "system/kolibri.c", extra_inputs = {"lang.h"}}, COMMAND .. tup.getconfig("KPACK_CMD"), "shell")