Modified the makefile to use pkg-config and add a few more options, thanks to @ehouse for the suggestions and sample implementation