Organization of the book

This book is partitioned into following parts.

  1. First, it covers Basic Compilation:
    • Write basic Makefile to build sample source code.
    • Increase the complexity a little bit to compile more than one file.
    • Differerent aspects of make files/compilation/etc.
  2. Then, it introduces Makefile Generators:
    • Remove complexity of writing makefiles and generate Makefiles for cross platforms and different IDEs.
    • Introduce how to use other tools to build complex software with less effort.

If you are aware of C language, then you would agree that it is possible to write almost any kind of software in C language. But still, where applicable, people use higher languages. Given a choice that you can opt to implement something either with C++ or C, there is a big chance that you would prefer C++ over C. You may not use all the offerings of C++ language, but still if you see an advantage, you would choose C++ over C. On the same lines, if you can use much higher languages like Python, Ruby, C#, etc. you would try to abstain from C or C++.

In a similar sense, if you can use Premake, CMake, GYP, SCons, etc. for building software, it is recommended that you try to abstain from RAW Makefiles. Using advanced make Makefile generators like Premake or CMake would eventually make things more maintainable.