Version 7 of smake

Updated 2003-09-01 11:08:13

Philipp Roessler

The small smake[L1 ] program by Kristoffer Lawson proved immensely useful for me; but it took me some while to figure out how to tweak it that it suited my needs perfectly - just put Tcl commands in the right place. So here is my addition to the original man page:

       Here is an example Smakefile that demonstrates how
       smake can be extended using Tcl syntax.

       target hello.o {
         depend {foo.h main.c} {
           compile main.c \
             -Wall \
             -I/usr/include/ \
             -I..
         }
       }
       target testiprg {
         depend {main.o} {
           link testiprg {foo.o main.o \
             -L/usr/lib} {stdc++ tcl8.0 tk8.0}
         }
       }
       # note the position of the curly braces for link!
       target all {
         global Compiler Linker
         set Compiler "c++"
         set Linker "c++"
         depend testiprg {}
       }
       target clean {
         file delete [glob *.o]
       }

See also: A Little Make Replacement