HERE'S THE BEST ADVICE YOU'LL EVER GET ON THIS:
1. Dump the friend. Any buddy that macks it on my girl is a fucking scumbag and a half. I'd tolerate an occasional flirt but it would have to be rare. For this constant thing, it's definitely a kick in the balls by this guy. You're a guy and you know very well that all flirting is ideally intended to land the bitch in the sack. FUCK THAT.
2. Give your girl an ultimatum if she's worth the trouble. Tell her to cut the shit, or your out. Explain that you sincerely believe it's a sign of lack of respect and you've spoken to people and it's unanimous, flirting is NEVER innocent. She should respect the simple fact that if it bothers you, then she should try to accomodate that. People do that when they care. Just be sure you're not doing anything that makes her feel uncomfortable.
3. Personally, i'd dump the broad. She'll likely just cause you stress and she'll wind up flirting behind yoru back anyways. Then, anytime you two get in a fight, she'll come running to some random cock (probably that "buddy" of yours) and she'll feed him all this shit on how you're such an asshole and of course, he'll agree since that's his ticket into her pants. Trust me, if you leave her and they wind up together, you think they're gonna last? Hell no. A relationship built on cheating winds up in cheating.
Ultimately it's your call but i hate to see a bro get burned.