patch.diff (965B)
1 diff --git a/Makefile b/Makefile 2 index e3e4814..6605e65 100644 3 --- a/Makefile 4 +++ b/Makefile 5 @@ -1,5 +1,5 @@ 6 -INSTALL = /usr/bin/install -c 7 -INSTALLDATA = /usr/bin/install -c -m 644 8 +INSTALL = install -D 9 +INSTALLDATA = install -D -m 644 10 PROGNAME = footswitch 11 CFLAGS = -Wall 12 UNAME := $(shell uname) 13 @@ -7,11 +7,7 @@ ifeq ($(UNAME), Darwin) 14 CFLAGS += -DOSX 15 LDFLAGS = -lhidapi 16 else 17 - ifeq ($(UNAME), Linux) 18 - LDFLAGS = `pkg-config hidapi-libusb --libs` 19 - else 20 - LDFLAGS = -lhidapi 21 - endif 22 +LDFLAGS = -lhidapi-hidraw 23 endif 24 25 all: $(PROGNAME) 26 @@ -20,9 +16,9 @@ $(PROGNAME): $(PROGNAME).c common.h common.c debug.h debug.c 27 $(CC) $(PROGNAME).c common.c debug.c -o $(PROGNAME) $(CFLAGS) $(LDFLAGS) 28 29 install: all 30 - $(INSTALL) $(PROGNAME) /usr/bin 31 + $(INSTALL) $(PROGNAME) $(PREFIX)/bin/$(PROGNAME) 32 ifeq ($(UNAME), Linux) 33 - $(INSTALLDATA) 19-footswitch.rules /etc/udev/rules.d 34 + $(INSTALLDATA) 19-footswitch.rules $(PREFIX)/etc/udev/rules.d 35 endif 36 37 clean: