Implement automatic dependency generation in makefile. Up until now, if one would for example change compat/pthread_mapping.h and then execute make, make would assume that nothing has changed and wouldn't recompile hooks.c one would either have to run "make clean" or delete hooks.o manually, this commit changes this.