Redo lib linkage a bit more.

separate libs into package specific ones and platform ones