Imported Upstream version 2.4.2
[platform/upstream/libtool.git] / doc / libtool.1
1 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.4.
2 .TH LIBTOOL "1" "October 2011" "libtool 2.4.2" "User Commands"
3 .SH NAME
4 libtool \- manual page for libtool 2.4.2
5 .SH SYNOPSIS
6 .B libtool
7 [\fIOPTION\fR]... [\fIMODE-ARG\fR]...
8 .br
9 .B libtool
10 [\fIOPTION\fR]... \fI--mode=compile COMPILE-COMMAND\fR... \fISOURCEFILE\fR
11 .br
12 .B libtool
13 [\fIOPTION\fR]... \fI--mode=link LINK-COMMAND\fR...
14 .br
15 .B libtool
16 [\fIOPTION\fR]... \fI--mode=execute COMMAND \fR[\fIARGS\fR]...
17 .br
18 .B libtool
19 [\fIOPTION\fR]... \fI--mode=install INSTALL-COMMAND\fR...
20 .br
21 .B libtool
22 [\fIOPTION\fR]... \fI--mode=finish \fR[\fILIBDIR\fR]...
23 .br
24 .B libtool
25 [\fIOPTION\fR]... \fI--mode=uninstall RM \fR[\fIRM-OPTION\fR]... \fIFILE\fR...
26 .br
27 .B libtool
28 [\fIOPTION\fR]... \fI--mode=clean RM \fR[\fIRM-OPTION\fR]... \fIFILE\fR...
29 .SH DESCRIPTION
30 Provide generalized library\-building support services.
31 .TP
32 \fB\-\-config\fR
33 show all configuration variables
34 .TP
35 \fB\-\-debug\fR
36 enable verbose shell tracing
37 .TP
38 \fB\-n\fR, \fB\-\-dry\-run\fR
39 display commands without modifying any files
40 .TP
41 \fB\-\-features\fR
42 display basic configuration information and exit
43 .TP
44 \fB\-\-mode\fR=\fIMODE\fR
45 use operation mode MODE
46 .TP
47 \fB\-\-preserve\-dup\-deps\fR
48 don't remove duplicate dependency libraries
49 .TP
50 \fB\-\-quiet\fR, \fB\-\-silent\fR
51 don't print informational messages
52 .TP
53 \fB\-\-no\-quiet\fR, \fB\-\-no\-silent\fR
54 print informational messages (default)
55 .TP
56 \fB\-\-no\-warn\fR
57 don't display warning messages
58 .TP
59 \fB\-\-tag\fR=\fITAG\fR
60 use configuration variables from tag TAG
61 .TP
62 \fB\-v\fR, \fB\-\-verbose\fR
63 print more informational messages than default
64 .TP
65 \fB\-\-no\-verbose\fR
66 don't print the extra informational messages
67 .TP
68 \fB\-\-version\fR
69 print version information
70 .TP
71 \fB\-h\fR, \fB\-\-help\fR, \fB\-\-help\-all\fR
72 print short, long, or detailed help message
73 .PP
74 MODE must be one of the following:
75 .TP
76 clean
77 remove files from the build directory
78 .TP
79 compile
80 compile a source file into a libtool object
81 .TP
82 execute
83 automatically set library path, then run a program
84 .TP
85 finish
86 complete the installation of libtool libraries
87 .TP
88 install
89 install libraries or executables
90 .TP
91 link
92 create a library or an executable
93 .TP
94 uninstall
95 remove libraries from an installed directory
96 .PP
97 MODE\-ARGS vary depending on the MODE.  When passed as first option,
98 `\-\-mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
99 .PP
100 GNU libtool home page: <http://www.gnu.org/software/libtool/>.
101 General help using GNU software: <http://www.gnu.org/gethelp/>.
102 .PP
103 Description of compile mode:
104 .PP
105 Compile a source file into a libtool library object.
106 .PP
107 This mode accepts the following additional options:
108 .TP
109 \fB\-o\fR OUTPUT\-FILE
110 set the output file name to OUTPUT\-FILE
111 .TP
112 \fB\-no\-suppress\fR
113 do not suppress compiler output for multiple passes
114 .TP
115 \fB\-prefer\-pic\fR
116 try to build PIC objects only
117 .TP
118 \fB\-prefer\-non\-pic\fR
119 try to build non\-PIC objects only
120 .TP
121 \fB\-shared\fR
122 do not build a `.o' file suitable for static linking
123 .TP
124 \fB\-static\fR
125 only build a `.o' file suitable for static linking
126 .TP
127 \fB\-Wc\fR,FLAG
128 pass FLAG directly to the compiler
129 .PP
130 COMPILE\-COMMAND is a command to be used in creating a `standard' object file
131 from the given SOURCEFILE.
132 .PP
133 The output file name is determined by removing the directory component from
134 SOURCEFILE, then substituting the C source code suffix `.c' with the
135 library object suffix, `.lo'.
136 .PP
137 Description of link mode:
138 .PP
139 Link object files or libraries together to form another library, or to
140 create an executable program.
141 .PP
142 LINK\-COMMAND is a command using the C compiler that you would use to create
143 a program from several object files.
144 .PP
145 The following components of LINK\-COMMAND are treated specially:
146 .TP
147 \fB\-all\-static\fR
148 do not do any dynamic linking at all
149 .TP
150 \fB\-avoid\-version\fR
151 do not add a version suffix if possible
152 .TP
153 \fB\-bindir\fR BINDIR
154 specify path to binaries directory (for systems where
155 libraries must be found in the PATH setting at runtime)
156 .TP
157 \fB\-dlopen\fR FILE
158 `\-dlpreopen' FILE if it cannot be dlopened at runtime
159 .TP
160 \fB\-dlpreopen\fR FILE
161 link in FILE and add its symbols to lt_preloaded_symbols
162 .TP
163 \fB\-export\-dynamic\fR
164 allow symbols from OUTPUT\-FILE to be resolved with dlsym(3)
165 .TP
166 \fB\-export\-symbols\fR SYMFILE
167 try to export only the symbols listed in SYMFILE
168 .TP
169 \fB\-export\-symbols\-regex\fR REGEX
170 try to export only the symbols matching REGEX
171 .TP
172 \fB\-LLIBDIR\fR
173 search LIBDIR for required installed libraries
174 .TP
175 \fB\-lNAME\fR
176 OUTPUT\-FILE requires the installed library libNAME
177 .TP
178 \fB\-module\fR
179 build a library that can dlopened
180 .TP
181 \fB\-no\-fast\-install\fR
182 disable the fast\-install mode
183 .TP
184 \fB\-no\-install\fR
185 link a not\-installable executable
186 .TP
187 \fB\-no\-undefined\fR
188 declare that a library does not refer to external symbols
189 .TP
190 \fB\-o\fR OUTPUT\-FILE
191 create OUTPUT\-FILE from the specified objects
192 .TP
193 \fB\-objectlist\fR FILE
194 Use a list of object files found in FILE to specify objects
195 .TP
196 \fB\-precious\-files\-regex\fR REGEX
197 don't remove output files matching REGEX
198 .TP
199 \fB\-release\fR RELEASE
200 specify package release information
201 .TP
202 \fB\-rpath\fR LIBDIR
203 the created library will eventually be installed in LIBDIR
204 .TP
205 \fB\-R[\fR ]LIBDIR
206 add LIBDIR to the runtime path of programs and libraries
207 .TP
208 \fB\-shared\fR
209 only do dynamic linking of libtool libraries
210 .TP
211 \fB\-shrext\fR SUFFIX
212 override the standard shared library file extension
213 .TP
214 \fB\-static\fR
215 do not do any dynamic linking of uninstalled libtool libraries
216 .TP
217 \fB\-static\-libtool\-libs\fR
218 do not do any dynamic linking of libtool libraries
219 .TP
220 \fB\-version\-info\fR CURRENT[:REVISION[:AGE]]
221 specify library version info [each variable defaults to 0]
222 .TP
223 \fB\-weak\fR LIBNAME
224 declare that the target provides the LIBNAME interface
225 .HP
226 \fB\-Wc\fR,FLAG
227 .TP
228 \fB\-Xcompiler\fR FLAG
229 pass linker\-specific FLAG directly to the compiler
230 .HP
231 \fB\-Wl\fR,FLAG
232 .TP
233 \fB\-Xlinker\fR FLAG
234 pass linker\-specific FLAG directly to the linker
235 .TP
236 \fB\-XCClinker\fR FLAG
237 pass link\-specific FLAG to the compiler driver (CC)
238 .PP
239 All other options (arguments beginning with `\-') are ignored.
240 .PP
241 Every other argument is treated as a filename.  Files ending in `.la' are
242 treated as uninstalled libtool libraries, other files are standard or library
243 object files.
244 .PP
245 If the OUTPUT\-FILE ends in `.la', then a libtool library is created,
246 only library objects (`.lo' files) may be specified, and `\-rpath' is
247 required, except when creating a convenience library.
248 .PP
249 If OUTPUT\-FILE ends in `.a' or `.lib', then a standard library is created
250 using `ar' and `ranlib', or on Windows using `lib'.
251 .PP
252 If OUTPUT\-FILE ends in `.lo' or `.o', then a reloadable object file
253 is created, otherwise an executable program is created.
254 .PP
255 Description of execute mode:
256 .PP
257 Automatically set library path, then run a program.
258 .PP
259 This mode accepts the following additional options:
260 .TP
261 \fB\-dlopen\fR FILE
262 add the directory containing FILE to the library path
263 .PP
264 This mode sets the library path environment variable according to `\-dlopen'
265 flags.
266 .PP
267 If any of the ARGS are libtool executable wrappers, then they are translated
268 into their corresponding uninstalled binary, and any of their required library
269 directories are added to the library path.
270 .PP
271 Then, COMMAND is executed, with ARGS as arguments.
272 .PP
273 Description of install mode:
274 .PP
275 Install executables or libraries.
276 .PP
277 INSTALL\-COMMAND is the installation command.  The first component should be
278 either the `install' or `cp' program.
279 .PP
280 The following components of INSTALL\-COMMAND are treated specially:
281 .TP
282 \fB\-inst\-prefix\-dir\fR PREFIX\-DIR
283 Use PREFIX\-DIR as a staging area for installation
284 .PP
285 The rest of the components are interpreted as arguments to that command (only
286 BSD\-compatible install options are recognized).
287 .PP
288 Description of finish mode:
289 .PP
290 Complete the installation of libtool libraries.
291 .PP
292 Each LIBDIR is a directory that contains libtool libraries.
293 .PP
294 The commands that this mode executes may require superuser privileges.  Use
295 the `\-\-dry\-run' option if you just want to see what would be executed.
296 .PP
297 Description of uninstall mode:
298 .PP
299 Remove libraries from an installation directory.
300 .PP
301 RM is the name of the program to use to delete files associated with each FILE
302 (typically `/bin/rm').  RM\-OPTIONS are options (such as `\-f') to be passed
303 to RM.
304 .PP
305 If FILE is a libtool library, all the files associated with it are deleted.
306 Otherwise, only FILE itself is deleted using RM.
307 .PP
308 Description of clean mode:
309 .PP
310 Remove files from the build directory.
311 .PP
312 RM is the name of the program to use to delete files associated with each FILE
313 (typically `/bin/rm').  RM\-OPTIONS are options (such as `\-f') to be passed
314 to RM.
315 .PP
316 If FILE is a libtool library, object or program, all the files associated
317 with it are deleted. Otherwise, only FILE itself is deleted using RM.
318 .PP
319 When reporting a bug, please describe a test case to reproduce it and
320 include the following information:
321 .TP
322 host\-triplet:
323 x86_64\-apple\-darwin11.2.0
324 .TP
325 shell:
326 /bin/sh
327 .TP
328 compiler:
329 gcc
330 .TP
331 compiler flags:
332 \fB\-g\fR \fB\-O2\fR
333 .TP
334 linker:
335 /usr/llvm\-gcc\-4.2/libexec/gcc/i686\-apple\-darwin11/4.2.1/ld (gnu? no)
336 .TP
337 libtool:
338 (GNU libtool) 2.4.2
339 .TP
340 automake:
341 automake (GNU automake) 1.11.1
342 .TP
343 autoconf:
344 autoconf (GNU Autoconf) 2.68
345 .SH AUTHOR
346 Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
347 .SH "REPORTING BUGS"
348 Report bugs to <bug\-libtool@gnu.org>.
349 .SH COPYRIGHT
350 Copyright \(co 2011 Free Software Foundation, Inc.
351 .br
352 This is free software; see the source for copying conditions.  There is NO
353 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
354 .SH "SEE ALSO"
355 The full documentation for
356 .B libtool
357 is maintained as a Texinfo manual.  If the
358 .B info
359 and
360 .B libtool
361 programs are properly installed at your site, the command
362 .IP
363 .B info libtool
364 .PP
365 should give you access to the complete manual.