summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/Makefile.am')
-rw-r--r--src/mesa/drivers/dri/Makefile.am47
1 files changed, 46 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/Makefile.am b/src/mesa/drivers/dri/Makefile.am
index 7fa0ad73d01..7c573566898 100644
--- a/src/mesa/drivers/dri/Makefile.am
+++ b/src/mesa/drivers/dri/Makefile.am
@@ -1,4 +1,8 @@
+dridir = $(DRI_DRIVER_INSTALL_DIR)
+
SUBDIRS =
+MEGADRIVERS =
+MEGADRIVERS_DEPS =
SUBDIRS+=common
@@ -7,7 +11,9 @@ SUBDIRS+=i915
endif
if HAVE_I965_DRI
-SUBDIRS+=i965
+SUBDIRS += i965
+MEGADRIVERS_DEPS += i965/libi965_dri.la
+MEGADRIVERS += i965_dri.so
endif
if HAVE_NOUVEAU_DRI
@@ -31,3 +37,42 @@ pkgconfig_DATA = dri.pc
driincludedir = $(includedir)/GL/internal
driinclude_HEADERS = $(top_srcdir)/include/GL/internal/dri_interface.h
+
+nodist_EXTRA_mesa_dri_drivers_la_SOURCES = dummy.cpp
+mesa_dri_drivers_la_SOURCES =
+mesa_dri_drivers_la_LDFLAGS = \
+ -module -avoid-version -shared \
+ -Wl,-Bsymbolic \
+ $()
+mesa_dri_drivers_la_LIBADD = \
+ ../../libmesa.la \
+ common/libmegadriver_stub.la \
+ common/libdricommon.la \
+ $(MEGADRIVERS_DEPS) \
+ $(MEGADRIVER_DRI_LIB_DEPS) \
+ $()
+
+if NEED_MEGADRIVER
+dri_LTLIBRARIES = mesa_dri_drivers.la
+
+# Add a link to allow setting LD_LIBRARY_PATH/LIBGL_DRIVERS_PATH to /lib of the build tree.
+all-local: mesa_dri_drivers.la
+ $(MKDIR_P) $(top_builddir)/$(LIB_DIR);
+ $(AM_V_GEN)ln -f .libs/mesa_dri_drivers.so \
+ $(top_builddir)/$(LIB_DIR)/mesa_dri_drivers.so;
+ $(AM_V_GEN)for i in $(MEGADRIVERS); do \
+ ln -f $(top_builddir)/$(LIB_DIR)/mesa_dri_drivers.so \
+ $(top_builddir)/$(LIB_DIR)/$$i; \
+ done;
+
+# hardlink each megadriver instance, but don't actually have
+# mesa_dri_drivers.so in the set of final installed files.
+install-data-hook:
+ for i in $(MEGADRIVERS); do \
+ ln -f $(DESTDIR)$(dridir)/mesa_dri_drivers.so \
+ $(DESTDIR)$(dridir)/$$i; \
+ done;
+ $(RM) -f $(DESTDIR)$(dridir)/mesa_dri_drivers.so
+ $(RM) -f $(DESTDIR)$(dridir)/mesa_dri_drivers.la
+
+endif