1 From 6180ca780e3a792bd632d8899c2b35991822c93d Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Mon, 8 Feb 2016 23:32:57 +0100
4 Subject: [PATCH] Makefile: allow passing a custom path to libgcrypt-config
6 The libgcrypt-config program may not be in the PATH, so this patch
7 adjusts the Makefile so that it understands a LIBGCRYPT_CONFIG
8 variable. By default, its value is libgcrypt-config so that the
11 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
15 1 file changed, 3 insertions(+), 2 deletions(-)
17 diff --git a/Makefile b/Makefile
18 index ea2cd41..649ddfb 100644
21 @@ -61,13 +61,14 @@ BINSRCS = $(addsuffix .c,$(BINS))
22 VERSION ?= $(shell sh mk-version)
23 RELEASE_VERSION := $(shell cat VERSION)
25 +LIBGCRYPT_CONFIG ?= libgcrypt-config
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)\"
33 -LIBS += $(shell libgcrypt-config --libs) $(CRYPTO_LDADD)
34 +LIBS += $(shell $(LIBGCRYPT_CONFIG) --libs) $(CRYPTO_LDADD)
36 ifeq ($(shell uname -s), SunOS)
37 LIBS += -lnsl -lresolv -lsocket