Generalize makefile.

Use eval to generate rules based on PROGRAMS. Still requires
manual hacking for any new build requirements, but this is
a step toward automating the whole thing.

Also set a version variable from the git version. Currently unused.
Remove debugging 'dump' Makefile target.

Turns out you shouldn't believe the make manual's 'define foo ='
examples if you care about it working in make < 3.82.