How to compile the tegra_multimedia_api to share library ?

Hi,

I want to use the tegra_multimedia_api interface. And now I want to compile them to a share library such as libmmapi.so.
So how can I do in makefile ?

Thanks,

Please other users can share experience of Makefile programming.