]> git.baikalelectronics.ru Git - kernel.git/commit
samples: bpf: fix build after move to compiling full libbpf.a
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 15 May 2018 05:35:04 +0000 (22:35 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 15 May 2018 05:52:10 +0000 (22:52 -0700)
commit05f2d294fb207acb6b80b7bce28a22047a03546e
treef7d14c565d49b414c7224e543e91f1a88ab00ec0
parent630699236f9d37eb72d859461e94021e23b30807
samples: bpf: fix build after move to compiling full libbpf.a

There are many ways users may compile samples, some of them got
broken by commit 11fffb0db434 ("samples: bpf: compile and link
against full libbpf").  Improve path resolution and make libbpf
building a dependency of source files to force its build.

Samples should now again build with any of:
 cd samples/bpf; make
 make samples/bpf/
 make -C samples/bpf
 cd samples/bpf; make O=builddir
 make samples/bpf/ O=builddir
 make -C samples/bpf O=builddir
 export KBUILD_OUTPUT=builddir
 make samples/bpf/
 make -C samples/bpf

Fixes: 11fffb0db434 ("samples: bpf: compile and link against full libbpf")
Reported-by: Björn Töpel <bjorn.topel@gmail.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
samples/bpf/Makefile