Mesa (master): i965: Make a linkable library for the contents of i965_dri. so.

Eric Anholt anholt at kemper.freedesktop.org
Mon Sep 17 19:33:36 UTC 2012


Module: Mesa
Branch: master
Commit: 826ecbbe6eef88ccc6602d0db978f1941c1a3421
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=826ecbbe6eef88ccc6602d0db978f1941c1a3421

Author: Eric Anholt <eric at anholt.net>
Date:   Thu Feb  2 13:56:52 2012 +0100

i965: Make a linkable library for the contents of i965_dri.so.

To do unit testing of i965, we want to be able to link against the
driver's symbols and prod them.  If we don't have a separate lib from
our loadable module, libtool gets super whiny.

Acked-by: Paul Berry <stereotype441 at gmail.com>

---

 src/mesa/drivers/dri/i965/.gitignore  |    1 +
 src/mesa/drivers/dri/i965/Makefile.am |   17 ++++++++++++-----
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/.gitignore b/src/mesa/drivers/dri/i965/.gitignore
index 09cb4ff..fe4578e 100644
--- a/src/mesa/drivers/dri/i965/.gitignore
+++ b/src/mesa/drivers/dri/i965/.gitignore
@@ -1,2 +1,3 @@
 Makefile
 i965_symbols_test
+libi965_dri.la
diff --git a/src/mesa/drivers/dri/i965/Makefile.am b/src/mesa/drivers/dri/i965/Makefile.am
index c1526ae..0ac3de7 100644
--- a/src/mesa/drivers/dri/i965/Makefile.am
+++ b/src/mesa/drivers/dri/i965/Makefile.am
@@ -23,6 +23,8 @@
 
 include Makefile.sources
 
+if HAVE_I965_DRI
+
 # Hack to make some of the non-automake variables work.
 TOP=$(top_builddir)
 
@@ -42,22 +44,27 @@ AM_CXXFLAGS = $(AM_CFLAGS)
 
 dridir = $(DRI_DRIVER_INSTALL_DIR)
 
-if HAVE_I965_DRI
+noinst_LTLIBRARIES = libi965_dri.la
 dri_LTLIBRARIES = i965_dri.la
-endif
 
-i965_dri_la_SOURCES = \
+libi965_dri_la_SOURCES = \
 	$(i965_C_FILES) \
 	$(i965_CXX_FILES)
 
-i965_dri_la_LDFLAGS = -module -avoid-version -shared
-i965_dri_la_LIBADD = \
+COMMON_LIBS = \
+	libi965_dri.la \
 	$(DRI_LIB_DEPS) \
 	$(INTEL_LIBS) \
 	../common/libdricommon.la
 
+i965_dri_la_SOURCES =
+i965_dri_la_LIBADD = $(COMMON_LIBS)
+i965_dri_la_LDFLAGS = -module -avoid-version -shared
+
 # Provide compatibility with scripts for the old Mesa build system for
 # a while by putting a link to the driver into /lib of the build tree.
 all-local: i965_dri.la
 	$(MKDIR_P) $(top_builddir)/$(LIB_DIR);
 	ln -f .libs/i965_dri.so $(top_builddir)/$(LIB_DIR)/i965_dri.so;
+
+endif




More information about the mesa-commit mailing list