forked from DIGImend/digimend-kernel-drivers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
24 lines (24 loc) · 754 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ifneq ($(KERNELRELEASE),)
obj-m := hid-kye.o hid-uclogic.o hid-polostar.o
else
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
UDEV_RULES := /lib/udev/rules.d/70-hid-rebind.rules
DEPMOD_CONF := /etc/depmod.d/digimend.conf
HID_REBIND := /sbin/hid-rebind
modules modules_install clean:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) $@
install: modules_install
install -D -m 0644 digimend.conf $(DEPMOD_CONF)
depmod -a
install hid-rebind $(HID_REBIND)
install -m 0644 hid-rebind.rules $(UDEV_RULES)
udevadm control --reload
uninstall:
rm -vf $(UDEV_RULES) $(HID_REBIND) $(DEPMOD_CONF) \
/lib/modules/*/extra/hid-kye.ko \
/lib/modules/*/extra/hid-polostar.ko \
/lib/modules/*/extra/hid-uclogic.ko
udevadm control --reload
depmod -a
endif