added macro error message if missing mr_dltype
added CMake build system

It was tested on a linux amd64 system.
Still needs work