Makefiles
Automate the build.
Why Makefiles
Typing gcc commands by hand gets unmanageable fast. make reads a Makefile describing how to build your project and runs only the commands needed.
Its killer feature: it rebuilds a file only when its inputs are newer than its output, saving huge amounts of compile time.
Rule Anatomy
A rule has three parts: a target, its prerequisites, and a recipe.
The recipe line MUST begin with a real TAB character, not spaces. This is the single most common Makefile mistake.
target: prerequisite1 prerequisite2
<TAB>command to build target