On the bike trail, someone has quoted in chalk a saying from the Dalai Lama:
I disagree. The purpose of life is to achieve. That can be as grand as climbing tall mountains, travelling to other planets, curing diseases, or finding some new understanding of the universe. It can mean writing a book that others find meaningful, teaching others a skill or idea, building a road, maintaining social order as a law enforcement officer, or saving a life after an accident. It also means doing useful work.
Happiness will be the by-product of achievement. To seek it as the goal is to demand the reward before you have earned it.