Build static and shared libraries