Skip to content

Commit

Permalink
tools: bpf: make install should build first
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Benc authored and Daniel Borkmann committed Mar 9, 2018
1 parent fde68c5 commit 6c07100
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/bpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6c07100

Please sign in to comment.