Creation of a Software Installation Package which can be installed on all Linux Distributions

does anybody has some experience concerning the creation of file set
(RPM, Debian, tar files) which can be installed and executed on all
Linux distributions?
The creation of RPM or Debian files are not difficult to master but I
would like to know how to deal with share libraries. Is there a way to
put all needed libraries into the package? Is it always necessary to
build the file set on the targeted distribution?

Thanks for your answers.

CoverageMeter Software Factory
> Code Coverage Tool for C/C++ <