Build proper libraries for shared code