Compiling a kernel module, header problems, makefile problems

ok I'm trying to compile a simple kernel module, when I point to any of the below that contain includes, it complains about all kinds of stuff. linux-headers-2.6.31-21 ...