From 7cacdab98ec567e497403233992e3d51a6060d96 Mon Sep 17 00:00:00 2001 From: dragonmux Date: Fri, 5 Aug 2022 01:20:36 +0100 Subject: [PATCH] hosted: Cleaned up the CFLAGS and LDFLAGS building to use pkg-config to find libusb1 and corrected the pkg-config presence check --- src/platforms/hosted/Makefile.inc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/platforms/hosted/Makefile.inc b/src/platforms/hosted/Makefile.inc index 50b2da4..bd661db 100644 --- a/src/platforms/hosted/Makefile.inc +++ b/src/platforms/hosted/Makefile.inc @@ -49,15 +49,14 @@ else ifneq (filter, macosx darwin, $(SYS)) endif ifneq ($(HOSTED_BMP_ONLY), 1) - ifneq ($(shell pkg-config --exists libusb; echo $$?), 0) - $(error Please install libusb dependency or set HOSTED_BMP_ONLY to 1) + ifneq ($(shell pkg-config --exists libusb-1.0; echo $$?), 0) + $(error Please install libusb-1.0 dependency or set HOSTED_BMP_ONLY to 1) endif ifneq ($(shell pkg-config --exists libftdi1; echo $$?), 0) $(error Please install libftdi1 dependency or set HOSTED_BMP_ONLY to 1) endif - LDFLAGS += -lusb-1.0 - CFLAGS += $(shell pkg-config --cflags libftdi1) - LDFLAGS += $(shell pkg-config --libs libftdi1) + CFLAGS += $(shell pkg-config --cflags libusb-1.0) $(shell pkg-config --cflags libftdi1) + LDFLAGS += $(shell pkg-config --libs libusb-1.0) $(shell pkg-config --libs libftdi1) CFLAGS += -Wno-missing-field-initializers endif