Martin Roth | adaab4a | 2022-10-28 22:38:44 -0600 | [diff] [blame] | 1 | ## SPDX-License-Identifier: GPL-2.0-only |
Patrick Georgi | bda8a04b | 2016-02-01 12:03:04 +0100 | [diff] [blame] | 2 | additional-dirs += $(objutil)/futility |
| 3 | |
Yu-Ping Wu | 0beddb5 | 2020-03-09 10:58:37 +0800 | [diff] [blame] | 4 | VBOOT_FUTILITY = $(VBOOT_HOST_BUILD)/futility/futility |
| 5 | |
Patrick Georgi | 8edfddc | 2020-06-29 21:10:44 +0200 | [diff] [blame] | 6 | HOSTPKGCONFIG ?= pkg-config |
| 7 | |
Patrick Georgi | ed820a0 | 2020-11-11 14:50:01 +0100 | [diff] [blame] | 8 | $(VBOOT_FUTILITY): | check-openssl-presence |
Patrick Georgi | bda8a04b | 2016-02-01 12:03:04 +0100 | [diff] [blame] | 9 | @printf " MAKE $(subst $(objutil)/,,$(@))\n" |
Paul Kocialkowski | 4611451 | 2016-07-24 12:10:38 +0200 | [diff] [blame] | 10 | unset CFLAGS LDFLAGS; $(MAKE) -C $(VBOOT_SOURCE) \ |
Yu-Ping Wu | 0beddb5 | 2020-03-09 10:58:37 +0800 | [diff] [blame] | 11 | BUILD=$(VBOOT_HOST_BUILD) \ |
Patrick Georgi | bda8a04b | 2016-02-01 12:03:04 +0100 | [diff] [blame] | 12 | CC="$(HOSTCC)" \ |
Martin Roth | 2dd7490 | 2022-08-27 20:54:41 -0600 | [diff] [blame] | 13 | WERROR="-Werror -Wno-deprecated-declarations" \ |
Patrick Georgi | 8edfddc | 2020-06-29 21:10:44 +0200 | [diff] [blame] | 14 | PKG_CONFIG="$(HOSTPKGCONFIG)" \ |
Patrick Georgi | bda8a04b | 2016-02-01 12:03:04 +0100 | [diff] [blame] | 15 | V=$(V) \ |
Edward O'Callaghan | e146196 | 2021-12-20 13:26:07 +1100 | [diff] [blame] | 16 | USE_FLASHROM=0 \ |
Yu-Ping Wu | 0beddb5 | 2020-03-09 10:58:37 +0800 | [diff] [blame] | 17 | $@ |
Patrick Georgi | bda8a04b | 2016-02-01 12:03:04 +0100 | [diff] [blame] | 18 | |
Patrick Georgi | 8edfddc | 2020-06-29 21:10:44 +0200 | [diff] [blame] | 19 | .PHONY: check-openssl-presence |
| 20 | check-openssl-presence: |
Martin Roth | d5f45d0 | 2022-02-23 21:04:25 -0700 | [diff] [blame] | 21 | @$(HOSTPKGCONFIG) --exists libcrypto || \ |
Patrick Georgi | 8edfddc | 2020-06-29 21:10:44 +0200 | [diff] [blame] | 22 | (echo "Error: Ensure that pkg-config and openssl's libcrypto, including header files, are installed."; exit 1) |
| 23 | |
Yu-Ping Wu | 0beddb5 | 2020-03-09 10:58:37 +0800 | [diff] [blame] | 24 | $(objutil)/futility/futility: $(VBOOT_FUTILITY) |
| 25 | mkdir -p $(dir $@) |
Patrick Georgi | bda8a04b | 2016-02-01 12:03:04 +0100 | [diff] [blame] | 26 | cp $< $@.tmp |
| 27 | mv $@.tmp $@ |