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 running make
A well behaved Makefile will contain something like
KVER := $(shell uname -r) KPATH := /lib/modules/$(KVER)/build all: $(MAKE) -C $(KPATH) M=$(CURDIR)