diff options
author | Nikias Bassen | 2014-11-11 15:52:36 +0100 |
---|---|---|
committer | Nikias Bassen | 2014-12-02 19:22:25 +0100 |
commit | 34e6eeef656a205d4f65f128cb17bc81cca3b4d3 (patch) | |
tree | 3cbf63bc707654ffea3a28fd088e969e2edf8f68 | |
parent | 816b587e32d894083bf884ca647e6c734b242e3f (diff) | |
download | usbmuxd-34e6eeef656a205d4f65f128cb17bc81cca3b4d3.tar.gz usbmuxd-34e6eeef656a205d4f65f128cb17bc81cca3b4d3.tar.bz2 |
Move utils to convenience library
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | common/Makefile.am | 10 | ||||
-rw-r--r-- | common/utils.c (renamed from src/utils.c) | 0 | ||||
-rw-r--r-- | common/utils.h (renamed from src/utils.h) | 0 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/conf.c | 2 | ||||
-rw-r--r-- | src/log.c | 2 | ||||
-rw-r--r-- | src/usb.c | 2 | ||||
-rw-r--r-- | src/usb.h | 2 |
10 files changed, 18 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am index a4d86c0..84ea46a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,9 @@ AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = src $(UDEV_SUB) $(SYSTEMD_SUB) docs +SUBDIRS = common src $(UDEV_SUB) $(SYSTEMD_SUB) docs EXTRA_DIST = docs COPYING.GPLv2 COPYING.GPLv3 DISTCHECK_CONFIGURE_FLAGS = \ --with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \ - --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
\ No newline at end of file + --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) diff --git a/common/Makefile.am b/common/Makefile.am new file mode 100644 index 0000000..b4a65b9 --- /dev/null +++ b/common/Makefile.am @@ -0,0 +1,10 @@ +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir) -I$(top_srcdir)/src + +AM_CFLAGS = $(GLOBAL_CFLAGS) $(libplist_CFLAGS) +AM_LDFLAGS = $(libplist_LIBS) + +noinst_LTLIBRARIES = libinternalcommon.la +libinternalcommon_la_LIBADD = +libinternalcommon_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined +libinternalcommon_la_SOURCES = \ + utils.c utils.h diff --git a/src/utils.c b/common/utils.c index ceb65e1..ceb65e1 100644 --- a/src/utils.c +++ b/common/utils.c diff --git a/src/utils.h b/common/utils.h index 1137a93..1137a93 100644 --- a/src/utils.h +++ b/common/utils.h diff --git a/configure.ac b/configure.ac index 6c2481a..a8f99da 100644 --- a/configure.ac +++ b/configure.ac @@ -143,6 +143,7 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) AC_OUTPUT([ Makefile +common/Makefile src/Makefile udev/Makefile systemd/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index 5ef0d3b..23713ba 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,12 +6,12 @@ AM_LDFLAGS = $(libplist_LIBS) $(libusb_LIBS) $(libimobiledevice_LIBS) $(libpthre sbin_PROGRAMS = usbmuxd usbmuxd_CFLAGS = $(AM_CFLAGS) +usbmuxd_LDADD = $(top_builddir)/common/libinternalcommon.la usbmuxd_LDFLAGS = $(AM_LDFLAGS) -no-undefined usbmuxd_SOURCES = client.c client.h \ device.c device.h \ preflight.c preflight.h \ log.c log.h \ usbmuxd-proto.h usb.c usb.h \ - utils.c utils.h \ conf.c conf.h \ main.c @@ -40,8 +40,8 @@ #endif #include "conf.h" -#include "utils.h" #include "log.h" +#include "common/utils.h" #ifdef WIN32 #define DIR_SEP '\\' @@ -31,7 +31,7 @@ #include <syslog.h> #include "log.h" -#include "utils.h" +#include "common/utils.h" unsigned int log_level = LL_WARNING; @@ -34,7 +34,7 @@ #include "usb.h" #include "log.h" #include "device.h" -#include "utils.h" +#include "common/utils.h" #if (defined(LIBUSB_API_VERSION) && (LIBUSB_API_VERSION >= 0x01000102)) || (defined(LIBUSBX_API_VERSION) && (LIBUSBX_API_VERSION >= 0x01000102)) #define HAVE_LIBUSB_HOTPLUG_API 1 @@ -23,7 +23,7 @@ #define USB_H #include <stdint.h> -#include "utils.h" +#include "common/utils.h" #define INTERFACE_CLASS 255 #define INTERFACE_SUBCLASS 254 |