Build refactoring

Here is the next set of small changes to the Makefile as preliminaries to more fundamental changes.