On Thu, 2019-03-21 at 15:43 -0700, Alexei Starovoitov wrote: > On Thu, Mar 21, 2019 at 10:33:17PM +0000, luca.bocca...@gmail.com > wrote: > > From: Luca Boccassi <bl...@debian.org> > > > > Generate a libbpf.pc file at build time so that users can rely > > on pkg-config to find the library, its CFLAGS and LDFLAGS. > > > > Signed-off-by: Luca Boccassi <bl...@debian.org> > > Acked-by: Andrey Ignatov <r...@fb.com> > > --- > > v2: use QUIET_GEN instead of QUIET_LINK to generate pc file, > > save kernel version in its own variable instead of calling > > make inline > > v3: use LIBBPF_VERSION instead of kernel_version > > v4: use -I${prefix}/include rather than -I${prefix}/include/bpf > > in the Cflags field as requested, to keep consistency with > > how the headers are used now and to avoid a dependency from > > the pc file to the headers installation > > v5: add acked-by, add SPDX line to pc file > > v6: remove URL field, generalize Description field > > It fails to build: > make -C ../../../lib/bpf OUTPUT=/data/users/ast/bpf- > next/tools/testing/selftests/bpf/ > make[1]: Entering directory `/data/users/ast/bpf-next/tools/lib/bpf' > make[2]: *** No rule to make target `libbpf.pc', needed by > `all_cmd'. Stop. > make[1]: *** [all] Error 2 > make[1]: Leaving directory `/data/users/ast/bpf-next/tools/lib/bpf'
Thanks, the $(OUTPUT) prefix was missing so the out of tree build didn't work, fixed in v7. -- Kind regards, Luca Boccassi