add support for libraries building
add library example