def _get_shlib_dir(target, source, env, for_signature: bool) -> str:
    """Get the directory the shared library is in.

    Args:
        target: target node
        source: source node, not used
        env: environment context, not used
        for_signature: whether this is being done for signature generation

    Returns:
        the directory the library will be in (empty string if '.')
    """
    verbose = False

    if target.dir and str(target.dir) != ".":
        if verbose:
            print("_get_shlib_dir: target.dir:%s" % target.dir)

        return "%s/" % str(target.dir)
    else:
        return ""