Build framework

Basic CMakeLists and scripts to help generating Makefile from CMake for
different OS/compiler.