Change makefile to reduce duplication.