diff --git a/INSTALL b/INSTALL index 025a74f..5b659ff 100644 --- a/INSTALL +++ b/INSTALL @@ -2,6 +2,7 @@ First of all, you need some packages installed: autoconf automake +libtool gammu To compile program: diff --git a/Makefile.am b/Makefile.am index 477040b..be6da93 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,8 +1,14 @@ +SUBDIRS = lib + INCLUDES=${gammu_CFLAGS} yasnd_LDADD = ${libconfuse_LIBS} yasnd_LDADD += ${gammu_LIBS} +yasnd_LDADD += lib/libyasnd.la sbin_PROGRAMS = yasnd yasnd_SOURCES = yasnd.c yasnd-gammu.c yasnd-ipc.c +ACLOCAL_AMFLAGS = -I m4 + distclean-local: - rm -rf aclocal.m4 autom4te.cache depcomp install-sh missing configure Makefile.in config.h* &>/dev/null + rm -rf aclocal.m4 m4 autom4te.cache depcomp install-sh missing configure Makefile.in config.h* &>/dev/null + rm -rf ltmain.sh config.guess config.sub &>/dev/null diff --git a/autogen.sh b/autogen.sh index 659112b..bcc1119 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,6 @@ #!/bin/sh aclocal autoheader +libtoolize autoconf automake -a diff --git a/configure.ac b/configure.ac index ab94774..c691eca 100644 --- a/configure.ac +++ b/configure.ac @@ -4,12 +4,15 @@ AC_CONFIG_SRCDIR([yasnd.c]) AC_CONFIG_HEADERS([config.h]) AC_LANG([C]) AM_INIT_AUTOMAKE +AC_CONFIG_MACRO_DIR([m4]) +AC_DISABLE_STATIC # Default prefix for installation AC_PREFIX_DEFAULT() # Checks for programs. AC_PROG_CC_C99 +LT_INIT # Checks for libraries. PKG_CHECK_MODULES([gammu], [gammu >= 1.0]) @@ -27,5 +30,5 @@ AC_CHECK_FUNCS([strdup memset]) AC_FUNC_FORK AC_FUNC_MALLOC -AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([Makefile lib/Makefile]) AC_OUTPUT diff --git a/lib/Makefile.am b/lib/Makefile.am new file mode 100644 index 0000000..c780b8f --- /dev/null +++ b/lib/Makefile.am @@ -0,0 +1,6 @@ +lib_LTLIBRARIES = libyasnd.la +libyasnd_la_SOURCES = libyasnd.c +libyasnd_la_CPPFLAGS = -I$(top_srcdir) + +distclean-local: + rm -f Makefile.in &>/dev/null diff --git a/lib/libyasnd.c b/lib/libyasnd.c new file mode 100644 index 0000000..e76353c --- /dev/null +++ b/lib/libyasnd.c @@ -0,0 +1,5 @@ +#include "yasnd.h" + +void lib_init() +{ +}