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 <[email protected]>
---
 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

_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox

Reply via email to