add makefile and change dirname