OctaBuild/example/obuild.cfg

35 lines
529 B
INI

CC = (getenv CC)
if (=s $CC "") [
CC = "cc"
]
rule default test
OBJ = (strreplace (glob "*.c") ".c" ".o")
rule test $OBJ [
echo " LD" $target
shell $CC -o $target $sources
]
rule %.o %.c [
echo " CC" $target
shell $CC -c -o $target $source
]
action clean [
echo " CLEAN" $OBJ test
shell rm -f $OBJ test
]
action info [
echo "compiler:" $CC
echo "number of CPUs:" $numcpus
echo "number of jobs:" $numjobs
]
// dependencies
rule foo.o foo.h
rule bar.o bar.h
rule test.o [foo.h bar.h]