mirror of
https://github.com/Lekensteyn/ltunify.git
synced 2025-12-08 17:53:23 +00:00
When a touchpad event occurs while the device is being queried (e.g. for features), then do_io (for do_read) would fail because the report was not of the correct type (0x20 vs 0x11 for example). To fix this, make do_read retry reads (within the allowed timeout). Previously the expected report type was hidden in the msg parameter, make this expected report type more explicit now in a new parameter.
38 lines
960 B
Makefile
38 lines
960 B
Makefile
CFLAGS ?= -g -O2 -Wall -Wextra -D_FORTIFY_SOURCE=2 -fstack-protector --param ssp-buffer-size=4
|
|
# for install-home
|
|
BINDIR ?= $(HOME)/bin
|
|
|
|
# for install and uninstall
|
|
DESTDIR ?=
|
|
bindir ?= /usr/local/bin
|
|
udevrulesdir ?= /etc/udev/rules.d
|
|
|
|
udevrule = 42-logitech-unify-permissions.rules
|
|
|
|
%: %.c
|
|
$(CC) $(CFLAGS) -o $(OUTDIR)$@ $<
|
|
|
|
all: ltunify read-dev-usbmon
|
|
|
|
read-dev-usbmon: read-dev-usbmon.c hidraw.c
|
|
|
|
ltunify: ltunify.c hidpp20.c
|
|
$(CC) $(CFLAGS) -o $(OUTDIR)$@ $< -lrt
|
|
|
|
.PHONY: all clean install-home install install-udevrule uninstall
|
|
clean:
|
|
rm -f ltunify read-dev-usbmon hidraw
|
|
|
|
install-home: ltunify
|
|
install -m755 -D ltunify $(BINDIR)/ltunify
|
|
|
|
# System-wide installation
|
|
install: ltunify install-udevrule
|
|
install -m755 -D ltunify $(DESTDIR)$(bindir)/ltunify
|
|
|
|
install-udevrule: udev/$(udevrule)
|
|
install -m644 -D udev/$(udevrule) $(DESTDIR)$(udevrulesdir)/$(udevrule)
|
|
|
|
uninstall:
|
|
$(RM) $(DESTDIR)$(bindir)/ltunify $(DESTDIR)$(udevrulesdir)/$(udevrule)
|