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 ] action test_invoke [ invoke test ] // dependencies depend foo.o foo.h depend bar.o bar.h depend test.o [foo.h bar.h]