Skip to content

Commit 7068194

Browse files
bitcoffeeiuxanakryiko
authored andcommitted
libbpf: Improve usability of libbpf Makefile
Current libbpf Makefile does not contain the help command, which is inconvenient to use. Similar to the Makefile help command of the perf, a help command is provided to list the commands supported by libbpf make and the functions of the commands. Signed-off-by: Xin Liu <liuxin350@huawei.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20221202081738.128513-1-liuxin350@huawei.com
1 parent f16a7aa commit 7068194

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tools/lib/bpf/Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,3 +286,20 @@ tags:
286286

287287
# Delete partially updated (corrupted) files on error
288288
.DELETE_ON_ERROR:
289+
290+
help:
291+
@echo 'libbpf common targets:'
292+
@echo ' HINT: use "V=1" to enable verbose build'
293+
@echo ' all - build libraries and pkgconfig'
294+
@echo ' clean - remove all generated files'
295+
@echo ' check - check abi and version info'
296+
@echo ''
297+
@echo 'libbpf install targets:'
298+
@echo ' HINT: use "prefix"(defaults to "/usr/local") or "DESTDIR" (defaults to "/")'
299+
@echo ' to adjust target desitantion, e.g. "make prefix=/usr/local install"'
300+
@echo ' install - build and install all headers, libraries and pkgconfig'
301+
@echo ' install_headers - install only headers to include/bpf'
302+
@echo ''
303+
@echo 'libbpf make targets:'
304+
@echo ' tags - use ctags to make tag information for source code browsing'
305+
@echo ' cscope - use cscope to make interactive source code browsing database'

0 commit comments

Comments
 (0)