Building gphoto2 and libgphoto2

Building gphoto2

Just to see what compiler options and so forth get used, after once doing a clean build of gphoto2, I made an innocuous hack to one of the source files (shell.c) and then typed make in the gphoto2 "base" directory. (Somewhere along the way I realized that I could just "touch" a file to change its mod time, but what is done is done at this point.

The real point of all this, dear reader, is to preserve all this gory detail for future reference, you most certainly aren't expected to wade through every option and compiler switch.

gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../gphoto2 -DLOCALEDIR=\"/usr/local/share/locale\" -Wall -Wmissing-declarations -Wmissing-prototypes -g -D_GPHOTO2_INTERNAL_CODE  -I.. -I../gphoto2 -DLOCALEDIR=\"/usr/local/share/locale\" -Wall -Wmissing-declarations -Wmissing-prototypes -g -D_GPHOTO2_INTERNAL_CODE   -I/usr/local/include    -I/usr/include -g -O2 -MT gphoto2-shell.o -MD -MP -MF .deps/gphoto2-shell.Tpo -c -o gphoto2-shell.o `test -f 'shell.c' || echo './'`shell.c

mv -f .deps/gphoto2-shell.Tpo .deps/gphoto2-shell.Po

/bin/sh ../libtool --tag=CC   --mode=link gcc -I.. -I../gphoto2 -DLOCALEDIR=\"/usr/local/share/locale\" -Wall -Wmissing-declarations -Wmissing-prototypes -g -D_GPHOTO2_INTERNAL_CODE   -I/usr/local/include    -I/usr/include -g -O2 -Wall -g  -o gphoto2   gphoto2-actions.o gphoto2-foreach.o gphoto2-gp-params.o gphoto2-spawnve.o gphoto2-main.o gphoto2-version.o gphoto2-range.o gphoto2-shell.o   -ljpeg -lpthread -lexif -lm    -lreadline /usr/local/lib/libgphoto2.la -L/usr/lib64 -lpopt 

gcc -I.. -I../gphoto2 -DLOCALEDIR=\"/usr/local/share/locale\" -Wall -Wmissing-declarations -Wmissing-prototypes -g -D_GPHOTO2_INTERNAL_CODE -I/usr/local/include -I/usr/include -g -O2 -Wall -g -o gphoto2 gphoto2-actions.o gphoto2-foreach.o gphoto2-gp-params.o gphoto2-spawnve.o gphoto2-main.o gphoto2-version.o gphoto2-range.o gphoto2-shell.o  -ljpeg -lpthread -lreadline /usr/local/lib/libgphoto2.so /usr/local/lib/libgphoto2_port.so /usr/lib64/libltdl.so -ldl -lexif -lm -L/usr/lib64 -lpopt   -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/lib64 -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/lib64
Lots can be learned here. In particular, note the invocation of the libtool shell script, which is quite a monster. Also note that when things like shell.c get compiled, they yield gphoto2-shell.o in some kind of effort to avoid namespace collisions. Note the -ljpeg and -lexif lines that drag in libjpeg and libexif.

Building libgphoto2

make a change to a camlib

Similarly, for libgphoto2, I go to libgphoto2-2.4.4/camlibs/canon and make a tiny hack to one file (library.c), then return to the libgphoto2-2.4.4 directory and type make to get:
make[3]: Entering directory `/u1/archive/libgphoto2-2.4.4/camlibs'
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I.. -I../libgphoto2_port -I../libgphoto2 -I../libgphoto2  -Wall -g -D_GPHOTO2_INTERNAL_CODE -DLOCALEDIR=\"/usr/local/share/locale\" -DCAMLIBS=\"/usr/local/lib/libgphoto2/2.4.4\" -I.. -I.. -I../libgphoto2_port -I../libgphoto2 -I../libgphoto2  -Wall -g -D_GPHOTO2_INTERNAL_CODE  -I.. -I.. -I../libgphoto2_port -I../libgphoto2 -I../libgphoto2  -Wall -g -D_GPHOTO2_INTERNAL_CODE -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -MT canon/canon_la-library.lo -MD -MP -MF canon/.deps/canon_la-library.Tpo -c -o canon/canon_la-library.lo `test -f 'canon/library.c' || echo './'`canon/library.c

gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../libgphoto2_port -I../libgphoto2 -I../libgphoto2 -Wall -g -D_GPHOTO2_INTERNAL_CODE -DLOCALEDIR=\"/usr/local/share/locale\" -DCAMLIBS=\"/usr/local/lib/libgphoto2/2.4.4\" -I.. -I.. -I../libgphoto2_port -I../libgphoto2 -I../libgphoto2 -Wall -g -D_GPHOTO2_INTERNAL_CODE -I.. -I.. -I../libgphoto2_port -I../libgphoto2 -I../libgphoto2 -Wall -g -D_GPHOTO2_INTERNAL_CODE -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -MT canon/canon_la-library.lo -MD -MP -MF canon/.deps/canon_la-library.Tpo -c canon/library.c  -fPIC -DPIC -o canon/.libs/canon_la-library.o

mv -f canon/.deps/canon_la-library.Tpo canon/.deps/canon_la-library.Plo

/bin/sh ../libtool --tag=CC   --mode=link gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -module -no-undefined -avoid-version -export-dynamic -export-symbols '../camlibs/camlib.sym' -rpath '/usr/local/lib/libgphoto2/2.4.4'  -o canon.la  canon/canon_la-canon.lo canon/canon_la-library.lo canon/canon_la-serial.lo canon/canon_la-usb.lo canon/canon_la-crc.lo canon/canon_la-util.lo ../libgphoto2/libgphoto2.la -lexif -lm   

rm -fr  .libs/canon.la .libs/canon.lai .libs/canon.so .libs/canon.ver

echo "{ global:" > .libs/canon.ver
cat ../camlibs/camlib.sym | sed -e "s/\(.*\)/\1;/" >> .libs/canon.ver
echo "local: *; };" >> .libs/canon.ver

gcc -shared  canon/.libs/canon_la-canon.o canon/.libs/canon_la-library.o canon/.libs/canon_la-serial.o canon/.libs/canon_la-usb.o canon/.libs/canon_la-crc.o canon/.libs/canon_la-util.o  -Wl,--rpath -Wl,/u1/archive/libgphoto2-2.4.4/libgphoto2/.libs -Wl,--rpath -Wl,/usr/local/lib ../libgphoto2/.libs/libgphoto2.so -L/u1/archive/libgphoto2-2.4.4/libgphoto2_port/libgphoto2_port/.libs -L/usr/lib64 -lexif -lm  -Wl,-soname -Wl,canon.so -Wl,-version-script -Wl,.libs/canon.ver -o .libs/canon.so

creating canon.la
(cd .libs && rm -f canon.la && ln -s ../canon.la canon.la)

make a change to libgphoto2 itself

The above gives only part of the story for libgphoto2, now lets add a silly one line comment to libgphoto2/gphoto2-library.c and then rebuild by typing make. This doesn't cause anything to happen! Something special about this file!!

I try again by doing touch libgphoto2/exif.c and then typing make, now this gives plenty of action:

Making all in libgphoto2
make[2]: Entering directory `/u1/archive/libgphoto2-2.4.4/libgphoto2'

/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I.. -I../libgphoto2_port -I../libgphoto2 -I../libgphoto2  -Wall -g -D_GPHOTO2_INTERNAL_CODE -DLOCALEDIR=\"/usr/local/share/locale\" -DCAMLIBS=\"/usr/local/lib/libgphoto2/2.4.4\" -I.. -I.. -I../libgphoto2_port -I../libgphoto2 -I../libgphoto2  -Wall -g -D_GPHOTO2_INTERNAL_CODE   -I.. -I.. -I../libgphoto2_port -I../libgphoto2 -I../libgphoto2  -Wall -g -D_GPHOTO2_INTERNAL_CODE -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -MT libgphoto2_la-exif.lo -MD -MP -MF .deps/libgphoto2_la-exif.Tpo -c -o libgphoto2_la-exif.lo `test -f 'exif.c' || echo './'`exif.c

 gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I../libgphoto2_port -I../libgphoto2 -I../libgphoto2 -Wall -g -D_GPHOTO2_INTERNAL_CODE -DLOCALEDIR=\"/usr/local/share/locale\" -DCAMLIBS=\"/usr/local/lib/libgphoto2/2.4.4\" -I.. -I.. -I../libgphoto2_port -I../libgphoto2 -I../libgphoto2 -Wall -g -D_GPHOTO2_INTERNAL_CODE -I.. -I.. -I../libgphoto2_port -I../libgphoto2 -I../libgphoto2 -Wall -g -D_GPHOTO2_INTERNAL_CODE -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -MT libgphoto2_la-exif.lo -MD -MP -MF .deps/libgphoto2_la-exif.Tpo -c exif.c  -fPIC -DPIC -o .libs/libgphoto2_la-exif.o

mv -f .deps/libgphoto2_la-exif.Tpo .deps/libgphoto2_la-exif.Plo

/bin/sh ../libtool --tag=CC   --mode=link gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -no-undefined -export-symbols ./libgphoto2.sym -version-info 6:0:4  -o libgphoto2.la -rpath /usr/local/lib libgphoto2_la-gphoto2-abilities-list.lo libgphoto2_la-ahd_bayer.lo libgphoto2_la-bayer.lo libgphoto2_la-gphoto2-camera.lo libgphoto2_la-gphoto2-context.lo libgphoto2_la-exif.lo libgphoto2_la-gphoto2-file.lo libgphoto2_la-gphoto2-filesys.lo libgphoto2_la-gamma.lo libgphoto2_la-jpeg.lo libgphoto2_la-gphoto2-list.lo libgphoto2_la-gphoto2-result.lo libgphoto2_la-gphoto2-version.lo libgphoto2_la-gphoto2-setting.lo libgphoto2_la-gphoto2-widget.lo ../libgphoto2_port/libgphoto2_port/libgphoto2_port.la -lltdl -lexif -lm   -lm  

rm -fr  .libs/libgphoto2.la .libs/libgphoto2.lai .libs/libgphoto2.so .libs/libgphoto2.so.2 .libs/libgphoto2.so.2.4.0 .libs/libgphoto2.ver

echo "{ global:" > .libs/libgphoto2.ver
 cat ./libgphoto2.sym | sed -e "s/\(.*\)/\1;/" >> .libs/libgphoto2.ver
 echo "local: *; };" >> .libs/libgphoto2.ver
 gcc -shared  .libs/libgphoto2_la-gphoto2-abilities-list.o .libs/libgphoto2_la-ahd_bayer.o .libs/libgphoto2_la-bayer.o .libs/libgphoto2_la-gphoto2-camera.o .libs/libgphoto2_la-gphoto2-context.o .libs/libgphoto2_la-exif.o .libs/libgphoto2_la-gphoto2-file.o .libs/libgphoto2_la-gphoto2-filesys.o .libs/libgphoto2_la-gamma.o .libs/libgphoto2_la-jpeg.o .libs/libgphoto2_la-gphoto2-list.o .libs/libgphoto2_la-gphoto2-result.o .libs/libgphoto2_la-gphoto2-version.o .libs/libgphoto2_la-gphoto2-setting.o .libs/libgphoto2_la-gphoto2-widget.o  -Wl,--rpath -Wl,/u1/archive/libgphoto2-2.4.4/libgphoto2_port/libgphoto2_port/.libs -Wl,--rpath -Wl,/usr/lib64 -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/lib64 ../libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so -L/usr/lib64 /usr/lib64/libltdl.so -lexif -lm  -Wl,-soname -Wl,libgphoto2.so.2 -Wl,-version-script -Wl,.libs/libgphoto2.ver -o .libs/libgphoto2.so.2.4.0

(cd .libs && rm -f libgphoto2.so.2 && ln -s libgphoto2.so.2.4.0 libgphoto2.so.2)
(cd .libs && rm -f libgphoto2.so && ln -s libgphoto2.so.2.4.0 libgphoto2.so)
creating libgphoto2.la
(cd .libs && rm -f libgphoto2.la && ln -s ../libgphoto2.la libgphoto2.la)

clicksmart310

I am breaking this make output up into sections, it is so voluminous, the above is the really interesting part, but for completeness, there is indeed a lot more:

The rebuild triggers some weird dependency on clicksmart310, whatever the heck that is:

make[3]: Entering directory `/u1/archive/libgphoto2-2.4.4/camlibs'
/bin/sh ../libtool --tag=CC   --mode=link gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -module -no-undefined -avoid-version -export-dynamic -export-symbols '../camlibs/camlib.sym' -rpath '/usr/local/lib/libgphoto2/2.4.4'  -o clicksmart310.la  clicksmart310/library.lo clicksmart310/clicksmart.lo ../libgphoto2/libgphoto2.la 

rm -fr  .libs/clicksmart310.la .libs/clicksmart310.lai .libs/clicksmart310.so .libs/clicksmart310.ver
echo "{ global:" > .libs/clicksmart310.ver
 cat ../camlibs/camlib.sym | sed -e "s/\(.*\)/\1;/" >> .libs/clicksmart310.ver
 echo "local: *; };" >> .libs/clicksmart310.ver
 gcc -shared  clicksmart310/.libs/library.o clicksmart310/.libs/clicksmart.o  -Wl,--rpath -Wl,/u1/archive/libgphoto2-2.4.4/libgphoto2/.libs -Wl,--rpath -Wl,/usr/local/lib ../libgphoto2/.libs/libgphoto2.so -L/u1/archive/libgphoto2-2.4.4/libgphoto2_port/libgphoto2_port/.libs -L/usr/lib64  -Wl,-soname -Wl,clicksmart310.so -Wl,-version-script -Wl,.libs/clicksmart310.ver -o .libs/clicksmart310.so

creating clicksmart310.la
(cd .libs && rm -f clicksmart310.la && ln -s ../clicksmart310.la clicksmart310.la)
make[3]: Leaving directory `/u1/archive/libgphoto2-2.4.4/camlibs'

tests and examples

And things in the tests and examples directories get rebuilt:
make[3]: Entering directory `/u1/archive/libgphoto2-2.4.4/tests'

/bin/sh ../libtool --tag=CC   --mode=link gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -Wall -g  -o test-gphoto2 test-gphoto2.o ../libgphoto2/libgphoto2.la ../libgphoto2_port/libgphoto2_port/libgphoto2_port.la -lexif -lm    

gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -Wall -g -o .libs/test-gphoto2 test-gphoto2.o  ../libgphoto2/.libs/libgphoto2.so /u1/archive/libgphoto2-2.4.4/libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so ../libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so /usr/lib64/libltdl.so -ldl -lexif -lm  -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/lib64

creating test-gphoto2

/bin/sh ../libtool --tag=CC   --mode=link gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -Wall -g  -o test-filesys test-filesys.o ../libgphoto2/libgphoto2.la ../libgphoto2_port/libgphoto2_port/libgphoto2_port.la -lexif -lm    

gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -Wall -g -o .libs/test-filesys test-filesys.o  ../libgphoto2/.libs/libgphoto2.so /u1/archive/libgphoto2-2.4.4/libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so ../libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so /usr/lib64/libltdl.so -ldl -lexif -lm  -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/lib64

creating test-filesys
make[3]: Leaving directory `/u1/archive/libgphoto2-2.4.4/tests'
make[2]: Entering directory `/u1/archive/libgphoto2-2.4.4/examples'

/bin/sh ../libtool --tag=CC   --mode=link gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -Wall -g  -o sample-autodetect sample-autodetect.o context.o config.o ../libgphoto2/libgphoto2.la ../libgphoto2_port/libgphoto2_port/libgphoto2_port.la -lltdl -lexif -lm    

gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -Wall -g -o .libs/sample-autodetect sample-autodetect.o context.o config.o  ../libgphoto2/.libs/libgphoto2.so /u1/archive/libgphoto2-2.4.4/libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so ../libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so /usr/lib64/libltdl.so -ldl -lexif -lm  -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/lib64

creating sample-autodetect

/bin/sh ../libtool --tag=CC   --mode=link gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -Wall -g  -o sample-multi-detect sample-multi-detect.o autodetect.o context.o config.o ../libgphoto2/libgphoto2.la ../libgphoto2_port/libgphoto2_port/libgphoto2_port.la -lltdl -lexif -lm    

gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -Wall -g -o .libs/sample-multi-detect sample-multi-detect.o autodetect.o context.o config.o  ../libgphoto2/.libs/libgphoto2.so /u1/archive/libgphoto2-2.4.4/libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so ../libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so /usr/lib64/libltdl.so -ldl -lexif -lm  -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/lib64

creating sample-multi-detect

/bin/sh ../libtool --tag=CC   --mode=link gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -Wall -g  -o lunkwill-canon-capture lunkwill-canon-capture.o context.o config.o ../libgphoto2/libgphoto2.la ../libgphoto2_port/libgphoto2_port/libgphoto2_port.la -lltdl -lexif -lm    

gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -Wall -g -o .libs/lunkwill-canon-capture lunkwill-canon-capture.o context.o config.o  ../libgphoto2/.libs/libgphoto2.so /u1/archive/libgphoto2-2.4.4/libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so ../libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so /usr/lib64/libltdl.so -ldl -lexif -lm  -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/lib64

creating lunkwill-canon-capture

/bin/sh ../libtool --tag=CC   --mode=link gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -Wall -g  -o sample-owner sample-owner.o context.o config.o ../libgphoto2/libgphoto2.la ../libgphoto2_port/libgphoto2_port/libgphoto2_port.la -lltdl -lexif -lm    

gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -Wall -g -o .libs/sample-owner sample-owner.o context.o config.o  ../libgphoto2/.libs/libgphoto2.so /u1/archive/libgphoto2-2.4.4/libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so ../libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so /usr/lib64/libltdl.so -ldl -lexif -lm  -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/lib64

creating sample-owner

make[2]: Leaving directory `/u1/archive/libgphoto2-2.4.4/examples'

print-camera-list

Lastly, the print-camera-list application is built.
Making all in generic

make[3]: Entering directory `/u1/archive/libgphoto2-2.4.4/packaging/generic'

/bin/sh ../../libtool --tag=CC   --mode=link gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -Wall -g  -o print-camera-list print-camera-list.o ../../libgphoto2/libgphoto2.la ../../libgphoto2_port/libgphoto2_port/libgphoto2_port.la -lltdl -lexif -lm   

gcc -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -g -O2 -Wall -Wmissing-declarations -Wmissing-prototypes -Wall -g -o .libs/print-camera-list print-camera-list.o  ../../libgphoto2/.libs/libgphoto2.so /u1/archive/libgphoto2-2.4.4/libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so ../../libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so /usr/lib64/libltdl.so -ldl -lexif -lm  -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/lib64

creating print-camera-list

make[3]: Leaving directory `/u1/archive/libgphoto2-2.4.4/packaging/generic'

Building libgphoto2_port

We nearly forgot about this (but got suspicious looking for references to -lusb in the above. We touch the file libgphoto2_port/usb/libusb.c and then type make in the libgphoto2 base directory:
Making all in usb
make[4]: Entering directory `/u1/archive/libgphoto2-2.4.4/libgphoto2_port/usb'

/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -DIOLIBS=\"/usr/local/lib/libgphoto2_port/0.8.0\"  -Wall -Wmissing-declarations -Wmissing-prototypes -g -D_GPHOTO2_INTERNAL_CODE     -g -O2 -g -O2 -MT usb_la-libusb.lo -MD -MP -MF .deps/usb_la-libusb.Tpo -c -o usb_la-libusb.lo `test -f 'libusb.c' || echo './'`libusb.c

gcc -DHAVE_CONFIG_H -I. -I.. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -DIOLIBS=\"/usr/local/lib/libgphoto2_port/0.8.0\" -Wall -Wmissing-declarations -Wmissing-prototypes -g -D_GPHOTO2_INTERNAL_CODE -g -O2 -g -O2 -MT usb_la-libusb.lo -MD -MP -MF .deps/usb_la-libusb.Tpo -c libusb.c  -fPIC -DPIC -o .libs/usb_la-libusb.o

mv -f .deps/usb_la-libusb.Tpo .deps/usb_la-libusb.Plo

/bin/sh ../libtool --tag=CC   --mode=link gcc -g -O2 -g -O2 -module -no-undefined -avoid-version -export-dynamic -export-symbols ../iolib.sym  -o usb.la -rpath /usr/local/lib/libgphoto2_port/0.8.0 usb_la-libusb.lo ../libgphoto2_port/libgphoto2_port.la -lusb    

rm -fr  .libs/usb.la .libs/usb.lai .libs/usb.so .libs/usb.soT .libs/usb.ver
echo "{ global:" > .libs/usb.ver
  cat ../iolib.sym | sed -e "s/\(.*\)/\1;/" >> .libs/usb.ver
  echo "local: *; };" >> .libs/usb.ver

gcc -shared  .libs/usb_la-libusb.o  -Wl,--rpath -Wl,/u1/archive/libgphoto2-2.4.4/libgphoto2_port/libgphoto2_port/.libs -Wl,--rpath -Wl,/usr/local/lib ../libgphoto2_port/.libs/libgphoto2_port.so -L/usr/lib64 -lusb  -Wl,-soname -Wl,usb.so -Wl,-version-script -Wl,.libs/usb.ver -o .libs/usb.so

creating usb.la
(cd .libs && rm -f usb.la && ln -s ../usb.la usb.la)
make[4]: Leaving directory `/u1/archive/libgphoto2-2.4.4/libgphoto2_port/usb'


Feedback? Questions? Drop me a line!

Tom's Digital Photography Info / tom@mmto.org