Hi -
Nadroj is correct - you definitely need the kernel source installed. You can check for it/install it with any of the standard package manager tools (rpm, yum, apt: whatever's appropriate for your distro).
You also need some special #define's and include paths: your compile environment for kernel modules is different from the "standard" compile environment, for user programs.
There are a number of good "kernel programming howto's", including this one:
http://www.faqs.org/docs/kernel/
You can also try downloading and building the examples from O'Reilly's Most Excellent "Linux Device Drivers, 3rd Ed":
http://lwn.net/Kernel/LDD3/
'Hope that helps .. PSM