0005-Makefile-allow-passing-a-custom-path-to-libgcrypt-co.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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
  5. The libgcrypt-config program may not be in the PATH, so this patch
  6. adjusts the Makefile so that it understands a LIBGCRYPT_CONFIG
  7. variable. By default, its value is libgcrypt-config so that the
  8. behavior is unchanged.
  9. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  10. ---
  11. Makefile | 5 +++--
  12. 1 file changed, 3 insertions(+), 2 deletions(-)
  13. diff --git a/Makefile b/Makefile
  14. index ea2cd41..649ddfb 100644
  15. --- a/Makefile
  16. +++ b/Makefile
  17. @@ -61,13 +61,14 @@ BINSRCS = $(addsuffix .c,$(BINS))
  18. VERSION ?= $(shell sh mk-version)
  19. RELEASE_VERSION := $(shell cat VERSION)
  20. +LIBGCRYPT_CONFIG ?= libgcrypt-config
  21. CC ?= gcc
  22. CFLAGS ?= -O3 -g
  23. override CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings
  24. -override CFLAGS += $(shell libgcrypt-config --cflags) $(CRYPTO_CFLAGS)
  25. +override CFLAGS += $(shell $(LIBGCRYPT_CONFIG) --cflags) $(CRYPTO_CFLAGS)
  26. override CPPFLAGS += -DVERSION=\"$(VERSION)\"
  27. LDFLAGS ?= -g
  28. -LIBS += $(shell libgcrypt-config --libs) $(CRYPTO_LDADD)
  29. +LIBS += $(shell $(LIBGCRYPT_CONFIG) --libs) $(CRYPTO_LDADD)
  30. ifeq ($(shell uname -s), SunOS)
  31. LIBS += -lnsl -lresolv -lsocket
  32. --
  33. 2.6.4