diff options
Diffstat (limited to 'util/futility/Makefile.mk')
-rw-r--r-- | util/futility/Makefile.mk | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/util/futility/Makefile.mk b/util/futility/Makefile.mk new file mode 100644 index 0000000000..a7bcee50d3 --- /dev/null +++ b/util/futility/Makefile.mk @@ -0,0 +1,27 @@ +## SPDX-License-Identifier: GPL-2.0-only +additional-dirs += $(objutil)/futility + +VBOOT_FUTILITY = $(VBOOT_HOST_BUILD)/futility/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)" \ + WERROR="-Werror -Wno-deprecated-declarations" \ + PKG_CONFIG="$(HOSTPKGCONFIG)" \ + V=$(V) \ + USE_FLASHROM=0 \ + $@ + +.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 + mv $@.tmp $@ |