I've compiled a static C or C++ library, obtaining a libfoo.a
. I want to decide where it should be installed after having been built. Never mind what build/installation mechanism I'm using - this is a question of principle.
Now, on the installation root (which may be /usr
, or /usr/local
etc.) there are two subdirectories of interest: lib/
, and a directory whose name depends on the processor architecture, the kind of kernel and the kind of userland, e.g. x86_64, Linux and GNU, for lib/x86_64-linux-gnu
.
I've compiled the library with x86_64 object code, and using a Linux version of glibc; but then - all libraries are compiled that way, basically. So, how do I decide whether my library should go into just lib/
, or rather lib/x86_64-linux-gnu
?
Note: If I were on a non-Debian distribution, the dilemma would probably have been between lib/
and lib64/
- which is still basically the same dilemma.