This paper has a long story and goes back to the middle of 80s but its recent version
is based on the series of lectures I gave during the Summer school Wisla 18.
It is difficult now to say what kind of students and their backgrounds I had in
mind. Possibly, and it reflects my own background, I had in mind students working
in differential geometry, differential equations, and mathematical physics.
My friend, when I asked his opinion about thermodynamics, just said to me: consider
physics as a big family with brothers, sisters, cousins, etc. Then thermodynamics
shall be witch among them.