Add Makefile and fix build