Skip to content

Commit

Permalink
Move socket and collection functions to a convenience library
Browse files Browse the repository at this point in the history
This avoids the iproxy tool from relying on undocumented library ABI.
  • Loading branch information
hyperair authored and nikias committed Oct 3, 2014
1 parent cc4f7aa commit 305450a
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src include tools
SUBDIRS = common src include tools

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libusbmuxd.pc
14 changes: 14 additions & 0 deletions common/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
AM_CFLAGS = $(GLOBAL_CFLAGS)

noinst_LTLIBRARIES = libinternalcommon.la

libinternalcommon_la_LIBADD =
libinternalcommon_la_SOURCES = \
socket.c \
collection.c \
socket.h \
collection.h

if WIN32
libinternalcommon_la_LIBADD += -lws2_32
endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

AC_OUTPUT([
Makefile
common/Makefile
src/Makefile
include/Makefile
tools/Makefile
Expand Down
9 changes: 3 additions & 6 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
AM_CPPFLAGS = -I$(top_srcdir)/include
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/common

AM_CFLAGS = $(GLOBAL_CFLAGS) $(libplist_CFLAGS)
AM_LDFLAGS = $(GLOBAL_LIBS) $(libpthread_LIBS) $(libplist_LIBS)

lib_LTLIBRARIES = libusbmuxd.la
libusbmuxd_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBUSBMUXD_SO_VERSION) -no-undefined
libusbmuxd_la_LIBADD =
libusbmuxd_la_SOURCES = \
collection.c collection.h \
socket.c socket.h \
libusbmuxd.c
libusbmuxd_la_LIBADD = $(top_builddir)/common/libinternalcommon.la
libusbmuxd_la_SOURCES = libusbmuxd.c

if WIN32
libusbmuxd_la_LDFLAGS += -avoid-version
Expand Down
4 changes: 2 additions & 2 deletions tools/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
AM_CFLAGS = $(GLOBAL_CFLAGS) -I$(top_srcdir)/src -I$(top_srcdir)/include
AM_CFLAGS = $(GLOBAL_CFLAGS) -I$(top_srcdir)/common -I$(top_srcdir)/src -I$(top_srcdir)/include
AM_LDFLAGS = $(libpthread_LIBS)

bin_PROGRAMS = iproxy

iproxy_SOURCES = iproxy.c
iproxy_CFLAGS = $(AM_CFLAGS)
iproxy_LDFLAGS = $(AM_LDFLAGS)
iproxy_LDADD = $(top_builddir)/src/libusbmuxd.la
iproxy_LDADD = $(top_builddir)/src/libusbmuxd.la $(top_builddir)/common/libinternalcommon.la

0 comments on commit 305450a

Please sign in to comment.