peepee
install.sh | ||
lcmk.lua | ||
LICENSE.txt | ||
README.md |
what??
its a c build system. it is not the fastest nor the most extensible but damn me if it aint easy to use pardner.
please do not use this for any serious projects
installation
chmod +x install.sh
./install.sh
or, if you want to use luajit:
./install.sh -luajit
depends on luafilesystem or lua filesystem ffi if using luajit
usage
lcmk
will look for a file build.lua
in your current directory and execute it. this file may define the following global variables:
PROG
program name (for compilation output). REQUIREDSRC
table containing source file paths (.c and .cpp); do not define or set to "*.c" to letlcmk
find them by itselfCC
the C compiler.CFLAGS
string containing flags to be passed to the compilerLINK
string containing libraries to link against any of these variables might be provided through environment variables instead
then, you can invoke the program with lcmk [options]
options is an arbitrary list of strings stored in global table opt
that the build file might use to change something in the build.
the clean option is builtin and will remove all *.o files along with $PROG
an example build file could be:
SRC = {"main.c", "foo.c"}
PROG = "./foo"
CFLAGS = "-Wall"
LINK = "-lm"
if opt.debug then
CFLAGS = CFLAGS .. " -ggdb"
end
lcmk
will handle everything else (object files, dependencies, etc)