Cmake build type

Written CMAKE_CXX_FLAGS and CMAKE_C_FLAGS explicitly for DEBUG and RELEASE profile. The build type can be selected with cmake -DCMAKE_BUILD_TYPE=RELEASE|DEBUG.