Change makefile to produce a lib and add simple example
delete main