title: Finding path of static system libraries in Linux
body: <p>I am compiling a package that links against the OpenSSL static libraries <code>libssl.a</code> and <code>libcrypto.a</code> which are included with <code>libssl-dev</code> in Debian/Ubuntu. However the actual location of these files depends on the architecture and distribution at hand.</p>
  
  <p>Is there some sort of method or environment variable that I can use in the Makefile to give the linker the correct path to the system directory with static libraries? Currently I am using:</p>
  
  <pre><code>-L/usr/lib/x86_64-linux-gnu/ -L/usr/lib/i686-linux-gnu/ -lssl -lcrypto
  </code></pre>
  
  <p>However this gives a bunch of warnings if these dirs do not exist, and might still not generally work. </p>