lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221129074235.116969-1-liuxin350@huawei.com>
Date:   Tue, 29 Nov 2022 15:42:35 +0800
From:   Xin Liu <liuxin350@...wei.com>
To:     <andrii@...nel.org>, <ast@...nel.org>, <daniel@...earbox.net>,
        <martin.lau@...ux.dev>, <song@...nel.org>, <yhs@...com>,
        <john.fastabend@...il.com>, <kpsingh@...nel.org>, <sdf@...gle.com>,
        <haoluo@...gle.com>, <jolsa@...nel.org>
CC:     <bpf@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <yanan@...wei.com>, <wuchangye@...wei.com>,
        <xiesongyang@...wei.com>, <kongweibin2@...wei.com>,
        <liuxin350@...wei.com>, <zhangmingyi5@...wei.com>
Subject: [PATCH] Improved usability of the Makefile in libbpf

Current libbpf Makefile does not contain the help command, which
is inconvenient to use. 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@...wei.com>
---
 tools/lib/bpf/Makefile | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index 4c904ef0b47e..c86e05df4711 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -286,3 +286,37 @@ tags:
 
 # Delete partially updated (corrupted) files on error
 .DELETE_ON_ERROR:
+
+help:
+	@echo 'Default targets:'
+	@echo '  all               - Run all_cmd'
+	@echo '  all_cmd           - Build library and pkgconfig, check abi and version info'
+	@echo ''
+	@echo 'Cleaning targets:'
+	@echo '  clean             - Remove all generated files'
+	@echo ''
+	@echo 'Build targets:'
+	@echo '  libbpf.so         - Build the dynamic library'
+	@echo '  libbpf.a          - Build the static library'
+	@echo '  libbpf.pc         - Build the pkgconfig file'
+	@echo ''
+	@echo 'Install targets:'
+	@echo '  install           - Install all headers, library and pkgconfig file to'
+	@echo '                      DESTDIR(default: /) with prefix(default: /usr/local)'
+	@echo '  install_lib       - Install only library'
+	@echo '  install_headers   - Install only headers'
+	@echo '  install_pkgconfig - Install only pkgconfig file'
+	@echo ''
+	@echo 'Other generic targets:'
+	@echo '  cscope            - Generate cscope index'
+	@echo '  tags              - Generate tags file for editors'
+	@echo '  check             - Check abi and version info'
+	@echo '  check_abi         - Check versioned symbols'
+	@echo '  check_version     - Check whether the libbpf version defined in libbpf_version.h'
+	@echo '                      is the same as that defined in libbpf.map'
+	@echo ''
+	@echo '  make V=0|1             [targets] 0 => quiet build (default), 1 => verbose build'
+	@echo '  make DESTDIR=/root     [install targets] use DESTDIR for installing'
+	@echo '                                           into a different root directory'
+	@echo '  make prefix=/path      [install targets] use prefix for installing'
+	@echo '                                           into a user defined prefix path'
-- 
2.33.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ