There are several tools that can help you enforce your layered architecture and dependency restrictions in general. These tools are language specific.
If you're using Java, I can suggest creating your custom checks using checkstyle.
I authored the text Anton referred to (Ultimate Architecture Enforcement). It's based on our own successful experience. Custom checks can be integrated to the IDE (e.g., Eclipse), can be integrated to your continuous integration tool (e.g., Jenkins), and as the last resort to prevent violations can be executed automatically as a pre-commit verification on Subversion.
The custom checks themselves are written in Java using the checkstyle API.