What is a Makefile? How can you produce a Makefile for your project?

What is a Makefile? How can you produce a Makefile for your project?
C++ applications are generally composed of many source files, header files, and external libraries.Keeping track of all of the parts of such a application requires a mechanism that precisely specifies the input files involved, the tools needed to build, the intermediate targets and their dependencies, and the final executable target.

The most widely used utility for handling the job of building a project is make.
make reads the details of the project specifications and the instructions for the compiler from a Makefile.

With Qt, it is not necessary to write Makefiles. Qt provides a tool called qmake to generate Makefiles.
Depending on the development environment, developers may use variants of make, such as mingw32-make, gmake, or unsermake ,nmake in MS Dev Studio.

No comments: