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