Change the default definition of the KDIR from being just a prefix to full path to the kernel headers allows to override this value and compile the module using arbitrary location of the kernel headers or full source code.
Added also some common usage examples in the comment.
Adding the PREFIX variable might serve the original prefix purpose of the KDIR if somebody needs such functionality in some mass module rebuilding scripts
Change the default definition of the KDIR from being just a prefix to full path to the kernel headers allows to override this value and compile the module using arbitrary location of the kernel headers or full source code.
Added also some common usage examples in the comment.
Adding the PREFIX variable might serve the original prefix purpose of the KDIR if somebody needs such functionality in some mass module rebuilding scripts