[RFC PATCH 2/6] vhost_test: add $(srctree) on the included path

From: Stefano Garzarella
Date: Mon Jul 04 2022 - 13:17:23 EST


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 <sgarzare@xxxxxxxxxx>
---
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