Skip to content

Commit

Permalink
Build a single shared library.
Browse files Browse the repository at this point in the history
Build a single shared library, that contains both lib/libivykis and
modules/libivykis-modules. This is accomplished through libtool, and
using two convenience libraries, which end up being linked into the
final, installed libivykis.so by the top-level Makefile.

And since a single library is built, the misc/ivykis-modules.pc.in
file gets removed.

Signed-off-by: Gergely Nagy <[email protected]>
Signed-off-by: Lennert Buytenhek <[email protected]>
  • Loading branch information
algernon authored and buytenh committed Dec 23, 2011
1 parent 89194fc commit 9dd8e39
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 20 deletions.
6 changes: 6 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ SUBDIRS = lib modules misc

EXTRA_DIST = DEDICATION ivykis.spec
DIST_SUBDIRS = lib modules contrib misc

lib_LTLIBRARIES = libivykis.la

libivykis_la_SOURCES =
libivykis_la_LIBADD = lib/libivykis.la modules/libivykis-modules.la
libivykis_la_LDFLAGS = -version-info 0:0:0
3 changes: 1 addition & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ AC_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([foreign])

# Checks for programs.
LT_INIT
AC_PROG_CC
AC_PROG_RANLIB

# Checks for libraries.
AC_SEARCH_LIBS([clock_gettime], [rt])
Expand Down Expand Up @@ -95,7 +95,6 @@ AC_CONFIG_FILES([Makefile \
lib/test/Makefile \
misc/Makefile \
misc/ivykis.pc \
misc/ivykis-modules.pc \
modules/Makefile \
modules/man3/Makefile \
modules/test/Makefile])
Expand Down
4 changes: 2 additions & 2 deletions lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AM_CPPFLAGS = -D_GNU_SOURCE -I$(top_srcdir)/lib/include -I$(top_builddir)/lib/i

AM_CFLAGS = -Wall

lib_LIBRARIES = libivykis.a
noinst_LTLIBRARIES = libivykis.la

if HAVE_DEV_POLL
DEV_POLL_SRC = iv_method_dev_poll.c
Expand All @@ -30,7 +30,7 @@ else
PORT_SRC =
endif

libivykis_a_SOURCES = iv_avl.c \
libivykis_la_SOURCES = iv_avl.c \
iv_main.c \
$(DEV_POLL_SRC) \
$(EPOLL_SRC) \
Expand Down
2 changes: 1 addition & 1 deletion lib/test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ AM_CPPFLAGS = -D_GNU_SOURCE -I$(top_srcdir)/lib/include -I$(top_builddir)/lib/i

AM_CFLAGS = -Wall

LDADD = ../libivykis.a
LDADD = ../libivykis.la

noinst_PROGRAMS = avl \
client \
Expand Down
2 changes: 1 addition & 1 deletion misc/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pkgconfigdir = $(libdir)/pkgconfig

pkgconfig_DATA = ivykis.pc ivykis-modules.pc
pkgconfig_DATA = ivykis.pc
10 changes: 0 additions & 10 deletions misc/ivykis-modules.pc.in

This file was deleted.

4 changes: 2 additions & 2 deletions modules/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ AM_CPPFLAGS = -D_GNU_SOURCE \

AM_CFLAGS = -Wall

lib_LIBRARIES = libivykis-modules.a
noinst_LTLIBRARIES = libivykis-modules.la

if HAVE_INOTIFY
INOTIFY_SRC = iv_inotify.c
Expand All @@ -17,7 +17,7 @@ INOTIFY_SRC =
INOTIFY_INCLUDE =
endif

libivykis_modules_a_SOURCES = iv_event.c \
libivykis_modules_la_SOURCES = iv_event.c \
iv_event_raw.c \
iv_fd_pump.c \
$(INOTIFY_SRC) \
Expand Down
4 changes: 2 additions & 2 deletions modules/test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ AM_CPPFLAGS = -D_GNU_SOURCE -I$(top_srcdir)/lib/include \
-I$(top_srcdir)/modules/include
AM_CFLAGS = -Wall

LDADD = $(top_builddir)/lib/libivykis.a \
$(top_builddir)/modules/libivykis-modules.a
LDADD = $(top_builddir)/lib/libivykis.la \
$(top_builddir)/modules/libivykis-modules.la

if HAVE_INOTIFY
INOTIFY_PROGS = iv_inotify_test
Expand Down

0 comments on commit 9dd8e39

Please sign in to comment.