  Given graphs $H$ and $F$, the generalized Tur\'an number $\mathrm{ex}(n,H,F)$
is the largest number of copies of $H$ in $n$-vertex $F$-free graphs. We study
the case when either $H$ or $F$ is a matching. We obtain several asymptotic and
exact results.
