tools/Makefile: get openssl CFLAGS from pkg-config

Fixes building mkimage on systems where OpenSSL header files do not
live in the standard include path.

Signed-off-by: Pierre Bourdon <delroth@gmail.com>
This commit is contained in:
Pierre Bourdon 2019-04-11 00:58:49 +02:00 committed by Tom Rini
parent 3174cafd9c
commit 9bdfe290e9

View File

@ -150,6 +150,8 @@ endif
# MXSImage needs LibSSL
ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_ARMADA_38X)$(CONFIG_ARMADA_39X)$(CONFIG_FIT_SIGNATURE),)
HOSTCFLAGS_kwbimage.o += \
$(shell pkg-config --cflags libssl libcrypto 2> /dev/null || echo "")
HOSTLOADLIBES_mkimage += \
$(shell pkg-config --libs libssl libcrypto 2> /dev/null || echo "-lssl -lcrypto")