If your program consists of a only a few files that can be built with a simple command line invoking the compiler, then make
may be superfluous. However, in large projects you may have dozens of files that require complex compiler and linker options, then make
or a similar tool becomes a necessity. Consider, if you have a project with 50 C++ source files, and you change just one of them, you don't want to have re-compile all of them. You'd much rather just re-compile the one file that changed and re-link with the existing object files for the rest of them. Tools like make
automatically take care of chores like that.
The make
language has a number of warts, and I don't think it is anybody's favorite programming language. It is also very tricky to write a makefile
that will work on multiple platforms, say Linux, OS X, and Windows. Tools like cmake
can be used to generate makefiles
that will work on multiple platforms, and lets you describe the process of building your software in a language that is arguably less ugly than make
proper.