I have generally chosen to deal with this problem by refusing to acknowledge the existence of bonuses or promotions. It is harder for a warped incentive structure to warp your behavior if you refuse to be motivated by its prizes.
I can imagine situations where you should care about the company's performance, like a non-profit or certain startup situations, but I think the majority of enterprise developers fall under the above.