Add install target, add VERSION and SOVERSION to execs and lib

Remove -g switch from default CFLAGS because it is used when
using the debug build.