Update makefile to build partial static build.

Execute with:

make BUILD_STATIC=yes

which will build a partially static build.  Also sets rpath to:
$ORIGIN/../lib to allow the executable to be called in principle
without setting LD_LIBRARY_PATH.