Make and Makefiles

This is an awesome intro to make, so start there.

Make is a utility to maintain groups of programs. Essentially, as programs got quite large, where there were lots of include files, complex steps in building, compiling, and where one change resulted in the whole program being compiled, make came to the rescue. It would be clever enough to know which part of the program was changed, and then would compile just that part.

As the name suggests, make actually makes something - a target. It can be used to update one file when a change in others occurs.

Variable assignment

VARIABLE = value //lazy set, when it is used not when declared
VARIABLE ?= value //set if absent
VARIABLE := value //values are expanded (set) when declared
VARIABLE += value //append