fix bugs in makefile dependences