summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libgphoto2_port/Makefile.am55
-rw-r--r--libgphoto2_port/NEWS18
-rw-r--r--libgphoto2_port/configure.ac20
-rw-r--r--libgphoto2_port/disk/Makefile-files21
-rw-r--r--libgphoto2_port/ptpip/Makefile-files15
-rw-r--r--libgphoto2_port/serial/Makefile-files24
-rw-r--r--libgphoto2_port/test/Makefile.am8
-rw-r--r--libgphoto2_port/usb/Makefile-files29
8 files changed, 119 insertions, 71 deletions
diff --git a/libgphoto2_port/Makefile.am b/libgphoto2_port/Makefile.am
index a4d5a87c1..ed7703ba3 100644
--- a/libgphoto2_port/Makefile.am
+++ b/libgphoto2_port/Makefile.am
@@ -1,24 +1,61 @@
-## Process this file with automake to produce Makefile.in
+########################################################################
+# Usage instructions
+########################################################################
+# If you only want to build a single iolib (say usb.la), run
+# gmake usb.la
+# or make usb.la
+#
+# If you only want to install a single camlib or two, run
+# make DRIVERS="usb.la ptpip.la" install-iolibLTLIBRARIES
+########################################################################
+
+
+CLEANFILES =
+EXTRA_DIST =
+EXTRA_LTLIBRARIES =
+udevscript_PROGRAMS =
+
+## These two definitions look obsolete:
## Specify some includes and versioning
+#AM_CPPFLAGS = -I@srcdir@ $(VERSION_FLAGS)
+#VERSION_FLAGS = -DLIBGPPORT_VERSION=\"@LIBGPPORT_VERSION@\" -DHAVE_TERMIOS_H
+
+## Executable files
+bin_SCRIPTS = gphoto2-port-config
+
+# The . stands for the current dir, i.e. the iolibs to build.
+SUBDIRS = po libgphoto2_port test . doc m4
+
-AM_CPPFLAGS = -I@srcdir@ $(VERSION_FLAGS)
+########################################################################
+# All iolibs are defined as EXTRA_LTLIBRARIES. This requires that
+# all iolibs have -rpath set explicitly in foobar_la_LDFLAGS.
+# You're probably best off by using the iolib_* variables defined
+# below.
+iolib_LTLIBRARIES = $(IOLIB_LTLIST)
-VERSION_FLAGS = -DLIBGPPORT_VERSION=\"@LIBGPPORT_VERSION@\" -DHAVE_TERMIOS_H
+########################################################################
+# Define the compile/link/etc. flags common to all iolibs in one place,
+# i.e. here.
iolib_dependencies = $(top_srcdir)/iolib.sym
iolib_ldflags = -module -no-undefined -avoid-version \
-export-dynamic \
- -export-symbols $(top_srcdir)/iolib.sym
+ -export-symbols $(top_srcdir)/iolib.sym \
+ -rpath '$(iolibdir)'
iolib_libadd = $(top_builddir)/libgphoto2_port/libgphoto2_port.la
-## Executable files
-bin_SCRIPTS = gphoto2-port-config
+include disk/Makefile-files
+include ptpip/Makefile-files
+include serial/Makefile-files
+include usb/Makefile-files
+
-# Note: @subdirs@ lists all the directories from AC_CONFIG_SUBDIRS()
-SUBDIRS = po libgphoto2_port test @IOLIB_SUBDIRS@ doc m4
+########################################################################
+# Miscellaneous stuff
-EXTRA_DIST = \
+EXTRA_DIST += \
AUTHORS \
ChangeLog \
COPYING.LIB \
diff --git a/libgphoto2_port/NEWS b/libgphoto2_port/NEWS
index fdc4f3908..a9ed6f0c7 100644
--- a/libgphoto2_port/NEWS
+++ b/libgphoto2_port/NEWS
@@ -1,3 +1,21 @@
+libgphoto2_port 0.7.3
+
+Build:
+ * Non-recursive iolib build: Makes "make -j2" useful, and dynamic
+ load checks without install possible.
+ Selective iolib rebuild is "make usb.la" now.
+ Selective iolib install is
+ "make DRIVERS='usb.la disk.la' install-camlibLTLIBRARIES".
+
+Library Loader:
+ * Return error if not a single iolib can be found and loaded.
+
+Tests:
+ * "make check" makes sure that loading iolibs from build tree works.
+ * "make installcheck" makes sure that loading installed iolibs works.
+
+------------------------------------------------------------------------
+
libgphoto2_port 0.7.2
Build:
diff --git a/libgphoto2_port/configure.ac b/libgphoto2_port/configure.ac
index 43e8fe676..0d17450fa 100644
--- a/libgphoto2_port/configure.ac
+++ b/libgphoto2_port/configure.ac
@@ -1,6 +1,6 @@
dnl Process this file with autoreconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([libgphoto2 port access library], [0.7.2], [gphoto-devel@lists.sourceforge.net], [libgphoto2_port])
+AC_INIT([libgphoto2 port access library], [0.7.3], [gphoto-devel@lists.sourceforge.net], [libgphoto2_port])
AC_CONFIG_SRCDIR([libgphoto2_port/gphoto2-port-version.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([auto-m4])
@@ -233,7 +233,7 @@ AC_ARG_ENABLE([serial],
fi
])
if $have_serial; then
- IOLIB_SUBDIRS="$IOLIB_SUBDIRS serial"
+ IOLIB_LIST="$IOLIB_LIST serial"
AC_DEFINE([HAVE_SERIAL],1,[Whether you have serial support enabled])
fi
GP_CONFIG_MSG([Serial ports])
@@ -339,7 +339,7 @@ dnl ---------------------------------------------------------------------------
GP_CONFIG_MSG([USB ports])
GP_CHECK_LIBRARY([LIBUSB],[libusb],[>= 0.1.5],
[usb.h],[usb_busses],[
- IOLIB_SUBDIRS="$IOLIB_SUBDIRS usb"
+ IOLIB_LIST="$IOLIB_LIST usb"
],[],
[disable-explicitly],
[http://libusb.sourceforge.net/]
@@ -356,16 +356,20 @@ if test "x$have_hal" = "xtrue"; then
AC_SUBST(HAL_LIBS)
AC_DEFINE(HAVE_HAL,1,[defined if HAL is available])
fi
-IOLIB_SUBDIRS="$IOLIB_SUBDIRS disk"
+IOLIB_LIST="$IOLIB_LIST disk"
dnl ptpip - works 'everywhere' with TCP/IP stack.
-IOLIB_SUBDIRS="$IOLIB_SUBDIRS ptpip"
+IOLIB_LIST="$IOLIB_LIST ptpip"
# ----------------------------------------------------------------------
# Define IOLIB stuff
# ----------------------------------------------------------------------
-AC_SUBST(IOLIB_SUBDIRS)
+AC_SUBST(IOLIB_LIST)
+for x in ${IOLIB_LIST}; do
+ IOLIB_LTLIST="${IOLIB_LTLIST} ${x}.la"
+done
+AC_SUBST(IOLIB_LTLIST)
AC_SUBST([iolibdir],["\$(libdir)/\$(PACKAGE_TARNAME)/\$(VERSION)"])
AM_CPPFLAGS="$AM_CPPFLAGS -DIOLIBS=\\\"${iolibdir}\\\""
@@ -446,10 +450,6 @@ po/Makefile.in
libgphoto2_port/Makefile
libgphoto2_port.pc
libgphoto2_port-uninstalled.pc
-serial/Makefile
-usb/Makefile
-disk/Makefile
-ptpip/Makefile
gphoto2-port-config
test/Makefile
doc/Makefile
diff --git a/libgphoto2_port/disk/Makefile-files b/libgphoto2_port/disk/Makefile-files
index d633146ee..85b7774e9 100644
--- a/libgphoto2_port/disk/Makefile-files
+++ b/libgphoto2_port/disk/Makefile-files
@@ -1,18 +1,15 @@
-EXTRA_DIST =
+# -*- Makefile -*-
-iolib_LTLIBRARIES = disk.la
+EXTRA_LTLIBRARIES += disk.la
-disk_la_LDFLAGS = -module -no-undefined -avoid-version \
- -export-dynamic \
- -export-symbols $(top_srcdir)/iolib.sym
+disk_la_LDFLAGS = $(iolib_ldflags)
disk_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(INTL_CFLAGS) \
- $(LIBUSB_CFLAGS) $(HAL_CFLAGS) \
+ $(LIBUSB_CFLAGS) \
+ $(HAL_CFLAGS) \
$(CPPFLAGS)
-disk_la_DEPENDENCIES = $(top_srcdir)/iolib.sym
-disk_la_LIBADD = \
- $(top_builddir)/libgphoto2_port/libgphoto2_port.la \
- $(INTLLIBS) \
- $(HAL_LIBS)
-disk_la_SOURCES = disk.c
+disk_la_DEPENDENCIES = $(iolib_dependencies)
+disk_la_LIBADD = $(iolib_libadd)
+disk_la_LIBADD += $(INTLLIBS) $(HAL_LIBS)
+disk_la_SOURCES = disk/disk.c
diff --git a/libgphoto2_port/ptpip/Makefile-files b/libgphoto2_port/ptpip/Makefile-files
index 175288779..82766e815 100644
--- a/libgphoto2_port/ptpip/Makefile-files
+++ b/libgphoto2_port/ptpip/Makefile-files
@@ -1,14 +1,13 @@
-EXTRA_DIST =
+# -*- Makefile -*-
-iolib_LTLIBRARIES = ptpip.la
+EXTRA_LTLIBRARIES += ptpip.la
-ptpip_la_LDFLAGS = -module -no-undefined -avoid-version \
- -export-dynamic \
- -export-symbols $(top_srcdir)/iolib.sym
+ptpip_la_LDFLAGS = $(iolib_ldflags)
ptpip_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(INTL_CFLAGS) \
$(CPPFLAGS)
-ptpip_la_DEPENDENCIES = $(top_srcdir)/iolib.sym
-ptpip_la_LIBADD = $(top_builddir)/libgphoto2_port/libgphoto2_port.la @MDNS_LIBS@
-ptpip_la_SOURCES = ptpip.c
+ptpip_la_DEPENDENCIES = $(iolib_dependencies)
+ptpip_la_LIBADD = $(iolib_libadd)
+ptpip_la_LIBADD += @MDNS_LIBS@
+ptpip_la_SOURCES = ptpip/ptpip.c
diff --git a/libgphoto2_port/serial/Makefile-files b/libgphoto2_port/serial/Makefile-files
index d082b5ebf..cdb9e5dfc 100644
--- a/libgphoto2_port/serial/Makefile-files
+++ b/libgphoto2_port/serial/Makefile-files
@@ -1,13 +1,13 @@
-## Compile the IO library into a libtool module shared library
-iolib_LTLIBRARIES = serial.la
+# -*- Makefile -*-
-serial_la_LDFLAGS = -module -no-undefined -avoid-version \
- -export-dynamic \
- -export-symbols $(top_srcdir)/iolib.sym
-serial_la_CPPFLAGS = $(AM_CPPFLAGS) $(INTL_CFLAGS) $(CPPFLAGS)
-serial_la_DEPENDENCIES = $(top_srcdir)/iolib.sym
-serial_la_LIBADD = \
- $(top_builddir)/libgphoto2_port/libgphoto2_port.la \
- $(SERIAL_LIBS) \
- $(INTLLIBS)
-serial_la_SOURCES = unix.c
+EXTRA_LTLIBRARIES += serial.la
+
+serial_la_LDFLAGS = $(iolib_ldflags)
+serial_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ $(INTL_CFLAGS) \
+ $(CPPFLAGS)
+serial_la_DEPENDENCIES = $(iolib_dependencies)
+serial_la_LIBADD = $(iolib_libadd)
+serial_la_LIBADD += $(SERIAL_LIBS) $(INTLLIBS)
+serial_la_SOURCES = serial/unix.c
diff --git a/libgphoto2_port/test/Makefile.am b/libgphoto2_port/test/Makefile.am
index ea62fc25b..229dd346e 100644
--- a/libgphoto2_port/test/Makefile.am
+++ b/libgphoto2_port/test/Makefile.am
@@ -5,12 +5,12 @@ noinst_PROGRAMS =
# When we build all our iolibs in one directory, we can run our checks
# with IOLIBS set to the camlib build directory.
-#TESTS_ENVIRONMENT = env \
-# CAMLIBS="$(top_builddir)"
+TESTS_ENVIRONMENT = env \
+ IOLIBS="$(top_builddir)"
# After installation, this will be IOLIBS = $(DESTDIR)$(iolibdir)
INSTALL_TESTS_ENVIRONMENT = env \
- CAMLIBS="$(DESTDIR)$(iolibdir)" \
+ IOLIBS="$(DESTDIR)$(iolibdir)" \
LD_LIBRARY_PATH="$(DESTDIR)$(libdir)$${LD_LIBRARY_PATH+:$${LD_LIBRARY_PATH}}"
noinst_PROGRAMS += test-gp-port
@@ -18,7 +18,7 @@ test_gp_port_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) $(CPPFLAGS)
test_gp_port_SOURCE = test-gp-port.c
test_gp_port_LDFLAGS = $(top_builddir)/libgphoto2_port/libgphoto2_port.la $(LIBLTDL) $(INTLLIBS)
-#TESTS += test-port-list
+TESTS += test-port-list
INSTALL_TESTS += test-port-list
check_PROGRAMS += test-port-list
test_port_list_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) $(CPPFLAGS)
diff --git a/libgphoto2_port/usb/Makefile-files b/libgphoto2_port/usb/Makefile-files
index 442e042ca..e0a965198 100644
--- a/libgphoto2_port/usb/Makefile-files
+++ b/libgphoto2_port/usb/Makefile-files
@@ -1,24 +1,21 @@
-EXTRA_DIST = usb-os2.c
+# -*- Makefile -*-
-iolib_LTLIBRARIES = usb.la
+EXTRA_DIST += usb/usb-os2.c
-udevscript_PROGRAMS = check-mtp-device
-check_mtp_device_SOURCE = check-mtp-device.c
+EXTRA_LTLIBRARIES += usb.la
+
+udevscript_PROGRAMS += check-mtp-device
+check_mtp_device_SOURCES = usb/check-mtp-device.c
check_mtp_device_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS) $(LIBUSB_CFLAGS)
check_mtp_device_LDADD = $(LIBUSB_LIBS)
-usb_la_LDFLAGS = -module -no-undefined -avoid-version \
- -export-dynamic \
- -export-symbols $(top_srcdir)/iolib.sym
+usb_la_LDFLAGS = $(iolib_ldflags)
usb_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
- $(CPPFLAGS) \
$(INTL_CFLAGS) \
- $(LIBUSB_CFLAGS)
-
-usb_la_DEPENDENCIES = $(top_srcdir)/iolib.sym
-usb_la_LIBADD = \
- $(top_builddir)/libgphoto2_port/libgphoto2_port.la \
- $(LIBUSB_LIBS) \
- $(INTLLIBS)
-usb_la_SOURCES = libusb.c
+ $(LIBUSB_CFLAGS) \
+ $(CPPFLAGS)
+usb_la_DEPENDENCIES = $(iolib_dependencies)
+usb_la_LIBADD = $(iolib_libadd)
+usb_la_LIBADD += $(LIBUSB_LIBS) $(INTLLIBS)
+usb_la_SOURCES = usb/libusb.c