diff --git a/Makefile.am b/Makefile.am index bdebce2..5a15fc6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,23 +1,9 @@ ACLOCAL_AMFLAGS = -I m4 -lib_LTLIBRARIES = libuev.la -libuev_la_SOURCES = uev.c io.c timer.c signal.c cron.c -libuev_la_CPPFLAGS = -D_GNU_SOURCE -D_TIME_BITS=64 -libuev_la_CFLAGS = -W -Wall -Wextra -libuev_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:2:0 - -noinst_PROGRAMS = bench -bench_CPPFLAGS = -D_GNU_SOURCE -bench_LDADD = libuev.la - -pkgconfigdir = $(libdir)/pkgconfig -pkgincludedir = $(includedir)/uev -pkgconfig_DATA = libuev.pc -pkginclude_HEADERS = uev.h private.h queue.h doc_DATA = README.md LICENSE EXTRA_DIST = README.md LICENSE AUTHORS ChangeLog.md DIST_SUBDIRS = examples tests -SUBDIRS = tests +SUBDIRS = src tests ## Generate .deb package package: diff --git a/configure.ac b/configure.ac index cbd5dba..c1cd2ae 100644 --- a/configure.ac +++ b/configure.ac @@ -2,9 +2,9 @@ AC_INIT(libuev, 1.6.0-rc1, https://github.com/troglobit/libuev/issues) AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) AM_SILENT_RULES([yes]) -AC_CONFIG_SRCDIR(uev.c) +AC_CONFIG_SRCDIR(src/uev.c) AM_CONFIG_HEADER(config.h) -AC_CONFIG_FILES([Makefile libuev.pc examples/Makefile tests/Makefile]) +AC_CONFIG_FILES([Makefile src/libuev.pc src/Makefile examples/Makefile tests/Makefile]) AC_CONFIG_MACRO_DIR([m4]) AC_PROG_CC diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..032d0cd --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,14 @@ +lib_LTLIBRARIES = libuev.la +libuev_la_SOURCES = uev.c io.c timer.c signal.c cron.c +libuev_la_CPPFLAGS = -D_GNU_SOURCE -D_TIME_BITS=64 +libuev_la_CFLAGS = -W -Wall -Wextra +libuev_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:2:0 + +noinst_PROGRAMS = bench +bench_CPPFLAGS = -D_GNU_SOURCE +bench_LDADD = libuev.la + +pkgconfigdir = $(libdir)/pkgconfig +pkgincludedir = $(includedir)/uev +pkgconfig_DATA = libuev.pc +pkginclude_HEADERS = uev.h private.h queue.h diff --git a/bench.c b/src/bench.c similarity index 100% rename from bench.c rename to src/bench.c diff --git a/cron.c b/src/cron.c similarity index 100% rename from cron.c rename to src/cron.c diff --git a/io.c b/src/io.c similarity index 100% rename from io.c rename to src/io.c diff --git a/libuev.pc.in b/src/libuev.pc.in similarity index 100% rename from libuev.pc.in rename to src/libuev.pc.in diff --git a/private.h b/src/private.h similarity index 100% rename from private.h rename to src/private.h diff --git a/queue.h b/src/queue.h similarity index 100% rename from queue.h rename to src/queue.h diff --git a/signal.c b/src/signal.c similarity index 100% rename from signal.c rename to src/signal.c diff --git a/timer.c b/src/timer.c similarity index 100% rename from timer.c rename to src/timer.c diff --git a/uev.c b/src/uev.c similarity index 100% rename from uev.c rename to src/uev.c diff --git a/uev.h b/src/uev.h similarity index 100% rename from uev.h rename to src/uev.h diff --git a/tests/Makefile.am b/tests/Makefile.am index ec1c6da..d92f0f3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -13,4 +13,4 @@ check_PROGRAMS = $(TESTS) # Ignore warnings about unused result, in e.g. write() CFLAGS = -W -Wall -Wextra -Wno-unused-result CPPFLAGS = -D_GNU_SOURCE -LDADD = -L../ ../libuev.la +LDADD = -L../src ../src/libuev.la diff --git a/tests/check.h b/tests/check.h index 330aac5..9e6fe5d 100644 --- a/tests/check.h +++ b/tests/check.h @@ -7,7 +7,7 @@ #include #include -#include "../uev.h" +#include "../src/uev.h" #define UNUSED(arg) arg __attribute__ ((unused))