Pulling in some of the makefile changes that are in master into this
branch to make merging easier later on.