diff mbox series

[bpf-next,2/2] bpftool: skeleton should depend on libbpf

Message ID 20200310183624.441788-3-songliubraving@fb.com
State Changes Requested
Delegated to: BPF Maintainers
Headers show
Series Fixes for bpftool-prog-profile | expand

Commit Message

Song Liu March 10, 2020, 6:36 p.m. UTC
Add the dependency to libbpf, to fix build errors like:

  In file included from skeleton/profiler.bpf.c:5:
  .../bpf_helpers.h:5:10: fatal error: 'bpf_helper_defs.h' file not found
  #include "bpf_helper_defs.h"
  1 error generated.
  make: *** [skeleton/profiler.bpf.o] Error 1
  make: *** Waiting for unfinished jobs....

Fixes: 47c09d6a9f67 ("bpftool: Introduce "prog profile" command")
Signed-off-by: Song Liu <songliubraving@fb.com>
 tools/bpf/bpftool/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
index 05a37f0f76a9..0389355f8bdc 100644
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@ -128,7 +128,7 @@  $(OUTPUT)_prog.o: prog.c
 $(OUTPUT)_bpftool: $(_OBJS) $(LIBBPF)
 	$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(_OBJS) $(LIBS)
-skeleton/profiler.bpf.o: skeleton/profiler.bpf.c
+skeleton/profiler.bpf.o: skeleton/profiler.bpf.c $(LIBBPF)
 	$(QUIET_CLANG)$(CLANG) -I$(srctree)/tools/lib -g -O2 -target bpf -c $< -o $@
 profiler.skel.h: $(OUTPUT)_bpftool skeleton/profiler.bpf.o