I'm maintaining a library that contains compiled objects that need to be linked into 
a 3rd party executable. sometimes the executable has been compiled for Solaris, sometimes as a 32bit Linux Application, sometimes its a 64bit linux application. 
What I'd love to do is pass one "path" to the library, and have the application then automatically pick up the right flavor of the library. 
It'd be OK if it only worked on linux, so that I could just define the path in terms of the OS. 

this particular case is for a library of PLI/VPI functions I want to link into a verilog simulator.

What I have now is

```
root/path/${MYPLILIB_VER}/rootname/${MYPLIFLAVOR}/plilib.so

```

where flavor is one of

```
solaris linux linux64

```

The flavor depends on the os, and if Linux, if running on a 64bit platform, it also depends on which version 32/64bit of the program I am running. 
I'm looking for a better way..