- replaced Makefile by CMake
- fixed cannot compile at MACOSX