Make minor tweaks to build files: defined new LD_LIBS common macro containing commonly linked libraries, tweaked test and example makefiles to suit. Added new lib pseudo target to test & example makefiles to run library building makefile to ensure it is up to date.