peepee
Go to file
lemon-sherbet 650cda22ac shidding and fardding 2018-11-16 16:54:37 +01:00
LICENSE.txt owwwo 2018-11-13 20:12:28 +01:00
README.md grandma 2018-11-13 20:28:53 +01:00
install.sh oops 2018-11-13 20:24:22 +01:00
lcmk.lua shidding and fardding 2018-11-16 16:54:37 +01:00

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). 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"
end

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