Fixes to Makefile

There are a number of errors in the make file which cause the build
to fail on virgin systems. I've fixed them, commented where I feel it
helps clarify why the change was needed, and retested using my clean
system to verify.