From dc73674434eeaa31f06477466ec1e5f5e1ca77d7 Mon Sep 17 00:00:00 2001 From: Christopher Obbard Date: Fri, 19 Dec 2025 23:54:58 +0000 Subject: [PATCH] makefile: Allow cross-building qdl fails to cross build from source, because the Makefile hard-codes the build architecture pkg-config. Allow pkg-config to be overwritten. Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1117020 Signed-off-by: Christopher Obbard --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7ec4a17..0256010 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,9 @@ QDL := qdl RAMDUMP := qdl-ramdump VERSION := $(or $(VERSION), $(shell git describe --dirty --always --tags 2>/dev/null), "unknown-version") -CFLAGS += -O2 -Wall -g `pkg-config --cflags libxml-2.0 libusb-1.0` -LDFLAGS += `pkg-config --libs libxml-2.0 libusb-1.0` +PKG_CONFIG ?= pkg-config +CFLAGS += -O2 -Wall -g `$(PKG_CONFIG) --cflags libxml-2.0 libusb-1.0` +LDFLAGS += `$(PKG_CONFIG) --libs libxml-2.0 libusb-1.0` ifeq ($(OS),Windows_NT) LDFLAGS += -lws2_32 endif