Improve the compatibility of the Makefile