def protoc_emitter(target, source, env):
    """Return list of targets generated by Protoc builder for source."""
    for src in source:
        proto = os.path.splitext(str(src))[0]
        if env['PROTOCPPOUT']:
            target.append('%s.pb.cc' % (proto))
            target.append('%s.pb.h' % (proto))
        if env['PROTOPYOUT']:
            target.append('%s_pb2.py' % (proto))
    return target, source