add shared library support to makefile