Skip to content

Commit 305450a

Browse files
hyperairnikias
authored andcommitted
Move socket and collection functions to a convenience library
This avoids the iproxy tool from relying on undocumented library ABI.
1 parent cc4f7aa commit 305450a

9 files changed

Lines changed: 21 additions & 9 deletions

File tree

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
AUTOMAKE_OPTIONS = foreign
22
ACLOCAL_AMFLAGS = -I m4
3-
SUBDIRS = src include tools
3+
SUBDIRS = common src include tools
44

55
pkgconfigdir = $(libdir)/pkgconfig
66
pkgconfig_DATA = libusbmuxd.pc

common/Makefile.am

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
AM_CFLAGS = $(GLOBAL_CFLAGS)
2+
3+
noinst_LTLIBRARIES = libinternalcommon.la
4+
5+
libinternalcommon_la_LIBADD =
6+
libinternalcommon_la_SOURCES = \
7+
socket.c \
8+
collection.c \
9+
socket.h \
10+
collection.h
11+
12+
if WIN32
13+
libinternalcommon_la_LIBADD += -lws2_32
14+
endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
8888

8989
AC_OUTPUT([
9090
Makefile
91+
common/Makefile
9192
src/Makefile
9293
include/Makefile
9394
tools/Makefile

src/Makefile.am

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
AM_CPPFLAGS = -I$(top_srcdir)/include
1+
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/common
22

33
AM_CFLAGS = $(GLOBAL_CFLAGS) $(libplist_CFLAGS)
44
AM_LDFLAGS = $(GLOBAL_LIBS) $(libpthread_LIBS) $(libplist_LIBS)
55

66
lib_LTLIBRARIES = libusbmuxd.la
77
libusbmuxd_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBUSBMUXD_SO_VERSION) -no-undefined
8-
libusbmuxd_la_LIBADD =
9-
libusbmuxd_la_SOURCES = \
10-
collection.c collection.h \
11-
socket.c socket.h \
12-
libusbmuxd.c
8+
libusbmuxd_la_LIBADD = $(top_builddir)/common/libinternalcommon.la
9+
libusbmuxd_la_SOURCES = libusbmuxd.c
1310

1411
if WIN32
1512
libusbmuxd_la_LDFLAGS += -avoid-version

tools/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
AM_CFLAGS = $(GLOBAL_CFLAGS) -I$(top_srcdir)/src -I$(top_srcdir)/include
1+
AM_CFLAGS = $(GLOBAL_CFLAGS) -I$(top_srcdir)/common -I$(top_srcdir)/src -I$(top_srcdir)/include
22
AM_LDFLAGS = $(libpthread_LIBS)
33

44
bin_PROGRAMS = iproxy
55

66
iproxy_SOURCES = iproxy.c
77
iproxy_CFLAGS = $(AM_CFLAGS)
88
iproxy_LDFLAGS = $(AM_LDFLAGS)
9-
iproxy_LDADD = $(top_builddir)/src/libusbmuxd.la
9+
iproxy_LDADD = $(top_builddir)/src/libusbmuxd.la $(top_builddir)/common/libinternalcommon.la
1010

0 commit comments

Comments
 (0)