diff --git a/Makefile.am b/Makefile.am index 9731c6f..14eaa7a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,12 +1,5 @@ -SUBDIRS = lib - -include_HEADERS = yasnd.h - -yasnd_LDADD = ${libconfuse_LIBS} -yasnd_LDADD += lib/libyasnd.la -sbin_PROGRAMS = yasnd -yasnd_SOURCES = yasnd.c yasnd-ipc.c +SUBDIRS = lib daemon distclean-local: - 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 + rm -rf aclocal.m4 m4 autom4te.cache compile depcomp install-sh missing configure Makefile.in config.h* &>/dev/null + rm -rf .deps ltmain.sh config.guess config.sub &>/dev/null diff --git a/configure.ac b/configure.ac index 3b1f441..76429ab 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ([2.68]) AC_INIT(yasnd, 0.1, admin@pinkbyte.ru) -AC_CONFIG_SRCDIR([yasnd.c]) +AC_CONFIG_SRCDIR([daemon/yasnd.c]) AC_CONFIG_HEADERS([config.h]) AC_LANG([C]) AM_INIT_AUTOMAKE @@ -11,6 +11,7 @@ AC_PREFIX_DEFAULT() # Checks for programs. AC_PROG_CC_C99 +AM_PROG_CC_C_O LT_INIT # Checks for libraries. @@ -29,5 +30,5 @@ AC_CHECK_FUNCS([strdup memset]) AC_FUNC_FORK AC_FUNC_MALLOC -AC_CONFIG_FILES([Makefile lib/Makefile]) +AC_CONFIG_FILES([Makefile lib/Makefile daemon/Makefile]) AC_OUTPUT diff --git a/daemon/Makefile.am b/daemon/Makefile.am new file mode 100644 index 0000000..b29e8d0 --- /dev/null +++ b/daemon/Makefile.am @@ -0,0 +1,10 @@ +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_CPPFLAGS = -I$(top_srcdir) + +distclean-local: + rm -f Makefile.in &>/dev/null diff --git a/yasnd-ipc.c b/daemon/yasnd-ipc.c similarity index 100% rename from yasnd-ipc.c rename to daemon/yasnd-ipc.c diff --git a/yasnd.c b/daemon/yasnd.c similarity index 100% rename from yasnd.c rename to daemon/yasnd.c