Use GNU make: usually available in /usr/local/bin or /usr/gnu/bin
Provide a Makefile that supports:
different Operating Systems -- see Make.flags as an example for an include file
options for source and target directories -- to allow one source for multiple architectures
install -- to handle multiple packages
-- see Makefile as an example.
(Note: this is a hand made Makefile. With the include file, it produces the same result as the examples below, using Autoconf.)
Use Autoconf to generate configuration scripts for Makefiles
see configure.in as an example for a configure template
see Makefile.in as an example for a Makefile template for configure