libusb should be included through pkg-config, not merely assumed to be in standard locations
On macOS libusb is typically installed through a package system like MacPorts or Homebrew which don't use standard locations and which require additional compiler and linker flags to locate. This means that libusb won't be picked up by the compiler without additional flags. This may also be true on some more esoteric Linux distributions.
However, libusb is a pkg-config project, so you should be using pkg-config to specify those flags, not just assuming everything is standard. Adding $(shell pkg-config --cflags libusb-1.0)
to CFLAGS
and replacing -lusb-1.0
with $(shell pkg-config --libs libusb-1.0)
in LDFLAGS
in Makefile
was enough for me to be able to run make unix
.
(I would submit a patch, but that would require copyright approval from work, and I'm currently on vacation. Furthermore there's probably a more elegant way to invoke pkg-config conditionally than that...)