Create static and shared libs

Add -fPIC to CFLAGS, position independent code required by shared libs.
Merge pull request #3 from avtobiff/create-static-and-shared-libs

Create static and shared libs