We study generalized recurrence for closed relations on locally compact spaces. This includes continuous maps and real flows. The main tools are Lyapunov functions and their compactifications. Under certain conditions it is shown that the Lyapunov functions determine the topology of the space.