  Given an integer $q\ge 2$ and a real number $c\in [0,1)$, consider the
generalized Thue-Morse sequence $(t_n^{(q;c)})_{n\ge 0}$ defined by
$t_n^{(q;c)} = e^{2\pi i c S_q(n)}$, where $S_q(n)$ is the sum of digits of the
$q$-expansion of $n$. We prove that the $L^\infty$-norm of the trigonometric
polynomials $\sigma_{N}^{(q;c)} (x) := \sum_{n=0}^{N-1} t_n^{(q;c)} e^{2\pi i n
x}$, behaves like $N^{\gamma(q;c)}$, where $\gamma(q;c)$ is equal to the
dynamical maximal value of $\log_q \left|\frac{\sin q\pi (x+c)}{\sin \pi
(x+c)}\right|$ relative to the dynamics $x \mapsto qx \mod 1$ and that the
maximum value is attained by a $q$-Sturmian measure. Numerical values of
$\gamma(q;c)$ can be computed.
