Makefile consolidation: use pattern rules when possible, tag PHONY targets.

Also, don't make 'all' target depend on 'clean', add TAGS target.