diff options
author | Mickaël Salaün <mic@digikod.net> | 2017-02-11 17:20:23 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-15 12:16:17 -0500 |
commit | d498f8719a098a5df7c6dba4ea302df7afb51efd (patch) | |
tree | 3f3def3c3d9c6b8b249f4630ad715f9b37f7ca58 /tools | |
parent | cdc6a4ba88fbc26de1ffe8cbcaf0e41d316046fd (diff) |
bpf: Rebuild bpf.o for any dependency update
This is needed to force a rebuild of bpf.o when one of its dependencies
(e.g. uapi/linux/bpf.h) is updated.
Add a phony target.
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Cc: Alexei Starovoitov <ast@fb.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: David S. Miller <davem@davemloft.net>
Cc: Wang Nan <wangnan0@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/bpf/Makefile | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index a35f564f66a1..c7816fe60feb 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile | |||
@@ -1,13 +1,24 @@ | |||
1 | CFLAGS += -Wall -O2 -lcap -I../../../include/uapi -I../../../lib | 1 | LIBDIR := ../../../lib |
2 | BPFOBJ := $(LIBDIR)/bpf/bpf.o | ||
3 | |||
4 | CFLAGS += -Wall -O2 -lcap -I../../../include/uapi -I$(LIBDIR) | ||
2 | 5 | ||
3 | test_objs = test_verifier test_tag test_maps test_lru_map test_lpm_map | 6 | test_objs = test_verifier test_tag test_maps test_lru_map test_lpm_map |
4 | 7 | ||
5 | TEST_PROGS := $(test_objs) test_kmod.sh | 8 | TEST_PROGS := $(test_objs) test_kmod.sh |
6 | TEST_FILES := $(test_objs) | 9 | TEST_FILES := $(test_objs) |
7 | 10 | ||
11 | .PHONY: all clean force | ||
12 | |||
8 | all: $(test_objs) | 13 | all: $(test_objs) |
9 | 14 | ||
10 | $(test_objs): ../../../lib/bpf/bpf.o | 15 | # force a rebuild of BPFOBJ when its dependencies are updated |
16 | force: | ||
17 | |||
18 | $(BPFOBJ): force | ||
19 | $(MAKE) -C $(dir $(BPFOBJ)) | ||
20 | |||
21 | $(test_objs): $(BPFOBJ) | ||
11 | 22 | ||
12 | include ../lib.mk | 23 | include ../lib.mk |
13 | 24 | ||