Build kvm-unit-tests out of tree
It is possible to build kvm-unit-tests out-of-tree by running
`configure` from the destination. Makefiles are created there and
correctly compile.
Switch kvm-unit-tests to build OOT to align with other projects in
out repo. With this, all generated files are in out/.
Change-Id: I324716c663097f2a016a97782df4749975d1c293
diff --git a/Makefile b/Makefile
index 30dbb42..d5cc3e8 100644
--- a/Makefile
+++ b/Makefile
@@ -120,15 +120,19 @@
.PHONY: kvmunittests
kvmunittests:
- cd $(KUT_SRC) && \
- ./configure --prefix=$(KUT_OUT) --arch=$(KUT_ARCH) \
+ mkdir -p $(KUT_OUT)
+ cd $(KUT_OUT) && \
+ $(KUT_SRC)/configure \
+ --erratatxt=$(KUT_SRC)/errata.txt \
+ --prefix=$(KUT_OUT) --arch=$(KUT_ARCH) \
--cc=$(KUT_CC) --ld=$(KUT_LD) \
--objcopy=$(KUT_OBJCOPY) --objdump=$(KUT_OBJDUMP)
- PATH=$(KUT_PATH) COMMON_CFLAGS=$(KUT_COMMON_CFLAGS) $(MAKE) -C $(KUT_SRC) install
+ PATH=$(KUT_PATH) COMMON_CFLAGS=$(KUT_COMMON_CFLAGS) \
+ $(MAKE) -C $(KUT_OUT) install
.PHONY: kvmunittests_clean
kvmunittests_clean:
- - $(MAKE) -C $(KUT_SRC) clean
+ - $(MAKE) -C $(KUT_OUT) clean
##