  A procedure to derive the Ginzburg-Landau (GL) theory from the multiband BCS
Hamiltonian is developed in a general case with an arbitrary number of bands
and arbitrary interaction matrix. It combines the standard Gor'kov truncation
and a subsequent reconstruction in order to match accuracies of the obtained
terms. This reconstruction recovers the phenomenological GL theory as obtained
from the Landau model of phase transitions but offers explicit microscopic
expressions for the relevant parameters. Detailed calculations are presented
for a three-band system treated as a prototype multiband superconductor. It is
demonstrated that the symmetry in the coupling matrix may lead to the chiral
ground state with the phase frustration, typical for systems with broken
time-reversal symmetry.
