thermodynamics in a gravitational field

Imagine an ensemble of string pendulums with length \(l\) in a gravitational field with acceleration \(g\), so that the angular frequency is given by \(\omega^2 = g/l\). There is a contraption to change the string length \(l\) of the pendulums, and for accelerating the entire system at a different gravity \(g\). If you were to construct the canonical partition functions \(Z(T,l,N)\) or \(Z(T,g,N)\), which thermodynamical potentials would you obtain? (hint: think about intensive and extensive state variables)