from libtool:
libtool --tag=CC --mode=compile --verbose cc -g -O0 -c foo.c
libtool: compile:  cc -g -O0 -c foo.c  -fPIC -DPIC -o .libs/foo.o
libtool: compile:  cc -g -O0 -c foo.c -o foo.o >/dev/null 2>&1
libtool --tag=CC --mode=compile --verbose cc -g -O0 -c hello.c
libtool: compile:  cc -g -O0 -c hello.c  -fPIC -DPIC -o .libs/hello.o
libtool: compile:  cc -g -O0 -c hello.c -o hello.o >/dev/null 2>&1
libtool --mode=link --verbose gcc -g -O0 -o libhello.la foo.lo hello.lo -rpath /usr/local/lib -lm
libtool: link: gcc -shared  .libs/foo.o .libs/hello.o   -lm    -Wl,-soname -Wl,libhello.so.0 -o .libs/libhello.so.0.0.0
libtool: link: (cd ".libs" && rm -f "libhello.so.0" && ln -s "libhello.so.0.0.0" "libhello.so.0")
libtool: link: (cd ".libs" && rm -f "libhello.so" && ln -s "libhello.so.0.0.0" "libhello.so")
libtool: link: ar cru .libs/libhello.a  foo.o hello.o
libtool: link: ranlib .libs/libhello.a
libtool: link: ( cd ".libs" && rm -f "libhello.la" && ln -s "../libhello.la" "libhello.la" )

[8:19:28] agc@netbsd-vm2 ...pkgsrc/local/bsdlibtool [10326] > l
total 46
drwxr-xr-x   4 agc  agc   512 Jul 15 08:19 .
drwxr-xr-x  20 agc  agc   512 Jul 15 06:56 ..
drwxr-xr-x   2 agc  agc   512 Jul 15 08:18 .libs
drwxr-xr-x   2 agc  agc   512 Jul 15 08:15 CVS
-rw-r--r--   1 agc  agc   371 Jul 15 08:18 Makefile
-rw-r--r--   1 agc  agc    57 Jul 15 08:15 foo.c
-rw-r--r--   1 agc  agc   264 Jul 15 08:18 foo.lo
-rw-r--r--   1 agc  agc  3656 Jul 15 08:18 foo.o
-rw-r--r--   1 agc  agc    85 Jul 15 08:15 hello.c
-rw-r--r--   1 agc  agc   270 Jul 15 08:18 hello.lo
-rw-r--r--   1 agc  agc  3824 Jul 15 08:18 hello.o
-rw-r--r--   1 agc  agc   930 Jul 15 08:18 libhello.la
-rw-r--r--   1 agc  agc  1390 Jul 15 08:15 libtool.ic
-rw-r--r--   1 agc  agc  9647 Jul 15 08:15 libtool.pl
-rwxr-xr-x   1 agc  agc  2989 Jul 15 08:17 libtool.sh
-rw-r--r--   1 agc  agc  1000 Jul 15 08:19 output
[8:19:39] agc@netbsd-vm2 ...pkgsrc/local/bsdlibtool [10327] > l .libs
total 30
drwxr-xr-x  2 agc  agc   512 Jul 15 08:18 .
drwxr-xr-x  4 agc  agc   512 Jul 15 08:19 ..
-rw-r--r--  1 agc  agc  3712 Jul 15 08:18 foo.o
-rw-r--r--  1 agc  agc  3872 Jul 15 08:18 hello.o
-rw-r--r--  1 agc  agc  7690 Jul 15 08:18 libhello.a
lrwxr-xr-x  1 agc  agc    14 Jul 15 08:18 libhello.la -> ../libhello.la
-rw-r--r--  1 agc  agc   931 Jul 15 08:18 libhello.lai
lrwxr-xr-x  1 agc  agc    17 Jul 15 08:18 libhello.so -> libhello.so.0.0.0
lrwxr-xr-x  1 agc  agc    17 Jul 15 08:18 libhello.so.0 -> libhello.so.0.0.0
-rwxr-xr-x  1 agc  agc  7681 Jul 15 08:18 libhello.so.0.0.0
[8:19:51] agc@netbsd-vm2 ...pkgsrc/local/bsdlibtool [10328] >

libhello.la
# libhello.la - a libtool library file
# Generated by ltmain.sh (GNU libtool) 2.2.6b
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# The name that we can dlopen(3).
dlname='libhello.so.0'

# Names of this library.
library_names='libhello.so.0.0.0 libhello.so.0 libhello.so'

# The name of the static archive.
old_library='libhello.a'

# Linker flags that can not go in dependency_libs.
inherited_linker_flags=''

# Libraries that this one depends upon.
dependency_libs=' -lm'

# Names of additional weak libraries provided by this library
weak_library_names=''

# Version information for libhello.
current=0
age=0
revision=0

# Is this an already installed library?
installed=no

# Should we warn about portability when linking against -modules?
shouldnotlink=no

# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/usr/local/lib'

hello.lo
# hello.lo - a libtool object file
# Generated by ltmain.sh (GNU libtool) 2.2.6b
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# Name of the PIC object.
pic_object='.libs/hello.o'

# Name of the non-PIC object
non_pic_object='hello.o'

=====================
libtool --mode=install --verbose install -c -m 0755 -o agc -g agc libhello.la /usr/pkgsrc/local/bsdlibtool/instdir/lib
libtool: install: install -c -m 0755 -o agc -g agc .libs/libhello.so.0.0.0 /usr/pkgsrc/local/bsdlibtool/instdir/lib/libhello.so.0.0.0
libtool: install: (cd /usr/pkgsrc/local/bsdlibtool/instdir/lib && { ln -s -f libhello.so.0.0.0 libhello.so.0 || { rm -f libhello.so.0 && ln -s libhello.so.0.0.0 libhello.so.0; }; })
libtool: install: (cd /usr/pkgsrc/local/bsdlibtool/instdir/lib && { ln -s -f libhello.so.0.0.0 libhello.so || { rm -f libhello.so && ln -s libhello.so.0.0.0 libhello.so; }; })
libtool: install: install -c -m 0755 -o agc -g agc .libs/libhello.lai /usr/pkgsrc/local/bsdlibtool/instdir/lib/libhello.la
libtool: install: install -c -m 0755 -o agc -g agc .libs/libhello.a /usr/pkgsrc/local/bsdlibtool/instdir/lib/libhello.a
libtool: install: chmod 644 /usr/pkgsrc/local/bsdlibtool/instdir/lib/libhello.a
libtool: install: ranlib /usr/pkgsrc/local/bsdlibtool/instdir/lib/libhello.a
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
====================
[13:27:06] agc@netbsd-vm2 ...pkgsrc/local/bsdlibtool [10624] > cat .libs/libhello.lai
# libhello.la - a libtool library file
# Generated by ltmain.sh (GNU libtool) 2.2.6b
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# The name that we can dlopen(3).
dlname='libhello.so.0'

# Names of this library.
library_names='libhello.so.0.0.0 libhello.so.0 libhello.so'

# The name of the static archive.
old_library='libhello.a'

# Linker flags that can not go in dependency_libs.
inherited_linker_flags=''

# Libraries that this one depends upon.
dependency_libs=' -lm'

# Names of additional weak libraries provided by this library
weak_library_names=''

# Version information for libhello.
current=0
age=0
revision=0

# Is this an already installed library?
installed=yes

# Should we warn about portability when linking against -modules?
shouldnotlink=no

# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/usr/local/lib'
[13:27:22] agc@netbsd-vm2 ...pkgsrc/local/bsdlibtool [10625] >

libtool --verbose --mode=link --tag=CC gcc gurep.o libutf.la -o gurep
libtool: link: gcc gurep.o -o .libs/gurep  ./.libs/libutf.so
