def build_flags(library, type_, path):
pkg_config_path = [path]<EOL>if "<STR_LIT>" in os.environ:<EOL><INDENT>pkg_config_path.append(os.environ['<STR_LIT>'])<EOL><DEDENT>if "<STR_LIT>" in os.environ:<EOL><INDENT>pkg_config_path.append(os.environ['<STR_LIT>'])<EOL>pkg_config_path.append(os.path.join(os.environ['<STR_LIT>'], "<STR_LIT>"))<EOL><DEDENT>options = [<EOL>"<STR_LIT>",<EOL>{<EOL>'<STR_LIT:I>': "<STR_LIT>",<EOL>'<STR_LIT:L>': "<STR_LIT>",<EOL>'<STR_LIT:l>': "<STR_LIT>"<EOL>}[type_]<EOL>]<EOL>return [<EOL>flag.strip("<STR_LIT>".format(type_))<EOL>for flag<EOL>in subprocess.check_output(<EOL>["<STR_LIT>"] + options + [library],<EOL>env=dict(os.environ, PKG_CONFIG_PATH="<STR_LIT::>".join(pkg_config_path))<EOL>).decode("<STR_LIT>").split()<EOL>]<EOL>
Return separated build flags from pkg-config output