
outputfile1: dependent_file_1 dependent_file_2 command1 outputfile2: dependent_file_3 command2 Note: Makefiles are whitespace/tab sensitive. Below is the abstract format of a make file. Makefiles achieve this by maintaining the mapping of all the output files and their respective dependent files and the command which generates that output file. It is also optimal, as every time when the same executable is re-built/re-generated, the makefile can selectively generate only those output files whose source files have changed from the previous run. It is easy to use, as “make” is the only command that needs to be run, to generate the target executable. Makefiles, in simple terms, are files that provide an easy and optimal solution for building and re-building any executable.


Using makefiles for C programs in Linux Introduction
