-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathMakefile
27 lines (23 loc) · 934 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
25
26
27
KVERSION ?= `uname -r`
KERNEL_SRC ?= /lib/modules/${KVERSION}/build
MODULEDIR ?= /lib/modules/${KVERSION}/kernel/drivers/hid
default:
@echo -e "\n::\033[32m Compiling Fanatec kernel module\033[0m"
@echo "========================================"
$(MAKE) -C $(KERNEL_SRC) M=$$PWD
clean:
@echo -e "\n::\033[32m Cleaning Fanatec kernel module\033[0m"
@echo "========================================"
$(MAKE) -C $(KERNEL_SRC) M=$$PWD clean
install:
@echo -e "\n::\033[34m Installing Fanatec kernel module/udev rule\033[0m"
@echo "====================================================="
@cp -v hid-fanatec.ko ${MODULEDIR}
@cp -v fanatec.rules /etc/udev/rules.d/99-fanatec.rules
depmod
uninstall:
@echo -e "\n::\033[34m Uninstalling Fanatec kernel module/udev rule\033[0m"
@echo "====================================================="
@rm -fv ${MODULEDIR}/hid-fanatec.ko
@rm -fv /etc/udev/rules.d/99-fanatec.rules
depmod