Add cmake makefiles

Separate object files were previously built and statically linked to
example binaries. Add a cmake-based buildsystem to properly generate
a library, and link the example binaries to this library we generated.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Merge pull request #1 from cmatsuoka/master

Add cmake makefiles