Finish building the .so library

Still need to double-check all the CPPFLAGS and CFLAGS.  Also need to
drop a dev header for -dev packages