Is this a library you wrote yourself? Is this part of a package built from source with autoconf?
If the later, look at "./configure --help".
For individual libraries here is an example for zlib:
configure [--zprefix] [--prefix=PREFIX] [--eprefix=EXPREFIX]
[--static] [--64] [--libdir=LIBDIR] [--sharedlibdir=LIBDIR]
An example from wireshark:
--enable-static[=PKGS] build static libraries [default=no]
If this is your own library, you need to compile it with the -fPIC option and turn it into a shared library:
gcc -fPIC -c yourcode.c
gcc -shared -W1, -soname,libyourcode.so.1 -o libyourcode.so.1.0 yourcode.o
You really should read up on C or C++ programming in Linux. You should probably produce a Makefile instead of manually compiling and linking.
Producing shared libraries may not reduce compile times because Make will only compile what is needed. I don't think linking precompiled object files will reduce compile times by much. You may be wanting shared libraries for the wrong reasons.