[RESEND PATCH v1] Makefile: add new target to generate a libbusybox.a object archive
Nadav Tasher
tashernadav at gmail.com
Thu Apr 17 18:46:52 UTC 2025
A new target "libbusybox.a" is added to the Makefile.
This target can be used to compile busybox as a static library and
then link it to other programs.
This can be used to integrate busybox logic into other programs.
Signed-off-by: Nadav Tasher <tashernadav at gmail.com>
---
Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Makefile b/Makefile
index 9550c391a..05a0f0c6c 100644
--- a/Makefile
+++ b/Makefile
@@ -714,6 +714,10 @@ debug_kallsyms: .tmp_map$(last_kallsyms)
endif # ifdef CONFIG_KALLSYMS
+# busybox object archive - includes all compiled objects
+libbusybox.a: $(busybox-all) FORCE
+ $(AR) rcs $@ $(foreach busybox-dir,$(busybox-alldirs),$(busybox-dir)/*.o)
+
# busybox image - including updated kernel symbols
busybox_unstripped: $(busybox-all) FORCE
$(call if_changed_rule,busybox__)
--
2.34.1
More information about the busybox
mailing list