Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ ifeq ($(UNAME),Linux)
OBJS += hid-libusb.o

# Link libusb statically, when possible
LIBUSB = /usr/lib/x86_64-linux-gnu/libusb-1.0.a
# derive the location from the results of the pkg-config command
LIBUSB := $(patsubst -L%,%,$(word 1,$(LIBS)))/libusb-1.0.a
ifeq ($(wildcard $(LIBUSB)),$(LIBUSB))
LIBS = $(LIBUSB) -lpthread -ludev
LIBS = $(LIBUSB)
endif
# these libs are always required on Linux
LIBS += -lpthread -ludev
endif

#
Expand Down