build a shared library