fix test
fix dependence
generate makefile etc.