diff mbox series

[bpf-next,v2,2/5] selftests/bpf: Fix out-of-tree build

Message ID 20210113163319.1516382-3-jean-philippe@linaro.org
State Accepted
Commit 5837cedef6f33e01d1c4ad90ee4e966bcc6f9c30
Headers show
Series selftests/bpf: Some build fixes | expand

Commit Message

Jean-Philippe Brucker Jan. 13, 2021, 4:33 p.m. UTC
When building out-of-tree, the .skel.h files are generated into the
$(OUTPUT) directory, rather than $(CURDIR). Add $(OUTPUT) to the include
paths.

Acked-by: Andrii Nakryiko <andrii@kernel.org>

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

---
 tools/testing/selftests/bpf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.30.0
diff mbox series

Patch

diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 95ce81513648..92888eed89f3 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -25,7 +25,7 @@  BPF_GCC		?= $(shell command -v bpf-gcc;)
 SAN_CFLAGS	?=
 CFLAGS += -g -rdynamic -Wall -O2 $(GENFLAGS) $(SAN_CFLAGS)		\
 	  -I$(CURDIR) -I$(INCLUDE_DIR) -I$(GENDIR) -I$(LIBDIR)		\
-	  -I$(TOOLSINCDIR) -I$(APIDIR)					\
+	  -I$(TOOLSINCDIR) -I$(APIDIR) -I$(OUTPUT)			\
 	  -Dbpf_prog_load=bpf_prog_test_load				\
 	  -Dbpf_load_program=bpf_test_load_program
 LDLIBS += -lcap -lelf -lz -lrt -lpthread