From 70e8738d93ebb30a187a5060b26dbe7ae960b76c Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sat, 13 Jun 2020 03:56:11 +0200 Subject: Add API version to library and pkgconfig file for proper linking --- src/Makefile.am | 12 ++++++------ src/libimobiledevice-1.0.pc.in | 2 +- tools/Makefile.am | 36 ++++++++++++++++++------------------ 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 9933277..1ef47fc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,10 +21,10 @@ AM_LDFLAGS = \ $(openssl_LIBS) \ $(PTHREAD_LIBS) -lib_LTLIBRARIES = libimobiledevice.la -libimobiledevice_la_LIBADD = $(top_builddir)/common/libinternalcommon.la -libimobiledevice_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBIMOBILEDEVICE_SO_VERSION) -no-undefined -libimobiledevice_la_SOURCES = \ +lib_LTLIBRARIES = libimobiledevice-1.0.la +libimobiledevice_1_0_la_LIBADD = $(top_builddir)/common/libinternalcommon.la +libimobiledevice_1_0_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBIMOBILEDEVICE_SO_VERSION) -no-undefined +libimobiledevice_1_0_la_SOURCES = \ idevice.c idevice.h \ service.c service.h \ property_list_service.c property_list_service.h \ @@ -53,8 +53,8 @@ libimobiledevice_la_SOURCES = \ syslog_relay.c syslog_relay.h if WIN32 -libimobiledevice_la_LDFLAGS += -avoid-version -static-libgcc -libimobiledevice_la_LIBADD += -lole32 -lws2_32 -lgdi32 +libimobiledevice_1_0_la_LDFLAGS += -avoid-version -static-libgcc +libimobiledevice_1_0_la_LIBADD += -lole32 -lws2_32 -lgdi32 endif pkgconfigdir = $(libdir)/pkgconfig diff --git a/src/libimobiledevice-1.0.pc.in b/src/libimobiledevice-1.0.pc.in index 023ce54..c37654b 100644 --- a/src/libimobiledevice-1.0.pc.in +++ b/src/libimobiledevice-1.0.pc.in @@ -6,7 +6,7 @@ includedir=@includedir@ Name: @PACKAGE_NAME@ Description: A library to communicate with services running on Apple iOS devices. Version: @PACKAGE_VERSION@ -Libs: -L${libdir} -limobiledevice +Libs: -L${libdir} -limobiledevice-1.0 Cflags: -I${includedir} Requires: libplist-2.0 >= @LIBPLIST_VERSION@ Requires.private: libusbmuxd-2.0 >= @LIBUSBMUXD_VERSION@ @ssl_requires@ diff --git a/tools/Makefile.am b/tools/Makefile.am index 7e6487f..8ed8ad9 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -41,89 +41,89 @@ bin_PROGRAMS = \ ideviceinfo_SOURCES = ideviceinfo.c ideviceinfo_CFLAGS = $(AM_CFLAGS) ideviceinfo_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS) -ideviceinfo_LDADD = $(top_builddir)/src/libimobiledevice.la +ideviceinfo_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la idevicename_SOURCES = idevicename.c idevicename_CFLAGS = $(AM_CFLAGS) idevicename_LDFLAGS = $(AM_LDFLAGS) -idevicename_LDADD = $(top_builddir)/src/libimobiledevice.la +idevicename_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la idevicepair_SOURCES = idevicepair.c idevicepair_CFLAGS = -I$(top_srcdir) $(AM_CFLAGS) idevicepair_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS) $(libusbmuxd_LIBS) -idevicepair_LDADD = $(top_builddir)/src/libimobiledevice.la +idevicepair_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la idevicesyslog_SOURCES = idevicesyslog.c idevicesyslog_CFLAGS = $(AM_CFLAGS) idevicesyslog_LDFLAGS = $(AM_LDFLAGS) -idevicesyslog_LDADD = $(top_builddir)/src/libimobiledevice.la +idevicesyslog_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la idevice_id_SOURCES = idevice_id.c idevice_id_CFLAGS = $(AM_CFLAGS) idevice_id_LDFLAGS = $(AM_LDFLAGS) -idevice_id_LDADD = $(top_builddir)/src/libimobiledevice.la +idevice_id_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la idevicebackup_SOURCES = idevicebackup.c idevicebackup_CFLAGS = $(AM_CFLAGS) idevicebackup_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS) -idevicebackup_LDADD = $(top_builddir)/src/libimobiledevice.la +idevicebackup_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la idevicebackup2_SOURCES = idevicebackup2.c idevicebackup2_CFLAGS = $(AM_CFLAGS) idevicebackup2_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS) -idevicebackup2_LDADD = $(top_builddir)/src/libimobiledevice.la +idevicebackup2_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la ideviceimagemounter_SOURCES = ideviceimagemounter.c ideviceimagemounter_CFLAGS = $(AM_CFLAGS) ideviceimagemounter_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS) -ideviceimagemounter_LDADD = $(top_builddir)/src/libimobiledevice.la +ideviceimagemounter_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la idevicescreenshot_SOURCES = idevicescreenshot.c idevicescreenshot_CFLAGS = $(AM_CFLAGS) idevicescreenshot_LDFLAGS = $(AM_LDFLAGS) -idevicescreenshot_LDADD = $(top_builddir)/src/libimobiledevice.la +idevicescreenshot_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la ideviceenterrecovery_SOURCES = ideviceenterrecovery.c ideviceenterrecovery_CFLAGS = $(AM_CFLAGS) ideviceenterrecovery_LDFLAGS = $(AM_LDFLAGS) -ideviceenterrecovery_LDADD = $(top_builddir)/src/libimobiledevice.la +ideviceenterrecovery_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la idevicedate_SOURCES = idevicedate.c idevicedate_CFLAGS = $(AM_CFLAGS) idevicedate_LDFLAGS = $(AM_LDFLAGS) -idevicedate_LDADD = $(top_builddir)/src/libimobiledevice.la +idevicedate_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la ideviceprovision_SOURCES = ideviceprovision.c ideviceprovision_CFLAGS = $(AM_CFLAGS) ideviceprovision_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS) -ideviceprovision_LDADD = $(top_builddir)/src/libimobiledevice.la +ideviceprovision_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la idevicedebugserverproxy_SOURCES = idevicedebugserverproxy.c idevicedebugserverproxy_CFLAGS = -I$(top_srcdir) $(AM_CFLAGS) idevicedebugserverproxy_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS) -idevicedebugserverproxy_LDADD = $(top_builddir)/src/libimobiledevice.la +idevicedebugserverproxy_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la idevicediagnostics_SOURCES = idevicediagnostics.c idevicediagnostics_CFLAGS = $(AM_CFLAGS) idevicediagnostics_LDFLAGS = $(AM_LDFLAGS) -idevicediagnostics_LDADD = $(top_builddir)/src/libimobiledevice.la +idevicediagnostics_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la idevicedebug_SOURCES = idevicedebug.c idevicedebug_CFLAGS = $(AM_CFLAGS) idevicedebug_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS) -idevicedebug_LDADD = $(top_builddir)/src/libimobiledevice.la +idevicedebug_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la idevicenotificationproxy_SOURCES = idevicenotificationproxy.c idevicenotificationproxy_CFLAGS = $(AM_CFLAGS) idevicenotificationproxy_LDFLAGS = $(AM_LDFLAGS) -idevicenotificationproxy_LDADD = $(top_builddir)/src/libimobiledevice.la +idevicenotificationproxy_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la idevicecrashreport_SOURCES = idevicecrashreport.c idevicecrashreport_CFLAGS = -I$(top_srcdir) $(AM_CFLAGS) idevicecrashreport_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS) -idevicecrashreport_LDADD = $(top_builddir)/src/libimobiledevice.la +idevicecrashreport_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la idevicesetlocation_SOURCES = idevicesetlocation.c idevicesetlocation_CFLAGS = $(AM_CFLAGS) idevicesetlocation_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS) -idevicesetlocation_LDADD = $(top_builddir)/src/libimobiledevice.la +idevicesetlocation_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la -- cgit v1.1-32-gdbae