From 613f30030f15386c357bd97791c00960dc9e0960 Mon Sep 17 00:00:00 2001 From: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Date: Sun, 12 Nov 2023 21:41:39 +0100 Subject: [PATCH] libtool: add page (#11454) * libtool: add page * Update libtool.md Co-authored-by: K.B.Dharun Krishna * Update libtool.md Co-authored-by: K.B.Dharun Krishna * Update libtool.md Co-authored-by: K.B.Dharun Krishna * Update libtool.md --------- Co-authored-by: K.B.Dharun Krishna --- pages/linux/libtool.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pages/linux/libtool.md diff --git a/pages/linux/libtool.md b/pages/linux/libtool.md new file mode 100644 index 000000000..c60a2ee04 --- /dev/null +++ b/pages/linux/libtool.md @@ -0,0 +1,32 @@ +# libtool + +> Libtool is a generic library support script that hides the complexity of using shared libraries behind a consistent, portable interface. +> More information: . + +- Compile a source file into a `libtool` object: + +`libtool --mode=compile gcc -c {{path/to/source.c}} -o {{path/to/source.lo}}` + +- Create a library or an executable: + +`libtool --mode=link gcc -o {{path/to/library.lo}} {{path/to/source.lo}}` + +- Automatically set the library path so that another program can use uninstalled `libtool` generated programs or libraries: + +`libtool --mode=execute gdb {{path/to/program}}` + +- Install a shared library: + +`libtool --mode=install cp {{path/to/library.la}} {{path/to/installation_directory}}` + +- Complete the installation of `libtool` libraries on the system: + +`libtool --mode=finish {{path/to/installation_dir}}` + +- Delete installed libraries or executables: + +`libtool --mode=uninstall {{path/to/installed_library.la}}` + +- Delete uninstalled libraries or executables: + +`libtool --mode=clean rm {{path/to/source.lo}} {{path/to/library.la}}`