We consider a system of mean field games with local coupling in the
deterministic limit. Under general structure conditions on the Hamiltonian and
coupling, we prove existence and uniqueness of the weak solution,
characterizing this solution as the minimizer of some optimal control of
Hamilton-Jacobi and continuity equations. We also prove that this solution
converges in the long time average to the solution of the associated ergodic
problem