title: How to create a linux shared library including all binary dependencies into a single so file?
body: <p>I'm able to create a shared library in linux libMySharedLibrary.so.</p>
  
  <p>But I'm including a bunch of header files referencing other libraries when I compile. I want to link all the binary code from these included header files so I can distribute my shared library in one .so file.</p>
  
  <p>I'm using gcc to compile. Below the command line:</p>
  
  <p><code>gcc -I$JAVA_8_HOME/include/ -I$JAVA_8_HOME/include/linux/ -I./include/ -I. -fPIC -o libMyLibrary.so -shared com__MyLibrary.c</code></p>
  
  <p>The header files are inside <code>./include</code>. I need to link the generated libMyLibrary.so with the binaries of the header files inside <code>./include</code>.</p>
  
  <p>How?</p>