  The generation of mean flows is a long-standing issue in rotating fluids.
Motivated by planetary objects, we consider here a rapidly rotating
fluid-filled spheroid, which is subject to weak perturbations of either the
boundary (e.g. tides) or the rotation vector (e.g. in direction by precession,
or in magnitude by longitudinal librations). Using boundary-layer theory, we
determine the mean zonal flows generated by nonlinear interactions within the
viscous Ekman layer. These flows are of interest because they survive in the
relevant planetary regime of both vanishing forcings and viscous effects. We
extend the theory to take into account (i) the combination of spatial and
temporal perturbations, providing new mechanically driven zonal flows (e.g.
driven by latitudinal librations), and (ii) the spheroidal geometry relevant
for planetary bodies. Wherever possible, our analytical predictions are
validated with direct numerical simulations. The theoretical solutions are in
good quantitative agreement with the simulations, with expected discrepancies
(zonal jets) in the presence of inertial waves generated at the critical
latitudes (as for precession). Moreover, we find that the mean zonal flows can
be strongly affected in spheroids. Guided by planetary applications, we also
revisit the scaling laws for the geostrophic shear layers at the critical
latitudes, and the influence of a solid inner core.
