great simplification of Makefile

This series of commits reduces makefile from copy-paste bloat into just few (with hope easy understedable) lines.