We revisited an elasticity problem of flat indentation on an elastic film bonded to a rigid substrate and obtained the force-depth relation in a simple form. With the obtained force-depth relation, Kendall's elastic equilibrium theory of adhesion was extended to the adhesion between a flat tip and a compressible elastic film. Thus, the thermodynamic work of adhesion at the moment of debonding of a flat tip from an elastic film was expressed in terms of pull-off force, elastic constants and geometric parameters. It is worth noting that the obtained relation for elastic films is still valid for viscoelastic films if viscoelastic losses are limited to the process zone of debonding. This makes it possible to study the time-dependent adhesion of viscoelastic polymer films. Indentation experiments with a flat diamond tip were performed on SU-8 films, and the results verified that the extended form of Kendall's theory correctly compensates the effect of the finite thickness of the films on the work of adhesion. The indentation results also showed that the work of adhesion is strongly dependent on the unloading velocity of the tip, while indentation depth and dwell time have only minor effects on the work of adhesion.