I'm trying to create a Python module for Cpython. The C is compiled with some libraries as a -shared .so file. However, I want to include the dependencies inside the .so file to make it more portable. Compiling it into a static .a file doesn't work because it cannot be dynamically loaded, and I can't specify both -static and -shared when compiling the same file. So how do I go about creating a shared object with libraries statically included using gcc? There has to be a way other than downloading the dependency headers into the directory.
Thanks.