]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - tools/bpf/Makefile
HID: i2c-hid: Fix flooded incomplete report after S3 on Rayd touchscreen
[mirror_ubuntu-bionic-kernel.git] / tools / bpf / Makefile
CommitLineData
b2441318 1# SPDX-License-Identifier: GPL-2.0
e306e2c1
DB
2prefix = /usr
3
4CC = gcc
3f356385
DB
5LEX = flex
6YACC = bison
71bb428f 7MAKE = make
e306e2c1 8
d7475de5
KM
9CFLAGS += -Wall -O2
10CFLAGS += -D__EXPORTED_HEADERS__ -I../../include/uapi -I../../include
11
3f356385
DB
12%.yacc.c: %.y
13 $(YACC) -o $@ -d $<
14
15%.lex.c: %.l
16 $(LEX) -o $@ $<
17
71bb428f 18all: bpf_jit_disasm bpf_dbg bpf_asm bpftool
e306e2c1 19
d7475de5 20bpf_jit_disasm : CFLAGS += -DPACKAGE='bpf_jit_disasm'
e306e2c1
DB
21bpf_jit_disasm : LDLIBS = -lopcodes -lbfd -ldl
22bpf_jit_disasm : bpf_jit_disasm.o
23
fd981e3c
DB
24bpf_dbg : LDLIBS = -lreadline
25bpf_dbg : bpf_dbg.o
26
3f356385
DB
27bpf_asm : LDLIBS =
28bpf_asm : bpf_asm.o bpf_exp.yacc.o bpf_exp.lex.o
29bpf_exp.lex.o : bpf_exp.yacc.c
30
71bb428f 31clean: bpftool_clean
3f356385 32 rm -rf *.o bpf_jit_disasm bpf_dbg bpf_asm bpf_exp.yacc.* bpf_exp.lex.*
e306e2c1 33
71bb428f 34install: bpftool_install
e306e2c1 35 install bpf_jit_disasm $(prefix)/bin/bpf_jit_disasm
fd981e3c 36 install bpf_dbg $(prefix)/bin/bpf_dbg
3f356385 37 install bpf_asm $(prefix)/bin/bpf_asm
71bb428f
JK
38
39bpftool:
40 $(MAKE) -C bpftool
41
42bpftool_install:
43 $(MAKE) -C bpftool install
44
45bpftool_clean:
46 $(MAKE) -C bpftool clean
47
48.PHONY: bpftool FORCE