files
kolibrios/programs/use_tcc.lua
Andrew f5ddbaa599
Some checks failed
Build system / Check kernel codestyle (pull_request) Successful in 22s
Build system / Build (pull_request) Failing after 26s
develop/ktcc: Post-SVN tidy
- Move source code from `trunk` into program root directory.
- Update build files and include paths.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.
2025-05-24 12:03:37 +01:00

20 lines
565 B
Lua

TCC = "kos32-tcc -B" .. tup.getcwd().. "/develop/ktcc/bin"
CFLAGS = "-I" .. tup.getcwd().. "/develop/ktcc/libc.obj/include "
LFLAGS = ""
LIBS = ""
OBJS = {}
function compile_tcc(input, output)
if not output then output = '%B.o' end
tup.append_table(OBJS,
tup.foreach_rule(input, TCC .. " -c " .. CFLAGS .. " %f -o %o", output)
)
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