Improve Makefile and add missing dependency