Fix many errors in Makefile