If you're using gcc and there's no better shared library example for your architecture, the following shared library build procedure will probably work.
% mkdir tmp % cd tmp % ar xv ../libdb.a % gcc -shared -o libdb.so *.o % mv libdb.so .. % cd .. % rm -rf tmp
Note, you may have to change the gcc line depending on the requirements of your system.
The file libdb.so is your shared library.