  We derive the stellar-to-halo mass relation (SHMR), namely $f_\star\propto
M_\star/M_{\rm h}$ versus $M_\star$ and $M_{\rm h}$, for early-type galaxies
from their near-IR luminosities (for $M_\star$) and the position-velocity
distributions of their globular cluster systems (for $M_{\rm h}$). Our
individual estimates of $M_{\rm h}$ are based on fitting a dynamical model with
a distribution function expressed in terms of action-angle variables and
imposing a prior on $M_{\rm h}$ from the concentration-mass relation in the
standard $\Lambda$CDM cosmology. We find that the SHMR for early-type galaxies
declines with mass beyond a peak at $M_\star\sim 5\times 10^{10}M_\odot$ and
$M_{\rm h}\sim 10^{12}M_\odot$ (near the mass of the Milky Way). This result is
consistent with the standard SHMR derived by abundance matching for the general
population of galaxies, and with previous, less robust derivations of the SHMR
for early types. However, it contrasts sharply with the monotonically rising
SHMR for late types derived from extended HI rotation curves and the same
$\Lambda$CDM prior on $M_{\rm h}$ as we adopt for early types. The SHMR for
massive galaxies varies more or less continuously, from rising to falling, with
decreasing disc fraction and decreasing Hubble type. We also show that the
different SHMRs for late and early types are consistent with the similar
scaling relations between their stellar velocities and masses (Tully-Fisher and
Faber-Jackson relations). Differences in the relations between the stellar and
halo virial velocities account for the similarity of the scaling relations. We
argue that all these empirical findings are natural consequences of a picture
in which galactic discs are built mainly by smooth and gradual inflow,
regulated by feedback from young stars, while galactic spheroids are built by a
cooperation between merging, black-hole fuelling, and feedback from AGNs.
