Fix .PHONY targets in Makefiles

Phony targets should be dependencies of .PHONY, not the other way around.
Merge pull request #777 from andy-morris/makefile-phony

Fix .PHONY targets in Makefiles