Fix some bugs in the Makefile.