This page contains brief notes on building well-behaved Out-Of-Tree kernel modules .
The kernel headers package needed can be found using linux-headers-$(uname -r)
If the Makefile is well behaved, it should be as simple as:
make -C /lib/modules/$(uname -r)/build M=${PWD}A well behaved Makefile will contain something like
KVER := $(uname -r)
KPATH := /lib/modules/$(KVER)/build
default:
$(MAKE) -C $(KPATH) M=$(CURDIR)