blob: 1588ac7400a7bdea1d5cc2d7e385a41713a3e041 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
modname := clevo-xsm-wmi
obj-m := $(modname).o
KVERSION := $(shell uname -r)
KDIR := /lib/modules/$(KVERSION)/build
PWD := "$$(pwd)"
ifdef DEBUG
CFLAGS_$(obj-m) := -DDEBUG
endif
default:
$(MAKE) -C $(KDIR) M=$(PWD) modules
clean:
$(MAKE) O=$(PWD) -C $(KDIR) M=$(PWD) clean
load:
-rmmod $(modname)
insmod $(modname).ko
install:
mkdir -p /lib/modules/$(KVERSION)/misc/$(modname)
install -m 0755 -o root -g root $(modname).ko /lib/modules/$(KVERSION)/kernel/drivers/input/keyboard/$(modname)
depmod -a
uninstall:
rm /lib/modules/$(KVERSION)/kernel/drivers/input/keyboard/$(modname)/$(modname).ko
rmdir /lib/modules/$(KVERSION)/kernel/drivers/input/keyboard/$(modname)
rmdir /lib/modules/$(KVERSION)/kernel/drivers/input/keyboard
depmod -a
|