Change from raw make files to CMake