SENS config-mgmt: How to use imake
Imake is a program that generates a Makefile
from a much smaller (and more declarative) file, called an
Imakefile. The idea is that an Imakefile
contains a description of what you want to build, with
no indication of how to build it. Conversely, a
Makefile contains a description of what you
want to build and also a description of how
to build it.
Systems built using imake exploit several different components:
- imake, the program itself
- cpp and make; imake uses cpp to produce Makefiles
that are then used by make
- a set of (platform-dependent) configuration files
- a script to bootstrap a Makefile from an Imakefile
Configuration files provide platform-specific definitions of
standard make macros and derived rules, e.g.:
- definitions of CC, AS, LD, etc.
- reusable common suffix rules.
Configuration files also provide #define macros that,
when applied, create customized chunks of Makefile
source. This macro facility can be used to define very
succinct, declarative build specifications. For example:
- facilities for easily specifying the construction of
argets that are dependent upon system libraries, and
- facilities for dealing with recursive makes over
subdirectories.
Kurt Stirewalt
Last modified: Thu May 24 19:42:43 EDT 2001