Merge "fix(fiptool): respect OPENSSL_DIR" into integration
diff --git a/Makefile b/Makefile
index 32eb501..419e1b9 100644
--- a/Makefile
+++ b/Makefile
@@ -1443,7 +1443,7 @@
${FIPTOOL}: FORCE
ifdef UNIX_MK
- ${Q}${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" FIPTOOL=${FIPTOOL} --no-print-directory -C ${FIPTOOLPATH}
+ ${Q}${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" FIPTOOL=${FIPTOOL} OPENSSL_DIR=${OPENSSL_DIR} --no-print-directory -C ${FIPTOOLPATH}
else
# Clear the MAKEFLAGS as we do not want
# to pass the gnumake flags to nmake.
diff --git a/tools/fiptool/Makefile b/tools/fiptool/Makefile
index 11d2e7b..7c2a083 100644
--- a/tools/fiptool/Makefile
+++ b/tools/fiptool/Makefile
@@ -12,6 +12,8 @@
PROJECT := $(notdir ${FIPTOOL})
OBJECTS := fiptool.o tbbr_config.o
V ?= 0
+OPENSSL_DIR := /usr
+
override CPPFLAGS += -D_GNU_SOURCE -D_XOPEN_SOURCE=700
HOSTCCFLAGS := -Wall -Werror -pedantic -std=c99
@@ -20,7 +22,7 @@
else
HOSTCCFLAGS += -O2
endif
-LDLIBS := -lcrypto
+LDLIBS := -L${OPENSSL_DIR}/lib -lcrypto
ifeq (${V},0)
Q := @
@@ -28,7 +30,7 @@
Q :=
endif
-INCLUDE_PATHS := -I../../include/tools_share
+INCLUDE_PATHS := -I../../include/tools_share -I${OPENSSL_DIR}/include
HOSTCC ?= gcc