Uh, first off, it is really not a good idea to work as root. You don't need to be root to compile TMW, so I would suggest you do so as a normal user. This is because whatever you do as root can affect your whole system, and so it can also potentially mess it up.
In your case, the src/Makefile.am file was out of date and didn't include posthandler.{h,cpp}. I've added these now and committed it in revision 4762. It is common in this project that some files are missing from a build system, since not all developers use the same. Some use cmake, some configure, and some Code::Blocks. We can't all be bothered to keep everything up to date when adding files. So better learn to recognize these kind of errors.
Though maybe it would be better if we required everybody to keep at least Makefile.am updated... since it is our primary target and our release mechanism relies on it.