I am working on a simple driver for a class. I am using this makefile:
obj-m := mysourcefile.o KERNELDIR ?= /lib/modules/$(shell uname -r)/kernel all default: m