Introduction

The Makefile is a text file written to maintain the construction of an output file from a set of source files. Normally, a Makefile is used to define the rules for building an executable binary file from a set of object files, which are created by compiling source files.

The Make program will read in the Makefile and use the rules to determine which source files require recompilation, and whether or not the executable file needs to be relinked. For large projects with dozens of source files, and complex interdependencies between the source and include files, the use of a Make program with a properly written Makefile is essential for ensuring that the executable is up-to-date. During the development cycle, the tedium of manually recompiling newly modified source files is removed from the programmer's responsiblity. The procedure is automated by the Make program, so that the programmer does not need to worry about which files need to be updated and how to perform the updating.

For most applications a Makefile is easy to write. A few minutes spent writing a Makefile can save the programmer a great deal of time that may have been wasted tediously typing in command lines to recompile a project. The Make program was designed to make the rebuilding procedure trivial and reliable.