1. modify makefile to rm all .o and .d files
2. add discovery features