Put your driver source in a separate directory, including any .h files that go with it (usually you won't get away with just a .c file) and make it with this makefile (which you can copy into a file named Makefile).
obj-m := lpptest.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
This is the standard makefile structure for kernel modules.
After making it, just copy it into the directory you want it in, then you can insert it into the kernel.