Backport single makefile from master.