diff --git a/camlibs/Makefile.am b/camlibs/Makefile.am index 01a289cfa0..dcb27f2e08 100644 --- a/camlibs/Makefile.am +++ b/camlibs/Makefile.am @@ -73,8 +73,8 @@ camlib_ldflags += -export-symbols '$(top_srcdir)/camlibs/camlib.sym' camlib_ldflags += -rpath '$(camlibdir)' camlib_libadd = -camlib_libadd += $(top_builddir)/libgphoto2/libgphoto2.la -camlib_libadd += $(top_builddir)/libgphoto2_port/libgphoto2_port/libgphoto2_port.la +camlib_libadd += $(libgphoto2_la) +camlib_libadd += $(libgphoto2_port_la) camlib_cflags = diff --git a/configure.ac b/configure.ac index 55ddce2b98..121e4e17d2 100644 --- a/configure.ac +++ b/configure.ac @@ -680,6 +680,16 @@ CPPFLAGS="$CPPFLAGS_save" ], [], [default-on], [https://github.com/libexif/libexif])dnl +dnl --------------------------------------------------------------------------- +dnl Make it easier to possibly move the libraries around +dnl --------------------------------------------------------------------------- + +AC_SUBST([libgphoto2_port_la], + ['${top_builddir}/libgphoto2_port/libgphoto2_port/libgphoto2_port.la']) +AC_SUBST([libgphoto2_la], + ['${top_builddir}/libgphoto2/libgphoto2.la']) + + dnl --------------------------------------------------------------------------- dnl Configure subprojects dnl --------------------------------------------------------------------------- diff --git a/examples/Makefile.am b/examples/Makefile.am index 43a4f49cf8..0b0a0bcb13 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -35,8 +35,9 @@ best_iso_SOURCES = best-iso.c sample_justfocus_SOURCES = samples.h sample-justfocus.c context.c focus.c # sample_libfuzz_SOURCES = samples.h sample-libfuzz.c context.c autodetect.c -LDADD = $(top_builddir)/libgphoto2/libgphoto2.la \ - $(top_builddir)/libgphoto2_port/libgphoto2_port/libgphoto2_port.la \ +LDADD = \ + $(libgphoto2_la) \ + $(libgphoto2_port_la) \ $(LIBLTDL) \ $(LIBEXIF_LIBS) \ $(INTLLIBS) diff --git a/libgphoto2/Makefile.am b/libgphoto2/Makefile.am index a3328d56d8..2836e05274 100644 --- a/libgphoto2/Makefile.am +++ b/libgphoto2/Makefile.am @@ -53,7 +53,7 @@ libgphoto2_la_LDFLAGS += -export-symbols $(srcdir)/libgphoto2.sym libgphoto2_la_LDFLAGS += -version-info @LIBGPHOTO2_VERSION_INFO@ -libgphoto2_la_LIBADD += $(top_builddir)/libgphoto2_port/libgphoto2_port/libgphoto2_port.la +libgphoto2_la_LIBADD += $(libgphoto2_port_la) # The libtool docs describe these params, but they don't build. # "-dlopen" self \ diff --git a/libgphoto2_port/Makefile.am b/libgphoto2_port/Makefile.am index 8f783057fb..ecc531e728 100644 --- a/libgphoto2_port/Makefile.am +++ b/libgphoto2_port/Makefile.am @@ -52,12 +52,12 @@ iolib_LTLIBRARIES = $(IOLIB_LTLIST) ######################################################################## # Define the compile/link/etc. flags common to all iolibs in one place, # i.e. here. -iolib_dependencies = $(top_srcdir)/iolib.sym +iolib_dependencies = $(top_srcdir)/iolib.sym $(libgphoto2_port_la) iolib_ldflags = -module -no-undefined -avoid-version \ -export-dynamic \ -export-symbols $(top_srcdir)/iolib.sym \ -rpath '$(iolibdir)' -iolib_libadd = $(top_builddir)/libgphoto2_port/libgphoto2_port.la +iolib_libadd = $(libgphoto2_port_la) AM_CPPFLAGS += -I$(top_srcdir) diff --git a/libgphoto2_port/configure.ac b/libgphoto2_port/configure.ac index ddb160d387..9867432bc7 100644 --- a/libgphoto2_port/configure.ac +++ b/libgphoto2_port/configure.ac @@ -615,6 +615,14 @@ AC_SUBST([AM_CXXFLAGS]) AC_SUBST([AM_LDFLAGS]) +dnl --------------------------------------------------------------------------- +dnl Make it easier to possibly move the libraries around +dnl --------------------------------------------------------------------------- + +AC_SUBST([libgphoto2_port_la], + ['${top_builddir}/libgphoto2_port/libgphoto2_port.la']) + + # --------------------------------------------------------------------------- # Create output files # --------------------------------------------------------------------------- diff --git a/libgphoto2_port/tests/Makefile.am b/libgphoto2_port/tests/Makefile.am index 7b89036453..a682e24b0a 100644 --- a/libgphoto2_port/tests/Makefile.am +++ b/libgphoto2_port/tests/Makefile.am @@ -18,7 +18,7 @@ AM_CPPFLAGS += -I$(top_srcdir) noinst_PROGRAMS += test-gp-port test_gp_port_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) $(CPPFLAGS) test_gp_port_SOURCES = test-gp-port.c -test_gp_port_LDADD = $(top_builddir)/libgphoto2_port/libgphoto2_port.la +test_gp_port_LDADD = $(libgphoto2_port_la) test_gp_port_LDADD += $(LIBLTDL) $(INTLLIBS) TESTS += test-port-list @@ -27,7 +27,7 @@ check_PROGRAMS += test-port-list noinst_PROGRAMS += test-port-list test_port_list_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) $(CPPFLAGS) test_port_list_SOURCES = test-port-list.c -test_port_list_LDADD = $(top_builddir)/libgphoto2_port/libgphoto2_port.la +test_port_list_LDADD = $(libgphoto2_port_la) test_port_list_LDADD += $(LIBLTDL) $(INTLLIBS) include $(top_srcdir)/installcheck.mk diff --git a/packaging/generic/Makefile.am b/packaging/generic/Makefile.am index 0b547a23be..2e9482d98c 100644 --- a/packaging/generic/Makefile.am +++ b/packaging/generic/Makefile.am @@ -8,7 +8,7 @@ AM_CPPFLAGS += -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/libgphoto2_por print_camera_list_SOURCES = print-camera-list.c print_camera_list_LDADD = \ - $(top_builddir)/libgphoto2/libgphoto2.la \ - $(top_builddir)/libgphoto2_port/libgphoto2_port/libgphoto2_port.la \ + $(libgphoto2_la) \ + $(libgphoto2_port_la) \ $(LIBLTDL) \ $(LIBEXIF_LIBS) diff --git a/tests/Makefile.am b/tests/Makefile.am index d87bc3d61e..5e5a51c291 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -46,8 +46,8 @@ TESTS += test-endian check_PROGRAMS += test-endian test_endian_SOURCES = test-endian.c test_endian_LDADD = \ - $(top_builddir)/libgphoto2/libgphoto2.la \ - $(top_builddir)/libgphoto2_port/libgphoto2_port/libgphoto2_port.la \ + $(libgphoto2_la) \ + $(libgphoto2_port_la) \ $(LIBLTDL) \ $(LIBEXIF_LIBS) \ $(INTLLIBS) @@ -57,8 +57,8 @@ test_endian_LDADD = \ noinst_PROGRAMS += print-libgphoto2-version print_libgphoto2_version_SOURCES = print-libgphoto2-version.c print_libgphoto2_version_LDADD = -print_libgphoto2_version_LDADD += $(top_builddir)/libgphoto2/libgphoto2.la -print_libgphoto2_version_LDADD += $(top_builddir)/libgphoto2_port/libgphoto2_port/libgphoto2_port.la +print_libgphoto2_version_LDADD += $(libgphoto2_la) +print_libgphoto2_version_LDADD += $(libgphoto2_port_la) print_libgphoto2_version_LDADD += $(LIBLTDL) print_libgphoto2_version_LDADD += $(LIBEXIF_LIBS) print_libgphoto2_version_LDADD += $(INTLLIBS) @@ -68,8 +68,8 @@ print_libgphoto2_version_LDADD += $(INTLLIBS) noinst_PROGRAMS += test-gphoto2 test_gphoto2_SOURCES = test-gphoto2.c test_gphoto2_LDADD = \ - $(top_builddir)/libgphoto2/libgphoto2.la \ - $(top_builddir)/libgphoto2_port/libgphoto2_port/libgphoto2_port.la \ + $(libgphoto2_la) \ + $(libgphoto2_port_la) \ $(LIBLTDL) \ $(LIBEXIF_LIBS) \ $(INTLLIBS) @@ -79,8 +79,8 @@ test_gphoto2_LDADD = \ noinst_PROGRAMS += test-filesys test_filesys_SOURCES = test-filesys.c test_filesys_LDADD = \ - $(top_builddir)/libgphoto2/libgphoto2.la \ - $(top_builddir)/libgphoto2_port/libgphoto2_port/libgphoto2_port.la \ + $(libgphoto2_la) \ + $(libgphoto2_port_la) \ $(LIBLTDL) \ $(LIBEXIF_LIBS) \ $(INTLLIBS) @@ -92,8 +92,8 @@ INSTALL_TESTS += test-camera-list check_PROGRAMS += test-camera-list test_camera_list_SOURCES = test-camera-list.c test_camera_list_LDADD = \ - $(top_builddir)/libgphoto2/libgphoto2.la \ - $(top_builddir)/libgphoto2_port/libgphoto2_port/libgphoto2_port.la \ + $(libgphoto2_la) \ + $(libgphoto2_port_la) \ $(LIBLTDL) \ $(LIBEXIF_LIBS) \ $(INTLLIBS) @@ -102,8 +102,8 @@ test_camera_list_LDADD = \ TESTS += test-init-localedir check_PROGRAMS += test-init-localedir test_init_localedir_LDADD = -test_init_localedir_LDADD += $(top_builddir)/libgphoto2/libgphoto2.la -test_init_localedir_LDADD += $(top_builddir)/libgphoto2_port/libgphoto2_port/libgphoto2_port.la +test_init_localedir_LDADD += $(libgphoto2_la) +test_init_localedir_LDADD += $(libgphoto2_port_la) test_init_localedir_LDADD += $(LIBLTDL) test_init_localedir_LDADD += $(LIBEXIF_LIBS) test_init_localedir_LDADD += $(INTLLIBS)