modify Makefile so can generate dependancy files correctly