  We compute the full classical 4d scalar potential of type IIA Calabi-Yau
orientifolds in the presence of fluxes and D6-branes. We show that it can be
written as a bilinear form $V = Z^{AB} \rho_A\rho_B$, where the $\rho_A$ are in
one-to-one correspondence with the 4-form fluxes of the 4d effective theory.
The $\rho_A$ only depend on the internal fluxes, the axions and the topological
data of the compactification, and are fully determined by the Freed-Witten
anomalies of branes that appear as 4d string defects. The quadratic form
$Z^{AB}$ only depends on the saxionic partners of these axions. In general, the
$\rho_A$ can be seen as the basic invariants under the discrete shift
symmetries of the 4d effective theory, and therefore the building blocks of any
flux-dependent quantity. All these polynomials may be obtained by derivation
from one of them, associated to a universal 4-form. The standard N=1
supergravity flux superpotential is uniquely determined from this {\it master
polynomial}, and vice versa.
