Makefile

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Makefile
Heckert GNU white.svg
Original author(s) Stuart Feldman
Operating system Unix-like
Type Software development tools
Website GNU Makefile

Makefile(s) are text files written in a certain prescribed syntax. Together with Make Utility, it helps build a software from its source files, a way to organize code compilation and linking. Most often, the Makefile tells make how to compile and link a program.

Introduction[edit]

Using C/C++ as an example, when a C/C++ source file is changed, it must be recompiled. If a header file has changed, each C/C++ source file that includes the header file must be recompiled to be safe. Each compilation produces an object file corresponding to the source file. Finally, if any source file has been recompiled, all the object files, whether newly made or saved from previous compilations, must be linked together to produce the new executable program.[1] These instructions with their dependencies are specified in a Makefile.

References[edit]