summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Campbell <ijc@hellion.org.uk>2018-12-09 11:37:45 +0000
committerIan Campbell <ijc@debian.org>2019-01-06 13:37:59 +0000
commit2dabc037bd0eb39052acfd5ecf84b4b2a15d3ace (patch)
tree83f8e54091a36905fbd3aca1028f64b93f535228
parent1b503e699de6b72880c9af6a006a53b46c871a45 (diff)
[PATCH] Allow configuration of the pkg-config to use
This allows for cross building. Based on a patch from Helmut Grohne in Debian bug #908525. Gbp-Pq: Name cross-pkg-config.patch
-rw-r--r--Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 1034036..71da891 100644
--- a/Makefile
+++ b/Makefile
@@ -3,17 +3,18 @@ VERSION=0.5.6
CFLAGS += -c -g -Os -Wall -Wextra
CPPFLAGS += -DQCONTROL_VERSION=\"$(VERSION)\"
+PKG_CONFIG ?= pkg-config
LDFLAGS += -g
LIBS += -lpthread
LIBS_STATIC += /usr/lib/liblua5.1.a -lpthread -lm -ldl
-CFLAGS += $(shell pkg-config --cflags lua5.1)
-LIBS += $(shell pkg-config --libs lua5.1)
+CFLAGS += $(shell $(PKG_CONFIG) --cflags lua5.1)
+LIBS += $(shell $(PKG_CONFIG) --libs lua5.1)
-ifeq ($(shell pkg-config --exists libsystemd-daemon 2>/dev/null && echo 1),1)
+ifeq ($(shell $(PKG_CONFIG) --exists libsystemd-daemon 2>/dev/null && echo 1),1)
CPPFLAGS += -DHAVE_SYSTEMD
-CFLAGS += $(shell pkg-config --cflags libsystemd-daemon)
-LIBS += $(shell pkg-config --libs libsystemd-daemon)
+CFLAGS += $(shell $(PKG_CONFIG) --cflags libsystemd-daemon)
+LIBS += $(shell $(PKG_CONFIG) --libs libsystemd-daemon)
endif
SOURCES=qcontrol.c system.c qnap-pic.c ts209.c ts219.c ts409.c ts41x.c evdev.c a125.c synology.c