Call ranlib after building the library.
Use u_long to make this compile in FreeBSD.
Set VPATH to pickup file from lib_generic.
Use gsed instead of BSD sed.