automake: introduce GALLIUM_COMMON_LIB_DEPS
authorEmil Velikov <emil.l.velikov@gmail.com>
Tue, 1 Apr 2014 01:34:08 +0000 (02:34 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 5 Apr 2014 12:00:02 +0000 (13:00 +0100)
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@freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
src/gallium/Automake.inc
src/gallium/targets/egl-static/Makefile.am
src/gallium/targets/gbm/Makefile.am
src/gallium/targets/pipe-loader/Makefile.am
src/gallium/targets/xa/Makefile.am
src/gallium/tests/trivial/Makefile.am
src/gallium/tests/unit/Makefile.am

index 7504056565be17b3b87c17d4724b0b9029e1115e..7a10a77fa97636edf6774cc5d4f87c9cee064dad 100644 (file)
@@ -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 \
index 58ecf697ce945adfb479ad6816b8694061eac570..a133cd1b6c13d0275c8c3fe8aa863c419cfa598b 100644 (file)
@@ -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
 
index 22b4826391e14095cbf1647e9bf8891106ef8bb9..b659ac436424a0adc72a7de0dbc5abf6f1694bb8 100644 (file)
@@ -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 += \
index fa463addcc5f25337fae3077ad6945ce14f2546d..a35ef358a50698c103f0af6fd1f0d7823e5da235 100644 (file)
@@ -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 \
index 21f29cfa65e38ccd9d950111cb04bd75fd5a8eea..3c0caf97a1881e281bf3b0d0956f29a4b201c5a0 100644 (file)
@@ -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 += \
index 15a81b3a696eae13720e01d651dc1ac12d4d5192..9381429bd6cb2ac57e193a068f0fe5dea2199e79 100644 (file)
@@ -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 += \
index c157cc026dad6e3aabdff56e7152bbf2432460c5..9c514cb8eaf51fb563e00085b7832b75662f4c7d 100644 (file)
@@ -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