summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/futility/Makefile.inc11
1 files changed, 9 insertions, 2 deletions
diff --git a/util/futility/Makefile.inc b/util/futility/Makefile.inc
index ee4ad051e2..ed185ce0d5 100644
--- a/util/futility/Makefile.inc
+++ b/util/futility/Makefile.inc
@@ -2,15 +2,22 @@ additional-dirs += $(objutil)/futility
VBOOT_FUTILITY = $(VBOOT_HOST_BUILD)/futility/futility
-$(VBOOT_FUTILITY):
+HOSTPKGCONFIG ?= pkg-config
+
+$(VBOOT_FUTILITY): check-openssl-presence
@printf " MAKE $(subst $(objutil)/,,$(@))\n"
unset CFLAGS LDFLAGS; $(MAKE) -C $(VBOOT_SOURCE) \
BUILD=$(VBOOT_HOST_BUILD) \
CC="$(HOSTCC)" \
- $(if $(HOSTPKGCONFIG), PKG_CONFIG="$(HOSTPKGCONFIG)") \
+ PKG_CONFIG="$(HOSTPKGCONFIG)" \
V=$(V) \
$@
+.PHONY: check-openssl-presence
+check-openssl-presence:
+ $(HOSTPKGCONFIG) --exists libcrypto || \
+ (echo "Error: Ensure that pkg-config and openssl's libcrypto, including header files, are installed."; exit 1)
+
$(objutil)/futility/futility: $(VBOOT_FUTILITY)
mkdir -p $(dir $@)
cp $< $@.tmp