1From 6180ca780e3a792bd632d8899c2b35991822c93d Mon Sep 17 00:00:00 2001 2From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 3Date: Mon, 8 Feb 2016 23:32:57 +0100 4Subject: [PATCH] Makefile: allow passing a custom path to libgcrypt-config 5 6The libgcrypt-config program may not be in the PATH, so this patch 7adjusts the Makefile so that it understands a LIBGCRYPT_CONFIG 8variable. By default, its value is libgcrypt-config so that the 9behavior is unchanged. 10 11Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 12--- 13 14 Makefile | 5 +++-- 15 1 file changed, 3 insertions(+), 2 deletions(-) 16 17diff --git a/Makefile b/Makefile 18index ea2cd41..649ddfb 100644 19--- a/Makefile 20+++ b/Makefile 21@@ -61,13 +61,14 @@ BINSRCS = $(addsuffix .c,$(BINS)) 22 VERSION ?= $(shell sh mk-version) 23 RELEASE_VERSION := $(shell cat VERSION) 24 25+LIBGCRYPT_CONFIG ?= libgcrypt-config 26 CC ?= gcc 27 CFLAGS ?= -O3 -g 28 override CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings 29-override CFLAGS += $(shell libgcrypt-config --cflags) $(CRYPTO_CFLAGS) 30+override CFLAGS += $(shell $(LIBGCRYPT_CONFIG) --cflags) $(CRYPTO_CFLAGS) 31 override CPPFLAGS += -DVERSION=\"$(VERSION)\" 32 LDFLAGS ?= -g 33-LIBS += $(shell libgcrypt-config --libs) $(CRYPTO_LDADD) 34+LIBS += $(shell $(LIBGCRYPT_CONFIG) --libs) $(CRYPTO_LDADD) 35 36 ifeq ($(shell uname -s), SunOS) 37 LIBS += -lnsl -lresolv -lsocket 38-- 392.6.4 40 41