Makefile: handle header dependencies

Generate and use gcc's dependency output in the Makefile to handle
dependencies that aren't covered by pattern rules.
Makefile: Allow sources in subdirs

Use SRCDIR to specify a directory with sources.
Makefile: Allow putting build products in different folder

Support BUILDDIR variable to have generated files to be put there.
Add game_of_life app

A simulator of Conway's Game of Life.
Add backtrace snippet

Snippet showing how to obtain a backtrace within an application.
Makefile: Prepend default options to C(XX)FlAGS

In order to allow the snippet Makefiles to properly override default
flags, prepend the C(XX)FLAGS variable with those default options in the
common Makefile, instead of appending them.