version 1.124, 2000/11/02 03:03:39 |
version 1.125, 2000/12/06 17:12:32 |
Line 909 Here's how to use libtool in a pkg in si |
|
Line 909 Here's how to use libtool in a pkg in si |
|
Note that the library is changed to have a .la extension, and the |
Note that the library is changed to have a .la extension, and the |
objects are changed to have a .lo extension. Change OBJS as necessary. |
objects are changed to have a .lo extension. Change OBJS as necessary. |
This automatically creates all of the .a, .so.major.minor, and ELF |
This automatically creates all of the .a, .so.major.minor, and ELF |
symlinks (if necessary) in the build directory. |
symlinks (if necessary) in the build directory. Be sure to include |
|
the -version-info esp. when major and minor are zero, as libtool will |
|
strip off the shared library version else. |
|
|
|
4. When linking shared object (.so) files, i.e. files that are loaded via |
|
dlopen(3), NOT shared libraries, use "-module -avoid-version" to prevent |
|
them getting version tacked on. |
|
|
4. When linking programs that depend on these libraries _before_ they are |
5. When linking programs that depend on these libraries _before_ they are |
installed, preface the cc or ld line with "${LIBTOOL} --mode=link", and |
installed, preface the cc or ld line with "${LIBTOOL} --mode=link", and |
it will find the correct libraries (static or shared), but please be |
it will find the correct libraries (static or shared), but please be |
aware that libtool will not allow you to specify a relative path in -L |
aware that libtool will not allow you to specify a relative path in -L |
Line 931 Here's how to use libtool in a pkg in si |
|
Line 937 Here's how to use libtool in a pkg in si |
|
|
|
${CC} -o someprog -L../somelib/.libs -lsomelib |
${CC} -o someprog -L../somelib/.libs -lsomelib |
|
|
5. When installing libraries, preface the install or cp command with |
6. When installing libraries, preface the install or cp command with |
"${LIBTOOL} --mode=install", and change the library name to .la. For |
"${LIBTOOL} --mode=install", and change the library name to .la. For |
example: |
example: |
|
|
Line 940 Here's how to use libtool in a pkg in si |
|
Line 946 Here's how to use libtool in a pkg in si |
|
This will install the static .a, shared library, any needed symlinks, |
This will install the static .a, shared library, any needed symlinks, |
and run "ldconfig." |
and run "ldconfig." |
|
|
6. In your PLIST, include the .a, .la, and .so.major.minor files. Don't |
7. In your PLIST, include the .a, .la, and .so.major.minor files. Don't |
include the ELF symlink files (.so.major, .so); those are added |
include the ELF symlink files (.so.major, .so); those are added |
automatic. |
automatic. |
|
|