Notice that ELF shared objects should, in practice, contain position-independent code (PIC). See Drepper's How to Write Shared Libraries paper and this answer. Simple build instructions for shared libraries are here and there.
In your cpuminer-multi repository, there are some assembler files, e.g. aesb-x64.S
..... So you need at least to check that the assembler code inside them is PIC (or to patch these files to make them PIC).
Could you help me to generate .so files? I want to use this files in a couple of different platforms
This might not work, since the ABI and API (e.g. of common or standard libraries) could be slightly different. I would recommend a different build for each platform.
./configure --prefix=$HOME/Downloads
This looks strange (and smells bad). Read more about autoconf. The --prefix
relates to installation subdirectories, not to the build tree. I would recommend --prefix=$HOME/soft/
then adding $HOME/soft/bin/
to your PATH
variable.