Alex Rivera | Logout

Why are Makefiles in Linux so useful?

Asked 2011-07-24T05:42:43.770
11

I want to know why makefiles in Linux are so useful (I mean in the practical sense). Why can't we just compile all our programs in the normal way?

Edit
Report

1 Answer

3

Complexity and time. A medium/big scale project contains hundreds of file with hundreds of dependencies. Do you want to remember them all? It is easy to make error when manually building the project. You could easily forget one dependency. And a big project may require several minutes to build. Make keeps track of time and recompile only those things that are necessary so that you don't need to wait several minutes during development.

The summary is make makes life easier.

answered 2011-07-24T05:55:08.533

Your Answer