summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorCástor Muñoz <cmvidal@gmail.com>2017-04-13 21:58:16 +0200
committerCástor Muñoz <cmvidal@gmail.com>2017-06-24 12:52:53 +0200
commitd6452729e3b8a4f7d111916af8eaad5a5a60b3c9 (patch)
treec0ad1bb1c4e39883226bae1c45fba8653ab6c069 /rbutil
parentfbbba9292b07d91916d330b31e7f8644d65ff91a (diff)
downloadrockbox-d6452729e3b8a4f7d111916af8eaad5a5a60b3c9.tar.gz
rockbox-d6452729e3b8a4f7d111916af8eaad5a5a60b3c9.tar.bz2
rockbox-d6452729e3b8a4f7d111916af8eaad5a5a60b3c9.zip
mkimxboot: fix compilation issues with crypto lib
Change-Id: Ic81583dc7e872d332cbd4fd87143579cceeda484
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/mkimxboot/Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/rbutil/mkimxboot/Makefile b/rbutil/mkimxboot/Makefile
index 132c2435f9..b584084811 100644
--- a/rbutil/mkimxboot/Makefile
+++ b/rbutil/mkimxboot/Makefile
@@ -10,7 +10,13 @@ IMXTOOLS_DIR=../../utils/imxtools/sbtools/
CFLAGS += -I$(IMXTOOLS_DIR) -Wall
# std=gnu99 is required by MinGW on Windows (c99 is sufficient for Linux / MXE)
CFLAGS += -std=gnu99 -g -O3
-LDFLAGS += -lcrypto++
+
+# Distros could use different names for the crypto library. We try a list
+# of candidate names, only one of them should be the valid one.
+PKGCONFIG := $(CROSS)pkg-config
+LIBCRYPTO_NAMES = libcryptopp libcrypto++ cryptopp crypto++
+$(foreach l,$(LIBCRYPTO_NAMES),\
+ $(eval LDOPTS += $(shell $(PKGCONFIG) --silence-errors --libs $(l))))
OUTPUT = mkimxboot