Fix compile and add makefile