made it a library

Signed-off-by: Alejandro M. Ramallo <aramallo@mac.com>