fix makefile for generating shared library