You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lemon-sherbet 650cda22ac shidding and fardding 5 years ago
LICENSE.txt owwwo 5 years ago grandma 5 years ago oops 5 years ago
lcmk.lua shidding and fardding 5 years ago


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


chmod +x

or, if you want to use luajit:

./ -luajit

depends on luafilesystem or lua filesystem ffi if using luajit


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). REQUIRED
  • SRC table containing source file paths (.c and .cpp); do not define or set to "*.c" to let lcmk find them by itself
  • CC the C compiler.
  • CFLAGS string containing flags to be passed to the compiler
  • LINK 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"

lcmk will handle everything else (object files, dependencies, etc)