aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/bpf/Makefile')
-rw-r--r--tools/testing/selftests/bpf/Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
new file mode 100644
index 000000000000..4b498265dae6
--- /dev/null
+++ b/tools/testing/selftests/bpf/Makefile
@@ -0,0 +1,20 @@
+LIBDIR := ../../../lib
+BPFOBJ := $(LIBDIR)/bpf/bpf.o
+
+CFLAGS += -Wall -O2 -lcap -I../../../include/uapi -I$(LIBDIR)
+
+TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map
+
+TEST_PROGS := test_kmod.sh
+
+.PHONY: all clean force
+
+# force a rebuild of BPFOBJ when its dependencies are updated
+force:
+
+$(BPFOBJ): force
+ $(MAKE) -C $(dir $(BPFOBJ))
+
+$(test_objs): $(BPFOBJ)
+
+include ../lib.mk