Introduction  the "Make" Build System 
What is a Build System ?
A Build System is a piece of program that takes source code as input and produces a deployable software (e.g. static library, executable) as output.

The host machine contains the build system
Example ...
              Make, Gradle, Maven, Ant e.t.c

Make
The Make build system uses Makefiles.

A Makefile is a text file with the name "Makefile" in a source directory, and it contains build targets and commands that tell Make how to build the current code base.
Makefiles
A simple makefile is made up of rules written in the following format :
Target : 
            The name of a file that is generated by a program; examples of targets are                        executable or object files. Can also be the name of the action to carry out.
Prerequisite : 
            File used as input to create a target
Command : 
            Action carried out by make
           Note - A tab must be put at the beginning of every command line
Example of a Rule:

   How a Makefile is processed

  • Make reads the Makefile in the current directory
  • The first target is processed first. This is known as the default goal.
  • The other rules are processed because their targets appear as prerequisite of the goal.
  • ​If a rule is not depended on by the goal that rule is not processed unless it is explicitly called.

Conclusion

This is all there is for this 5 minute introduction to the "make" build system, I know we are all busy so the aim of this short lecture was to provide you with the most useful information that can be consumed in 5 minutes.  Download the lecture here.

If you are really interested in learning how to develop embedded firmware using build systems such as "make" then take a look at our new course :  Embedded Build Systems with GNU Tools and Make

You can find out more here:

EmbeddedExpertIO - All Rights Reserved