We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f1de74 commit 92736a8Copy full SHA for 92736a8
Makefile
@@ -10,6 +10,7 @@ INSTALL := install
10
INSTALL_DIR := $(INSTALL) -m 755 -d
11
INSTALL_PROGRAM := $(INSTALL) -m 755
12
RM := rm -rf
13
+PKG_CONFIG ?= pkg-config
14
15
CC ?= gcc
16
CFLAGS ?= -g -O0
@@ -26,9 +27,9 @@ ifeq ($(UNAME_S),Linux)
26
27
endif
28
29
# Use pkg-config if available
-ifneq (,$(shell which pkg-config))
30
- CFLAGS += $(shell pkg-config --cflags libusb-1.0)
31
- LDFLAGS += $(shell pkg-config --libs libusb-1.0)
+ifneq (,$(shell which $(PKG_CONFIG)))
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags libusb-1.0)
32
+ LDFLAGS += $(shell $(PKG_CONFIG) --libs libusb-1.0)
33
else
34
# But it should still build if pkg-config is not available (e.g. Linux or Mac homebrew)
35
LDFLAGS += -lusb-1.0
0 commit comments