The question you ask has been extensively studied in multifractal analysis under the name "conditional variational principle". A quick search for that phrase on MathSciNet turns up an [article by Barreira and Saussol in Trans. AMS][1] from 2001. The article by Barreira, Saussol, and Schmeling mentioned in John B's answer also gives a pretty complete account. As Anthony Quas mentions, Kucherenko and Wolf consider similar questions; indeed, there is actually quite a large literature on multifractal analysis (or multifractal formalism) which addresses various questions related to this one. It may be worth noting that even in multifractal papers which do not explicitly formulate a result on maximizing entropy subject to a constraint on $\mu$, such a result is often still implicit. Broadly speaking the story is like this: in multifractal analysis one considers a local asymptotic quantity like the limit of Birkhoff averages $\lim \frac 1n S_n \phi(x)$, puts $K_\alpha$ equal to the set where this quantity exists and is equal to $\alpha$, and then tries to find $h_{\mathrm{top}}(K_\alpha)$ as a function of $\alpha$, where $h_{\mathrm{top}}$ is topological entropy is the sense of Bowen. Often topological entropy is replaced with Hausdorff dimension and the Birkhoff limit is replaced with a pointwise dimension, a local entropy, or a Lyapunov exponent. In any case one often finds that $\alpha \mapsto h_{\mathrm{top}}(K_\alpha)$ is the Legendre transform of the pressure function $t\mapsto P(t\phi)$, and in particular is an analytic function of $\alpha$ in some standard situations where the topological pressure has nice analytic properties. There are basically two approaches to proving that the dependence on $\alpha$ is the Legendre transform of pressure. One approach is to assume some version of the specification property (or some similar uniform mixing condition, such as being a mixing SFT) and then use some orbit-gluing techniques to estimate the size of the sets $K_\alpha$ almost by hand. Another approach is to use thermodynamic results to produce unique equilibrium states $\mu_t$ for $t\phi$ and then argue that each $\mu_t$ is the measure of maximal entropy for some $K_\alpha$ where $\alpha$ depends on $t$, and in particular is the measure you described in your original question. It's entirely possible that the procedure I just described is well known to you; my point is just that such procedures were done even before the 2001 paper of Barreira and Saussol, so this is quite a well-established idea. I believe I've seen the conditional variational principle discussed explicitly in papers by Gelfert and Rams, also by Johannson, Jordan, Öberg, and Pollicott. At some point I wrote a [survey of multifractal analysis][2] that discusses this issue in Section 2.3; it also appears in Proposition 2.9 and Theorem C of [another paper of mine][3]. Perhaps I've gotten long-winded and just told you some things you already knew. To more specifically address your main questions... *"Is the answer to the above question known?"* Yes, it is pretty well-known and studied, the keywords being "multifractal formalism" and "conditional variational principle". *"If yes, could you give a reference?"* The references given by others to Kucherenko-Wolf and Barreira-Saussol-Schmeling will do -- my preference would be Barreira-Saussol 2001 since it is earlier -- but I would point out that the techniques used are pretty standard in multifractal work going even further back (Pesin-Weiss 1997, probably earlier as well). *"How difficult is it?"* In the generality you formulated I do not believe it is particularly difficult; one can consider the unique equilibrium states $\mu_t$ for $t\phi$ as $t$ ranges over $\mathbb{R}$ and then make some general arguments (if this is what you do then I apologize for telling you things you know). The same technique works more generally as long as you can say enough about the uniqueness of the equilibrium states, but this can be a challenging question in general. [1]: http://www.ams.org/mathscinet-getitem?mr=1837214 [2]: http://www.ams.org/mathscinet-getitem?mr=3255427 [3]: http://www.ams.org/mathscinet-getitem?mr=3001770