aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/Makefile
diff options
context:
space:
mode:
authorJiri Benc <jbenc@redhat.com>2018-03-08 23:00:38 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2018-03-09 10:22:59 +0100
commit6c0710084e6bf5337c9af8075e266069b79ac2c2 (patch)
treea066d7752105361a3458125457f1e96c749611b0 /tools/bpf/Makefile
parenttools: bpf: consistent make bpf_install (diff)
downloadlinux-dev-6c0710084e6bf5337c9af8075e266069b79ac2c2.tar.xz
linux-dev-6c0710084e6bf5337c9af8075e266069b79ac2c2.zip
tools: bpf: make install should build first
Make the 'install' target depend on the 'all' target to build the binaries first. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf/Makefile')
-rw-r--r--tools/bpf/Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/bpf/Makefile b/tools/bpf/Makefile
index c42ca24a072d..e8d9e4125bf3 100644
--- a/tools/bpf/Makefile
+++ b/tools/bpf/Makefile
@@ -50,7 +50,9 @@ $(OUTPUT)%.lex.c: $(srctree)/tools/bpf/%.l
$(OUTPUT)%.o: $(srctree)/tools/bpf/%.c
$(COMPILE.c) -o $@ $<
-all: $(OUTPUT)bpf_jit_disasm $(OUTPUT)bpf_dbg $(OUTPUT)bpf_asm bpftool
+PROGS = $(OUTPUT)bpf_jit_disasm $(OUTPUT)bpf_dbg $(OUTPUT)bpf_asm
+
+all: $(PROGS) bpftool
$(OUTPUT)bpf_jit_disasm: CFLAGS += -DPACKAGE='bpf_jit_disasm'
$(OUTPUT)bpf_jit_disasm: LDLIBS = -lopcodes -lbfd -ldl
@@ -67,7 +69,7 @@ clean: bpftool_clean
rm -rf $(OUTPUT)*.o $(OUTPUT)bpf_jit_disasm $(OUTPUT)bpf_dbg \
$(OUTPUT)bpf_asm $(OUTPUT)bpf_exp.yacc.* $(OUTPUT)bpf_exp.lex.*
-install: bpftool_install
+install: $(PROGS) bpftool_install
$(INSTALL) -m 0755 -d $(DESTDIR)$(prefix)/bin
$(INSTALL) $(OUTPUT)bpf_jit_disasm $(DESTDIR)$(prefix)/bin/bpf_jit_disasm
$(INSTALL) $(OUTPUT)bpf_dbg $(DESTDIR)$(prefix)/bin/bpf_dbg