I suspect that you're asking that question because you believe that keeping folks happy will make them more productive. But there is no substantive research that indicates that if you improve happiness you will improve productivity.
On the other hand, though, there is research that tells us that if you increase productivity, folks are more likely to be happy. With that said, here are some things to do with those pesky folks called Generation X to provide a working environment where they'll be more productive.
Like every other generation, Xers are made up of individuals, so there are no guarantees here, only ways to improve your odds.
Pay attention to the things that are different in this generation, compared with older Baby Boomers and younger Millennials. Xers are more likely to be competitive and self-sufficient than members of other generations. These are savvy and practical folks. You'll do best if you build on this and aren't threatened by their independence.
Know key historical reference points. For this group, the Viet Nam war is history, like World War II or the Civil War. Jay Leno has always been on the Tonight Show. Remote controls have always been part of life. Phrases that immediately ring a bell with their older bosses like, "Where's the beef?" are just sentences to them.
Most important treat each individual like an individual. Pay attention to their social style, how and when they work best, what their strengths are. Build on their strengths while you work to make their weaknesses irrelevant.
For a resource on Generation X and Millenial reference points, check out The Beloit College Mindset list. Every year, Beloit College puts out the “Beloit College Mindset List.” According to co-editor Tom McBride, Keefer Professor of the Humanities at the Wisconsin liberal arts college, the list helps to slow the rapid onset of “hardening of the references,” in the classroom. The list reveals historic reference points that may be common to older folks, but are complete mysteries to today's college freshman. It's not only helpful, it's fun.
For further information about the cycle of generations and what it might mean to you, check out the following. Here is the book that started it all.
"Generations: The History of America's Future, 1584 to 2069" by Neil Howe and William Strauss was the first book to outline the theory of generations that figures so often on conversation these days. Their original book is still the best if you're looking for a working understanding of the cycle of generations and the impact that cycle has on society and business. It's also worth getting because many later writers who build on Strauss and Howe's writings confuse lifecycle characteristics for generational characteristics.
Another, later, book by the same authors is called "The Fourth Turning." This book expands on the authors' earlier work and does a better job of concentrating on the US at the turn of the century and reviewing historical crisis points. These books make an excellent pair.
An excellent single-book resource that builds on Strauss and Howe, but which concentrates more on the workplace is Ron Zemke's excellent "Generations at Work: Managing the Clash of Veterans, Boomers, Xers, and Nexters in Your Workplace."