-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (19 loc) · 694 Bytes
/
Makefile
File metadata and controls
25 lines (19 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.PHONY: all install uninstall
all: servod
servod: servod.c mailbox.c
gcc -Wall -g -O2 -L/opt/vc/lib -I/opt/vc/include -o servod servod.c mailbox.c -lm -lbcm_host
install: servod
[ "`id -u`" = "0" ] || { echo "Must be run as root"; exit 1; }
cp -f servod /usr/local/sbin
cp -f init-script /etc/init.d/servoblaster
chmod 755 /etc/init.d/servoblaster
update-rc.d servoblaster defaults 92 08
/etc/init.d/servoblaster start
uninstall:
[ "`id -u`" = "0" ] || { echo "Must be run as root"; exit 1; }
[ -e /etc/init.d/servoblaster ] && /etc/init.d/servoblaster stop || :
update-rc.d servoblaster remove
rm -f /usr/local/sbin/servod
rm -f /etc/init.d/servoblaster
clean:
rm -f servod