Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/linux-sunxi/sunxi-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Campbell <ijc@hellion.org.uk>2022-01-16 14:10:36 +0300
committerIan Campbell <ijc@hellion.org.uk>2022-01-16 14:25:18 +0300
commita2cc3dd19a5722db649432ec83059294a1a13879 (patch)
tree6cf516e2d88b5b83870e38bf1261641fea664654
parent02a865f5f8e844ae3c1d070f36fc5f42be616202 (diff)
Makefile: Specify `pkg-config` via a variable.
In cross-build situations this allows for `«triplet»-pkg-config` to be passed in so that target libraries are used instead of host ones. Unless `PKG_CONFIG` is overridden by the person doing the build then there is no semantic change. Signed-off-by: Ian Campbell <ijc@debian.org>
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index a4fa649..d4676de 100644
--- a/Makefile
+++ b/Makefile
@@ -36,6 +36,8 @@ endif
DEFAULT_CFLAGS += -Iinclude/
+PKG_CONFIG ?= pkg-config
+
# Tools useful on host and target
TOOLS = sunxi-fexc sunxi-bootinfo sunxi-fel sunxi-nand-part sunxi-pio
@@ -116,12 +118,12 @@ sunxi-fexc: fexc.h script.h script.c \
script_fex.h script_fex.c
LIBUSB = libusb-1.0
-LIBUSB_CFLAGS ?= `pkg-config --cflags $(LIBUSB)`
-LIBUSB_LIBS ?= `pkg-config --libs $(LIBUSB)`
+LIBUSB_CFLAGS ?= `$(PKG_CONFIG) --cflags $(LIBUSB)`
+LIBUSB_LIBS ?= `$(PKG_CONFIG) --libs $(LIBUSB)`
ZLIB = zlib
-ZLIB_CFLAGS ?= `pkg-config --cflags $(ZLIB)`
-ZLIB_LIBS ?= `pkg-config --libs $(ZLIB)`
+ZLIB_CFLAGS ?= `$(PKG_CONFIG) --cflags $(ZLIB)`
+ZLIB_LIBS ?= `$(PKG_CONFIG) --libs $(ZLIB)`
ifeq ($(OS),Windows_NT)
# Windows lacks mman.h / mmap()