summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2006-12-01 14:13:28 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-12-01 16:38:34 +1100
commit8b4237f8b2a8de2a986df2af078fec25218394c2 (patch)
treefde4909221e8cf7d937d0fa4aba9a805a5e27ea7
parent6f9746f3041217574205137cba1f279afa5b2a13 (diff)
Only create one libtwin library
Looks like the idea of splitting up the twin libraries into componenets (eg, libtwin-x11.so for x11-specific stuff) wasn't working too well. Instead, we should stick to the one shared library, whose contents change depending on the available dependencies. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--Makefile.am46
-rw-r--r--configure.ac6
2 files changed, 24 insertions, 28 deletions
diff --git a/Makefile.am b/Makefile.am
index 90581e0..1e464aa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,21 +6,6 @@ bin_PROGRAMS =
lib_LTLIBRARIES = libtwin.la
pkginclude_HEADERS = twin.h twin_def.h
-if TWIN_X11
-lib_LTLIBRARIES += libtwin-x11.la
-pkginclude_HEADERS += twin_x11.h
-endif
-
-if TWIN_FB
-lib_LTLIBRARIES += libtwin-fbdev.la
-pkginclude_HEADERS += twin_fbdev.h
-endif
-
-if TWIN_MOUSE
-lib_LTLIBRARIES += libtwin-mouse.la
-pkginclude_HEADERS += twin_linux_mouse.h
-endif
-
libtwin_la_LDFLAGS = -version-info @LIB_VERSION@
libtwin_la_SOURCES = \
twin_box.c \
@@ -54,15 +39,20 @@ libtwin_la_SOURCES = \
twin_work.c \
twinint.h
-libtwin_mouse_la_LDFLAGS = -version-info @LIB_VERSION@
-libtwin_mouse_la_SOURCES = twin_linux_mouse.c
+if TWIN_X11
+pkginclude_HEADERS += twin_x11.h
+libtwin_la_SOURCES += twin_x11.c
+endif
-libtwin_x11_la_CPPFLAGS = @X_CFLAGS@
-libtwin_x11_la_LDFLAGS = -version-info @LIB_VERSION@
-libtwin_x11_la_SOURCES = twin_x11.c
+if TWIN_FB
+pkginclude_HEADERS += twin_fbdev.h
+libtwin_la_SOURCES += twin_fbdev.c
+endif
-libtwin_fbdev_la_LDFLAGS = -version-info @LIB_VERSION@
-libtwin_fbdev_la_SOURCES = twin_fbdev.c
+if TWIN_MOUSE
+pkginclude_HEADERS += twin_linux_mouse.h
+libtwin_la_SOURCES += twin_linux_mouse.c
+endif
# demo twin applications
EXTRA_PROGRAMS += twin_demos/xtwin twin_demos/ftwin
@@ -78,14 +68,14 @@ noinst_PROGRAMS += twin_demos/ftwin
endif
twin_demos_xtwin_SOURCES = twin_demos/xtwin.c
-twin_demos_xtwin_CPPFLAGS = @X_CFLAGS@ -I$(top_srcdir)/twin_demos
-twin_demos_xtwin_LDADD = twin_demos/libtwin_demos.a \
- libtwin.la libtwin-x11.la @X_LIBS@ -lm
+twin_demos_xtwin_CFLAGS = @TWIN_DEP_CFLAGS@ -I$(top_srcdir)/twin_demos
+twin_demos_xtwin_LDADD = twin_demos/libtwin_demos.a libtwin.la \
+ @TWIN_DEP_LDFLAGS@
twin_demos_ftwin_SOURCES = twin_demos/ftwin.c
-twin_demos_ftwin_CPPFLAGS = -I$(top_srcdir)/twin_demos
-twin_demos_ftwin_LDADD = twin_demos/libtwin_demos.a \
- libtwin.la libtwin-fbdev.la libtwin-mouse.la -lm
+twin_demos_ftwin_CFLAGS = @TWIN_DEP_CFLAGS@ -I$(top_srcdir)/twin_demos
+twin_demos_ftwin_LDADD = twin_demos/libtwin_demos.a libtwin.la \
+ @TWIN_DEP_LDFLAGS@
twin_demos_libtwin_demos_a_CFLAGS = @WARN_CFLAGS@ -I$(top_srcdir)/twin_demos
twin_demos_libtwin_demos_a_SOURCES = \
diff --git a/configure.ac b/configure.ac
index 17b2b2d..6c96cdd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,6 +68,12 @@ PKG_CHECK_MODULES(FREETYPE, freetype2, twin_ttf="yes", twin_ttf="no")
AC_SUBST(FREETYPE_LIBS)
AC_SUBST(FREETYPE_CFLAGS)
+# TWIN_DEP_*FLAGS define all flags required by dependencies of libtwin
+TWIN_DEP_LDFLAGS="$X_LIBS -lm"
+TWIN_DEPCFLAGS="$X_CFLAGS"
+AC_SUBST(TWIN_DEP_CFLAGS)
+AC_SUBST(TWIN_DEP_LDFLAGS)
+
AM_CONDITIONAL(TWIN_X11, test x$twin_x11 = xyes)
AM_CONDITIONAL(TWIN_FB, test x$twin_fb = xyes)
AM_CONDITIONAL(TWIN_TTF, test x$twin_ttf = xyes)