Subversion Repositories Kolibri OS

Rev

Rev 8830 | Rev 8832 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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