Added Makefile.

Backport of 6ba4cf0fd from master.