Simplify Makefiles for better maintenance.

Move generic parts which were duplicated
in Makefiles over time to Makefile.inc
to achieve better maintenance.