Makefile: fix automatic building