-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (37 loc) · 1.21 KB
/
Copy pathMakefile
File metadata and controls
45 lines (37 loc) · 1.21 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
DESTDIR := /lib/modules/$(shell uname -r)
all: cheeky_driver cheeky_control
cheeky_driver:
make -C src/cheeky_driver/
cp src/cheeky_driver/cheeky_driver.ko ./
cheeky_control:
make -C src/cheeky_control/
cp src/cheeky_control/cheeky_control ./
.PHONY: doc
doc:
doxygen Doxyfile
install: all
groupadd cheeky
echo "KERNEL==\"cheeky[0-9]*\", GROUP=\"cheeky\"" > /etc/udev/rules.d/10-cheeky.rules
cp cheeky_control /usr/bin/cheeky_control && \
chown root:cheeky /usr/bin/cheeky_control && \
chmod 750 /usr/bin/cheeky_control && \
mkdir -p $(DESTDIR)/misc
install cheeky_driver.ko $(DESTDIR)/misc/
depmod -a
modprobe cheeky_driver
@echo "*****"
@echo "To use cheeky_control to control your newly installed led display, your user must be a member of the cheeky group."
@echo "The driver won't be loaded at next boot, follow the instructions for your distribution to make it automatically loading at next boot."
@echo "*****"
uninstall:
rm /etc/udev/rules.d/10-cheeky.rules
groupdel cheeky
rmmod cheeky_driver
rm -f /usr/bin/cheeky_control
rm -f $(DESTDIR)/misc/cheeky_driver.ko
clean:
make -C src/cheeky_driver/ clean
make -C src/cheeky_control/ clean
rm -f cheeky_control
rm -f cheeky_driver.ko
rm -Rf doc/*