summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-12-15 17:02:23 +0100
committerPeter Wu <peter@lekensteyn.nl>2014-12-15 17:02:23 +0100
commit609e54a5f669a0784b192c79a3c20e5a0c0b580b (patch)
tree127b79193f8258b518a272545cb35c8b32b1d0da /Makefile
parentcf6f30827732a82e17649a931400a21d4647e041 (diff)
downloadltunify-refactor-lib.tar.gz
read-dev-usbmon: add pcap supportrefactor-lib
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 8116950..666f323 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,9 @@ udevrulesdir ?= /etc/udev/rules.d
udevrule = 42-logitech-unify-permissions.rules
+# Whether to support reading pcap files in read-dev-usbmon
+WITH_PCAP ?= 1
+
PACKAGE_VERSION ?= $(shell git describe --dirty 2>/dev/null | sed s/^v//)
ifeq (PACKAGE_VERSION, "")
LTUNIFY_DEFINES :=
@@ -22,6 +25,9 @@ endif
all: ltunify read-dev-usbmon
read-dev-usbmon: read-dev-usbmon.c hidraw.c
+ifeq ($(WITH_PCAP), 1)
+ $(CC) $(CFLAGS) -o $(OUTDIR)$@ $< -lpcap -DWITH_PCAP=1
+endif
ltunify: ltunify.c hidpp20.c
$(CC) $(CFLAGS) -o $(OUTDIR)$@ $< -lrt $(LTUNIFY_DEFINES)