Makefile fixes and improvements. (#737)

* Makefile fixes and improvements. I noticed that some of the subdirs would not build properly. While digging into that, I noticed several places where improvements could be made to the makefiles themselves. Highlights: * Fixed awk version issue in make debug * Added more intermediate files to .gitignore * Added implicit rules to reduce ongoing maintenance * Reduced duplication of logic in firmware/Makefile_orig * Flagged additional rules as .PHONY * Attempt #2