Given a closed surface M and a convex and superlinear lagrangian L on TM, we prove that there is an open and dense set of functions f in C2(M,R) such that the lagrangian L+f has a unique minimizing measure supported on a hyperbolic periodic orbit or hyperbolic singularity.