Adding $(srctree) on the included path we can build vhost_test
also when the kernel is not built in the source tree (make O=...).

Use of EXTRA_CFLAGS is deprecated, so let's use ccflags-y.

Signed-off-by: Stefano Garzarella <[email protected]>
---
 tools/virtio/vhost_test/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virtio/vhost_test/Makefile b/tools/virtio/vhost_test/Makefile
index 94d3aff987dc..df5ad39e2520 100644
--- a/tools/virtio/vhost_test/Makefile
+++ b/tools/virtio/vhost_test/Makefile
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
 obj-m += vhost_test.o
-EXTRA_CFLAGS += -Idrivers/vhost
+ccflags-y += -I$(srctree)/drivers/vhost
-- 
2.36.1

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reply via email to