add rule for building shared library