Mesa (master): automake: introduce GALLIUM_COMMON_LIB_DEPS

Emil Velikov evelikov at kemper.freedesktop.org
Sat Apr 5 13:08:53 UTC 2014


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

Author: Emil Velikov <emil.l.velikov at gmail.com>
Date:   Tue Apr  1 02:34:08 2014 +0100

automake: introduce GALLIUM_COMMON_LIB_DEPS

Rather than copying the core four dependencies all over gallium,
introduce the above variable to avoid all the duplication.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76848
Tested-by: Vinson Lee <vlee at freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>

---

 src/gallium/Automake.inc                    |   16 ++++++++--------
 src/gallium/targets/egl-static/Makefile.am  |   10 ++--------
 src/gallium/targets/gbm/Makefile.am         |    5 +----
 src/gallium/targets/pipe-loader/Makefile.am |    5 +----
 src/gallium/targets/xa/Makefile.am          |    6 +-----
 src/gallium/tests/trivial/Makefile.am       |    4 +---
 src/gallium/tests/unit/Makefile.am          |    4 +---
 7 files changed, 15 insertions(+), 35 deletions(-)

diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index 7504056..7a10a77 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -86,24 +86,24 @@ GALLIUM_OMX_LINKER_FLAGS = \
 	$(GC_SECTIONS) \
 	-Wl,--no-undefined
 
-GALLIUM_DRI_LIB_DEPS = \
-	$(SELINUX_LIBS) \
-	$(LIBDRM_LIBS) \
-	$(EXPAT_LIBS) \
+GALLIUM_COMMON_LIB_DEPS = \
 	-lm \
 	$(CLOCK_LIB) \
 	$(PTHREAD_LIBS) \
 	$(DLOPEN_LIBS)
 
+GALLIUM_DRI_LIB_DEPS = \
+	$(SELINUX_LIBS) \
+	$(LIBDRM_LIBS) \
+	$(EXPAT_LIBS) \
+	$(GALLIUM_COMMON_LIB_DEPS)
+
 GALLIUM_VDPAU_LIB_DEPS = \
 	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
 	$(top_builddir)/src/gallium/state_trackers/vdpau/libvdpautracker.la \
 	$(VDPAU_LIBS) \
 	$(LIBDRM_LIBS) \
-	-lm \
-	$(CLOCK_LIB) \
-	$(PTHREAD_LIBS) \
-	$(DLOPEN_LIBS)
+	$(GALLIUM_COMMON_LIB_DEPS)
 
 GALLIUM_XVMC_LIB_DEPS = \
 	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
diff --git a/src/gallium/targets/egl-static/Makefile.am b/src/gallium/targets/egl-static/Makefile.am
index 58ecf69..a133cd1 100644
--- a/src/gallium/targets/egl-static/Makefile.am
+++ b/src/gallium/targets/egl-static/Makefile.am
@@ -69,10 +69,7 @@ egl_gallium_la_LIBADD = \
 	$(top_builddir)/src/gallium/state_trackers/egl/libegl.la \
 	$(top_builddir)/src/egl/main/libEGL.la \
 	$(top_builddir)/src/loader/libloader.la \
-	$(CLOCK_LIB) \
-	$(DLOPEN_LIBS) \
-	$(PTHREAD_LIBS) \
-	-lm
+	$(GALLIUM_COMMON_LIB_DEPS)
 
 if HAVE_MESA_LLVM
 AM_LDFLAGS += $(LLVM_LDFLAGS)
@@ -139,10 +136,7 @@ st_GL_la_LIBADD = \
 	$(top_builddir)/src/mesa/libmesagallium.la \
 	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
 	$(top_builddir)/src/mapi/glapi/libglapi.la \
-	$(CLOCK_LIB) \
-	$(DLOPEN_LIBS) \
-	$(PTHREAD_LIBS) \
-	-lm
+	$(GALLIUM_COMMON_LIB_DEPS)
 endif
 endif
 
diff --git a/src/gallium/targets/gbm/Makefile.am b/src/gallium/targets/gbm/Makefile.am
index 22b4826..b659ac4 100644
--- a/src/gallium/targets/gbm/Makefile.am
+++ b/src/gallium/targets/gbm/Makefile.am
@@ -49,10 +49,7 @@ gbm_gallium_drm_la_LIBADD = \
 	$(top_builddir)/src/gallium/state_trackers/gbm/libgbm.la \
 	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
 	$(LIBDRM_LIBS) \
-	-lm \
-	$(CLOCK_LIB) \
-	$(PTHREAD_LIBS) \
-	$(DLOPEN_LIBS)
+	$(GALLIUM_COMMON_LIB_DEPS)
 
 if HAVE_DRI
 gbm_gallium_drm_la_LIBADD += \
diff --git a/src/gallium/targets/pipe-loader/Makefile.am b/src/gallium/targets/pipe-loader/Makefile.am
index fa463ad..a35ef35 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -40,10 +40,7 @@ PIPE_LIBS = \
 	$(top_builddir)/src/gallium/drivers/rbug/librbug.la \
 	$(top_builddir)/src/gallium/drivers/trace/libtrace.la \
 	$(top_builddir)/src/gallium/drivers/galahad/libgalahad.la \
-	-lm \
-	$(CLOCK_LIB) \
-	$(PTHREAD_LIBS) \
-	$(DLOPEN_LIBS)
+	$(GALLIUM_COMMON_LIB_DEPS)
 
 AM_LDFLAGS = \
 	-module \
diff --git a/src/gallium/targets/xa/Makefile.am b/src/gallium/targets/xa/Makefile.am
index 21f29cf..3c0caf9 100644
--- a/src/gallium/targets/xa/Makefile.am
+++ b/src/gallium/targets/xa/Makefile.am
@@ -46,11 +46,7 @@ libxatracker_la_LIBADD = \
 	$(top_builddir)/src/gallium/state_trackers/xa/libxatracker.la \
 	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
 	$(LIBDRM_LIBS) \
-	-lm \
-	$(CLOCK_LIB) \
-	$(PTHREAD_LIBS) \
-	$(DLOPEN_LIBS)
-
+	$(GALLIUM_COMMON_LIB_DEPS)
 
 if HAVE_DRI
 libxatracker_la_LIBADD += \
diff --git a/src/gallium/tests/trivial/Makefile.am b/src/gallium/tests/trivial/Makefile.am
index 15a81b3..9381429 100644
--- a/src/gallium/tests/trivial/Makefile.am
+++ b/src/gallium/tests/trivial/Makefile.am
@@ -16,9 +16,7 @@ LDADD = $(GALLIUM_PIPE_LOADER_CLIENT_LIBS) \
 	$(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la \
 	$(top_builddir)/src/gallium/winsys/sw/null/libws_null.la \
 	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
-	$(DLOPEN_LIBS) \
-	$(PTHREAD_LIBS) \
-	-lm
+	$(GALLIUM_COMMON_LIB_DEPS)
 
 if NEED_PIPE_LOADER_XLIB
 LDADD += \
diff --git a/src/gallium/tests/unit/Makefile.am b/src/gallium/tests/unit/Makefile.am
index c157cc0..9c514cb 100644
--- a/src/gallium/tests/unit/Makefile.am
+++ b/src/gallium/tests/unit/Makefile.am
@@ -14,9 +14,7 @@ LDADD = \
 	$(top_builddir)/src/gallium/drivers/trace/libtrace.la \
 	$(top_builddir)/src/gallium/winsys/sw/null/libws_null.la \
 	$(top_builddir)/src/gallium/drivers/softpipe/libsoftpipe.la \
-	$(DLOPEN_LIBS) \
-	$(PTHREAD_LIBS) \
-	-lm
+	$(GALLIUM_COMMON_LIB_DEPS)
 
 noinst_PROGRAMS = pipe_barrier_test u_cache_test u_half_test \
 	u_format_test u_format_compatible_test translate_test




More information about the mesa-commit mailing list