A makefile is a file of rules read by make. Each rule names a target, usually a file to build; its prerequisites, the files it is built from; and a recipe, the shell commands that build it, each line starting with a tab character. make builds a target when it does not exist or when one of its prerequisites, after being brought up to date itself, was modified more recently than the target.
make after touch ratio_demo.c. Visiting the graph from the target down, it finds ratio_demo.o older than one of its prerequisites and rebuilds it; ratio_demo, now older than that new object file, is linked again; ratio.o is left alone. Shaded: the two commands of the third run.