Let $X$ be a topologically mixing subshift of finite type over a finite alphabet, let $\sigma:X\to X$ be the shift, and let $\beta:X\to\mathbb R$ be Holder continuous. Then
\begin{align*}
\lim_{n\to\infty}\frac{1}{n}\log Z_n(\beta)
= \sup_{\nu\in\mathcal M_\sigma(X)}\left(h_\nu(\sigma)+\int_X\beta\,d\nu\right).
\end{align*}