Build libraries as shared and clean up the file a little