def dlls_in_subdirs(directory):
    """Returns *.dll, *.so, *.dylib in given directories and subdirectories."""
    files = []
    for root, dirs, files in os.walk(directory):
        files.extend(dlls_in_dir(root))