2022-01-24 18:07:11 +01:00
|
|
|
TCC = "kos32-tcc -B" .. tup.getcwd().. "/develop/ktcc/trunk/bin"
|
2022-01-12 19:22:13 +01:00
|
|
|
|
2022-01-24 19:16:13 +01:00
|
|
|
CFLAGS = "-I" .. tup.getcwd().. "/develop/ktcc/trunk/libc.obj/include "
|
2022-01-12 19:22:13 +01:00
|
|
|
LFLAGS = ""
|
|
|
|
LIBS = ""
|
|
|
|
|
|
|
|
OBJS = {}
|
|
|
|
|
|
|
|
function compile_tcc(input, output)
|
|
|
|
if not output then output = '%B.o' end
|
|
|
|
tup.append_table(OBJS,
|
2022-02-07 15:22:52 +01:00
|
|
|
tup.foreach_rule(input, TCC .. " -c " .. CFLAGS .. " %f -o %o", output)
|
2022-01-12 19:22:13 +01:00
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
function link_tcc(input, output)
|
|
|
|
if not output then input,output = OBJS,input end
|
|
|
|
tup.rule(input, TCC .. " " .. CFLAGS .. " " .. LFLAGS .. " %f -o %o " .. LIBS .. " " .. tup.getconfig("KPACK_CMD"), output)
|
|
|
|
end
|