title: How to specify RPATH in a makefile?
body: <p>I'm trying to specify rpath in my binary. 
  My makefile looks like this- </p>
  
  <pre><code>CC=gcc 
  CFLAGS=-Wall
  LDFLAGS= -rpath='../libs/'
  main: main.c  
      gcc -o main main.c
  
  clean:
      rm -f main main.o 
  </code></pre>
  
  <p>But when I query rpath using command <code>readelf -a ./main | grep rpath</code> I get nothing 
  I've tried specifying rpath as <code>LDFLAGS= "-rpath=../libs/"</code> but even that doesn't seem to work. </p>
  
  <p>Can someone please post an example on how should I specify rpath in a makefile? </p>
  
  <p>GCC and ld versions are- </p>
  
  <pre><code>gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
  GNU ld (GNU Binutils for Ubuntu) 2.21.0.20110327
  </code></pre>