The entropy definition is deduced by means of (re)deriving the generalized
non-linear Langevin equation using Zwanzig projector operator formalism. It is
shown to be necessarily related to an invariant measure which, in classical
mechanics, can always be taken to be the Liouville measure. It is not true that
one is free to choose a ``relevant'' probability density independently as is
done in other flavors of projection operator formalism. This observation
induces an entropy expression which is valid also outside the thermodynamic
limit and in far from equilibrium situations. The Zwanzig projection operator
formalism therefore gives a deductive derivation of non-equilibrium, and
equilibrium, thermodynamics. The entropy definition found is closely related to
the (generalized) microcanonical Boltzmann-Planck definition but with some
subtle differences. No ``shell thickness'' arguments are needed, nor desirable,
for a rigorous definition. The entropy expression depends on the choice of
macroscopic variables and does not exactly transform as a scalar quantity. The
relation with expressions used in the GENERIC formalism are discussed