  A generating functional which results in the Poisson-Boltzmann equation and
boundary conditions for an average electric potential of a macroionic
suspension through an extremal condition is constructed in a mean field theory.
The extremum of the generating functional turns out to be identical with the
Helmholtz free energy of the system which has an integral representation in
terms of the average electric potential satisfying the Poisson-Boltzmann
equation. From the Helmholtz free energy, the chemical potentials of small ions
and {\it chemical potentials of effective valencies of macroions} are
calculated and, as the total sum of them, an integral representation of the
Gibbs free energy of the system is derived. Difference of two free energies
leads to an equation of state for osmotic pressure of small ion gas in an
environment of macroions in the suspension.
