diff --git a/Makefile b/Makefile index 4c76df6..269a094 100644 --- a/Makefile +++ b/Makefile @@ -1 +1,14 @@ -obj-m += hid-microsoft-ergonomic.o +KERNELRELEASE ?= $(shell uname -r) +KERNEL_DIR ?= /lib/modules/$(KERNELRELEASE)/build +PWD := $(shell pwd) + +obj-m := hid-microsoft-ergonomic.o + +all: + $(MAKE) -C $(KERNEL_DIR) M=$(PWD) modules + +install: + $(MAKE) -C $(KERNEL_DIR) M=$(PWD) modules_install + +clean: + $(MAKE) -C $(KERNEL_DIR) M=$(PWD) clean