From 70e29e35f220611e01627795581413bf219bbefa Mon Sep 17 00:00:00 2001 From: Danilo Spinella Date: Sun, 24 Feb 2019 10:50:20 +0100 Subject: [PATCH 1/2] Fix PREFIX variable assignement --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cffb3c65..8a2a65b2 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -PREFIX=/usr/local +PREFIX?=/usr/local INSTALL=install CFLAGS+=-std=gnu89 -O2 -g -MMD -Wall \ -Wno-pointer-sign \ From 54badc02f7bd04a91064f6f7d55bcf0e8daf9eec Mon Sep 17 00:00:00 2001 From: Danilo Spinella Date: Sun, 24 Feb 2019 10:47:35 +0100 Subject: [PATCH 2/2] Add PKG_CONFIG variable and replace pkg-config Respect pkg-config value from environment. --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 8a2a65b2..348608b5 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ PREFIX?=/usr/local +PKG_CONFIG?=pkg-config INSTALL=install CFLAGS+=-std=gnu89 -O2 -g -MMD -Wall \ -Wno-pointer-sign \ @@ -36,13 +37,13 @@ endif PKGCONFIG_LIBS="blkid uuid liburcu libsodium zlib liblz4 libzstd" -PKGCONFIG_CFLAGS:=$(shell pkg-config --cflags $(PKGCONFIG_LIBS)) +PKGCONFIG_CFLAGS:=$(shell $(PKG_CONFIG) --cflags $(PKGCONFIG_LIBS)) ifeq (,$(PKGCONFIG_CFLAGS)) - $(error pkg-config error) + $(error pkg-config error, command: $(PKG_CONFIG) --cflags $(PKGCONFIG_LIBS)) endif -PKGCONFIG_LDLIBS:=$(shell pkg-config --libs $(PKGCONFIG_LIBS)) +PKGCONFIG_LDLIBS:=$(shell $(PKG_CONFIG) --libs $(PKGCONFIG_LIBS)) ifeq (,$(PKGCONFIG_LDLIBS)) - $(error pkg-config error (libs)) + $(error pkg-config error, command: $(PKG_CONFIG) --libs $(PKGCONFIG_LIBS)) endif CFLAGS+=$(PKGCONFIG_CFLAGS)