From 2397a6df0638e64ba3778c807af01c519b0c36be Mon Sep 17 00:00:00 2001 From: Sergey Popov Date: Thu, 22 Mar 2012 17:33:11 +0400 Subject: [PATCH] move lpt and logging functions into library --- daemon/Makefile.am | 2 +- lib/Makefile.am | 2 +- lib/yasnd-gammu.c | 1 + {daemon => lib}/yasnd-log.c | 0 {daemon => lib}/yasnd-lpt.c | 0 daemon/yasnd-log.h => yasnd-log.h | 0 daemon/yasnd-lpt.h => yasnd-lpt.h | 0 7 files changed, 3 insertions(+), 2 deletions(-) rename {daemon => lib}/yasnd-log.c (100%) rename {daemon => lib}/yasnd-lpt.c (100%) rename daemon/yasnd-log.h => yasnd-log.h (100%) rename daemon/yasnd-lpt.h => yasnd-lpt.h (100%) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 66bb5f8..b29e8d0 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -3,7 +3,7 @@ include_HEADERS = $(top_srcdir)/yasnd.h yasnd_LDADD = ${libconfuse_LIBS} yasnd_LDADD += $(top_srcdir)/lib/libyasnd.la sbin_PROGRAMS = yasnd -yasnd_SOURCES = yasnd.c yasnd-ipc.c yasnd-log.c yasnd-lpt.c +yasnd_SOURCES = yasnd.c yasnd-ipc.c yasnd_CPPFLAGS = -I$(top_srcdir) distclean-local: diff --git a/lib/Makefile.am b/lib/Makefile.am index a01fc74..2185d63 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,7 +1,7 @@ INCLUDES=${gammu_CFLAGS} lib_LTLIBRARIES = libyasnd.la -libyasnd_la_SOURCES = libyasnd.c yasnd-gammu.c +libyasnd_la_SOURCES = libyasnd.c yasnd-gammu.c yasnd-log.c yasnd-lpt.c libyasnd_la_CPPFLAGS = -I$(top_srcdir) libyasnd_la_LIBADD = ${gammu_LIBS} diff --git a/lib/yasnd-gammu.c b/lib/yasnd-gammu.c index bd55fa5..a2b6d84 100644 --- a/lib/yasnd-gammu.c +++ b/lib/yasnd-gammu.c @@ -1,5 +1,6 @@ #include #include "yasnd.h" +#include "yasnd-log.h" GSM_Error error; // structure to store possible gammu errors GSM_StateMachine *state_machine=NULL; // structure to interact with mobile phones diff --git a/daemon/yasnd-log.c b/lib/yasnd-log.c similarity index 100% rename from daemon/yasnd-log.c rename to lib/yasnd-log.c diff --git a/daemon/yasnd-lpt.c b/lib/yasnd-lpt.c similarity index 100% rename from daemon/yasnd-lpt.c rename to lib/yasnd-lpt.c diff --git a/daemon/yasnd-log.h b/yasnd-log.h similarity index 100% rename from daemon/yasnd-log.h rename to yasnd-log.h diff --git a/daemon/yasnd-lpt.h b/yasnd-lpt.h similarity index 100% rename from daemon/yasnd-lpt.h rename to yasnd-lpt.h