diff -Naur a/Makefile b/Makefile
--- a/Makefile	2016-04-24 18:28:49.000000000 -0700
+++ b/Makefile	2016-07-09 13:39:17.008211023 -0700
@@ -8,14 +8,14 @@
 BLACKLIST=/etc/modprobe.d/blacklist-$(CONFLICTS).conf
 KEYMAP_SCRIPT=sapphire_keymap.sh
 EXTRACT_KEYDEFS=extract_keydefs.sh
-INPUT_H=$(shell [ -e /usr/include/linux/input-event-codes.h ] && echo /usr/include/linux/input-event-codes.h || echo /usr/include/linux/input.h)
+INPUT_H ?= $(shell [ -e /usr/include/linux/input-event-codes.h ] && echo /usr/include/linux/input-event-codes.h || echo /usr/include/linux/input.h)
 
 ## MODPARMS is not used any more, but we have to nuke old copies to prevent issues:
 MODPARMS=/etc/modprobe.d/$(MODNAME).conf
 
 CWD    = $(shell pwd -P)
 KVER  ?= $(shell uname -r)
-KDIR  = /lib/modules/$(KVER)
+KDIR  ?= /lib/modules/$(KVER)
 obj-m += $(MODNAME).o
 
 #EXTRA_CFLAGS += -Werror
@@ -31,7 +31,7 @@
 	@exit 1
 
 kmod:
-	$(MAKE) -C $(KDIR)/build M=$(CWD) modules
+	$(MAKE) -C $(KDIR) M=$(CWD) modules
 
 $(MODNAME).ko: $(MODSOURCE) $(MODNAME).h
 	$(MAKE) kmod
