1
0
mirror of https://github.com/richardghirst/PiBits.git synced 2025-02-20 14:54:14 +01:00
Richard Hirst e603254240 Rework to allow specifying cycle time and step increment, allow
relative movements, allow specifying pulse widths in microseconds
or as a percentage.
2013-12-31 12:32:25 +00:00

26 lines
631 B
Makefile

.PHONY: all install uninstall
all: servod
servod: servod.c
gcc -Wall -g -O2 -o servod servod.c -lm
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