summaryrefslogtreecommitdiff
path: root/util/futility
diff options
context:
space:
mode:
Diffstat (limited to 'util/futility')
-rw-r--r--util/futility/Makefile1
-rw-r--r--util/futility/Makefile.inc11
2 files changed, 8 insertions, 4 deletions
diff --git a/util/futility/Makefile b/util/futility/Makefile
index cce5da6e9d..2eaab3eaa5 100644
--- a/util/futility/Makefile
+++ b/util/futility/Makefile
@@ -4,6 +4,7 @@ RM ?= rm
HOSTCC ?= $(CC)
VBOOT_SOURCE ?= $(top)/3rdparty/vboot
+VBOOT_HOST_BUILD ?= $(abspath $(objutil)/vboot_lib)
.PHONY: all
all: $(objutil)/futility/futility
diff --git a/util/futility/Makefile.inc b/util/futility/Makefile.inc
index 06e724c15f..ee4ad051e2 100644
--- a/util/futility/Makefile.inc
+++ b/util/futility/Makefile.inc
@@ -1,14 +1,17 @@
additional-dirs += $(objutil)/futility
-$(objutil)/futility/build/futility/futility:
+VBOOT_FUTILITY = $(VBOOT_HOST_BUILD)/futility/futility
+
+$(VBOOT_FUTILITY):
@printf " MAKE $(subst $(objutil)/,,$(@))\n"
unset CFLAGS LDFLAGS; $(MAKE) -C $(VBOOT_SOURCE) \
- BUILD=$(abspath $@/../..) \
+ BUILD=$(VBOOT_HOST_BUILD) \
CC="$(HOSTCC)" \
$(if $(HOSTPKGCONFIG), PKG_CONFIG="$(HOSTPKGCONFIG)") \
V=$(V) \
- $(abspath $@)
+ $@
-$(objutil)/futility/futility: $(objutil)/futility/build/futility/futility
+$(objutil)/futility/futility: $(VBOOT_FUTILITY)
+ mkdir -p $(dir $@)
cp $< $@.tmp
mv $@.tmp $@