Fix hosted compile on MacOS. hidapi-libusb has a different name
This commit is contained in:
parent
de83dbb7e2
commit
1b49823f64
@ -12,6 +12,7 @@ CFLAGS += -DHOSTED_BMP_ONLY=$(HOSTED_BMP_ONLY) -Wno-format-truncation
|
|||||||
|
|
||||||
ifneq (, $(findstring linux, $(SYS)))
|
ifneq (, $(findstring linux, $(SYS)))
|
||||||
SRC += serial_unix.c
|
SRC += serial_unix.c
|
||||||
|
HIDAPILIB = hidapi-libusb
|
||||||
ifeq ($(ASAN), 1)
|
ifeq ($(ASAN), 1)
|
||||||
CFLAGS += -fsanitize=address
|
CFLAGS += -fsanitize=address
|
||||||
LDFLAGS += -lasan
|
LDFLAGS += -lasan
|
||||||
@ -36,6 +37,7 @@ SRC += serial_unix.c
|
|||||||
LDFLAGS += -lhidapi
|
LDFLAGS += -lhidapi
|
||||||
LDFLAGS += -framework CoreFoundation
|
LDFLAGS += -framework CoreFoundation
|
||||||
CFLAGS += -Ihidapi/hidapi
|
CFLAGS += -Ihidapi/hidapi
|
||||||
|
HIDAPILIB = hidapi
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(HOSTED_BMP_ONLY), 1)
|
ifneq ($(HOSTED_BMP_ONLY), 1)
|
||||||
@ -51,8 +53,8 @@ ifneq ($(HOSTED_BMP_ONLY), 1)
|
|||||||
ifneq (, $(findstring mingw, $(SYS)))
|
ifneq (, $(findstring mingw, $(SYS)))
|
||||||
SRC += hid.c
|
SRC += hid.c
|
||||||
else
|
else
|
||||||
CFLAGS += $(shell pkg-config --cflags hidapi-libusb)
|
CFLAGS += $(shell pkg-config --cflags $(HIDAPILIB))
|
||||||
LDFLAGS += $(shell pkg-config --libs hidapi-libusb)
|
LDFLAGS += $(shell pkg-config --libs $(HIDAPILIB))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user