diff options
Diffstat (limited to 'tools/testing/selftests/bpf/Makefile')
-rw-r--r-- | tools/testing/selftests/bpf/Makefile | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 67531f47781b..6a1ad58cb66f 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile | |||
@@ -1,22 +1,23 @@ | |||
1 | LIBDIR := ../../../lib | 1 | LIBDIR := ../../../lib |
2 | BPFOBJ := $(LIBDIR)/bpf/bpf.o | 2 | BPFDIR := $(LIBDIR)/bpf |
3 | 3 | ||
4 | CFLAGS += -Wall -O2 -lcap -I../../../include/uapi -I$(LIBDIR) $(BPFOBJ) | 4 | CFLAGS += -Wall -O2 -I../../../include/uapi -I$(LIBDIR) |
5 | LDLIBS += -lcap | ||
5 | 6 | ||
6 | TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map | 7 | TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map |
7 | 8 | ||
8 | TEST_PROGS := test_kmod.sh | 9 | TEST_PROGS := test_kmod.sh |
9 | 10 | ||
10 | all: $(TEST_GEN_PROGS) | 11 | include ../lib.mk |
12 | |||
13 | BPFOBJ := $(OUTPUT)/bpf.o | ||
14 | |||
15 | $(TEST_GEN_PROGS): $(BPFOBJ) | ||
11 | 16 | ||
12 | .PHONY: all clean force | 17 | .PHONY: force |
13 | 18 | ||
14 | # force a rebuild of BPFOBJ when its dependencies are updated | 19 | # force a rebuild of BPFOBJ when its dependencies are updated |
15 | force: | 20 | force: |
16 | 21 | ||
17 | $(BPFOBJ): force | 22 | $(BPFOBJ): force |
18 | $(MAKE) -C $(dir $(BPFOBJ)) | 23 | $(MAKE) -C $(BPFDIR) OUTPUT=$(OUTPUT)/ |
19 | |||
20 | $(test_objs): $(BPFOBJ) | ||
21 | |||
22 | include ../lib.mk | ||