gallium/radeon: link in libradeon.la at target level
authorEmil Velikov <emil.l.velikov@gmail.com>
Sat, 10 May 2014 13:35:08 +0000 (14:35 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 15 May 2014 16:32:30 +0000 (17:32 +0100)
It makes more sense to link the core and common parts of the driver as the
target is build. Additionally this will help us drop duplicating symbols
for targets that static link mulitple pipe-drivers. Only egl-static needs
that currently with more to come.

To simplify things a bit add HAVE_GALLIUM_RADEON_COMMON variable.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
13 files changed:
configure.ac
src/gallium/drivers/Makefile.am
src/gallium/drivers/r600/Makefile.am
src/gallium/drivers/radeonsi/Makefile.am
src/gallium/targets/egl-static/Makefile.am
src/gallium/targets/pipe-loader/Makefile.am
src/gallium/targets/r600/dri/Makefile.am
src/gallium/targets/r600/omx/Makefile.am
src/gallium/targets/r600/vdpau/Makefile.am
src/gallium/targets/r600/xvmc/Makefile.am
src/gallium/targets/radeonsi/dri/Makefile.am
src/gallium/targets/radeonsi/omx/Makefile.am
src/gallium/targets/radeonsi/vdpau/Makefile.am

index d3e96de976bddea73b66ac3192ea3ee41466c384..4e4d76155fbb066d33a0b78571ca37f1ce01a478 100644 (file)
@@ -1967,6 +1967,8 @@ AM_CONDITIONAL(HAVE_GALLIUM_ILO, test "x$HAVE_GALLIUM_ILO" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_R300, test "x$HAVE_GALLIUM_R300" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_R600, test "x$HAVE_GALLIUM_R600" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_RADEONSI, test "x$HAVE_GALLIUM_RADEONSI" = xyes)
+AM_CONDITIONAL(HAVE_GALLIUM_RADEON_COMMON, test "x$HAVE_GALLIUM_R600" = xyes -o \
+                                                "x$HAVE_GALLIUM_RADEONSI" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_NOUVEAU, test "x$HAVE_GALLIUM_NOUVEAU" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_FREEDRENO, test "x$HAVE_GALLIUM_FREEDRENO" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_SOFTPIPE, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes)
index f8baa3cf92c4a23249827603eefbef32a426d74b..3d53cade7b86263c8fb302659b54a2126b7f0fbe 100644 (file)
@@ -5,22 +5,6 @@ SUBDIRS = . galahad identity noop trace rbug
 
 ################################################################################
 
-if HAVE_GALLIUM_R600
-
-SUBDIRS += radeon
-
-else
-
-if HAVE_GALLIUM_RADEONSI
-
-SUBDIRS += radeon
-
-endif
-
-endif
-
-################################################################################
-
 if HAVE_GALLIUM_FREEDRENO
 
 SUBDIRS += freedreno
@@ -61,6 +45,14 @@ endif
 
 ################################################################################
 
+if HAVE_GALLIUM_RADEON_COMMON
+
+SUBDIRS += radeon
+
+endif
+
+################################################################################
+
 if HAVE_GALLIUM_R300
 
 SUBDIRS += r300
index be8635d26e24ac0dc63715f4be312d86bc21216f..30e098e1770562c0b7b09ac3801b1fb963cbec34 100644 (file)
@@ -17,8 +17,6 @@ libr600_la_SOURCES = \
        $(C_SOURCES) \
        $(CXX_SOURCES)
 
-libr600_la_LIBADD = ../radeon/libradeon.la
-
 if NEED_RADEON_LLVM
 
 AM_CFLAGS += \
index f409f7e3bc4dec294db4d08d8bc4e1f41399c4b4..926b2032c8a1bc37060c973d180937449f82a377 100644 (file)
@@ -32,5 +32,3 @@ AM_CFLAGS = \
 noinst_LTLIBRARIES = libradeonsi.la
 
 libradeonsi_la_SOURCES = $(C_SOURCES)
-libradeonsi_la_LIBADD = \
-       ../radeon/libradeon.la
index 1aa5d37b7f03b1dff492c272a0faf6a4e9cc1c14..332b38db062a0356ae46c6eb410e4ad42339a41f 100644 (file)
@@ -183,6 +183,11 @@ egl_gallium_la_LIBADD += \
        $(NOUVEAU_LIBS)
 endif
 
+if HAVE_GALLIUM_RADEON_COMMON
+egl_gallium_la_LIBADD += \
+       $(top_builddir)/src/gallium/drivers/radeon/libradeon.la
+endif
+
 if HAVE_GALLIUM_R300
 AM_CPPFLAGS += -D_EGL_PIPE_R300=1
 egl_gallium_la_LIBADD += \
index a1c7d251b5aaebaeb904230a2587442e80c8bac6..328069416d19cdeae1e4d4ed72ae4aba9308982d 100644 (file)
@@ -107,6 +107,7 @@ nodist_EXTRA_pipe_r600_la_SOURCES = dummy.cpp
 pipe_r600_la_LIBADD = \
        $(PIPE_LIBS) \
        $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
+       $(top_builddir)/src/gallium/drivers/radeon/libradeon.la \
        $(top_builddir)/src/gallium/drivers/r600/libr600.la \
        $(LIBDRM_LIBS) \
        $(RADEON_LIBS)
@@ -121,6 +122,7 @@ nodist_EXTRA_pipe_radeonsi_la_SOURCES = dummy.cpp
 pipe_radeonsi_la_LIBADD = \
        $(PIPE_LIBS) \
        $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
+       $(top_builddir)/src/gallium/drivers/radeon/libradeon.la \
        $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
        $(LIBDRM_LIBS) \
        $(RADEON_LIBS)
index e13275ee2304460b748b7c2c45275ef875e5488c..8e3e5619f247caf344cdfcb3f22057211ef8ac1e 100644 (file)
@@ -42,6 +42,7 @@ r600_dri_la_LDFLAGS = \
 
 r600_dri_la_LIBADD = \
        $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
+       $(top_builddir)/src/gallium/drivers/radeon/libradeon.la \
        $(top_builddir)/src/gallium/drivers/r600/libr600.la \
        $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
        $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
index e96027eb2be08e74f37587a89acdc8cc12560754..d2470eaf72c2d2e2863a89355656b46ea9105602 100644 (file)
@@ -36,6 +36,7 @@ libomx_r600_la_SOURCES = \
 libomx_r600_la_LDFLAGS = $(GALLIUM_OMX_LINKER_FLAGS)
 
 libomx_r600_la_LIBADD = \
+       $(top_builddir)/src/gallium/drivers/radeon/libradeon.la \
        $(top_builddir)/src/gallium/drivers/r600/libr600.la \
        $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
        $(GALLIUM_OMX_LIB_DEPS) \
index b212024b752810ac83dd6cf57b54fc4aa2d6091e..8125e2d61c63628dd816af2552d34c9309e5bbaa 100644 (file)
@@ -38,6 +38,7 @@ libvdpau_r600_la_LDFLAGS = \
        -Wl,--dynamic-list=$(srcdir)/../../r300/dri/radeon.dyn
 
 libvdpau_r600_la_LIBADD = \
+       $(top_builddir)/src/gallium/drivers/radeon/libradeon.la \
        $(top_builddir)/src/gallium/drivers/r600/libr600.la \
        $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
        $(GALLIUM_VDPAU_LIB_DEPS) \
index a6c22f4b1e2d17e25ad043b03552dd137925bcc1..3e32f86d42c7e32a5f91dd48a582d3a7325e1fa4 100644 (file)
@@ -37,6 +37,7 @@ libXvMCr600_la_LDFLAGS = \
        $(GALLIUM_XVMC_LINKER_FLAGS)
 
 libXvMCr600_la_LIBADD = \
+       $(top_builddir)/src/gallium/drivers/radeon/libradeon.la \
        $(top_builddir)/src/gallium/drivers/r600/libr600.la \
        $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
        $(GALLIUM_XVMC_LIB_DEPS) \
index c9910dd669f2284cff0b686dc67ae2cd7afda600..470b21309078c0b79755da976cdddb37acba6893 100644 (file)
@@ -42,6 +42,7 @@ radeonsi_dri_la_LDFLAGS = \
 
 radeonsi_dri_la_LIBADD = \
        $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
+       $(top_builddir)/src/gallium/drivers/radeon/libradeon.la \
        $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
        $(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
        $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
index 2cfc2703c2538d1f977ab016fb89f680909d2088..6d6066fe335ec8ed4485dded78078b0511d9f3c9 100644 (file)
@@ -36,6 +36,7 @@ libomx_radeonsi_la_SOURCES = \
 libomx_radeonsi_la_LDFLAGS = $(GALLIUM_OMX_LINKER_FLAGS)
 
 libomx_radeonsi_la_LIBADD = \
+       $(top_builddir)/src/gallium/drivers/radeon/libradeon.la \
        $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
        $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
        $(GALLIUM_OMX_LIB_DEPS) \
index 975ae7884b7927e39d9ec741e39cd81ffb1a0d48..9ed40e65b0bb703739705274d47ad2be55be699f 100644 (file)
@@ -39,6 +39,7 @@ libvdpau_radeonsi_la_LDFLAGS = \
 
 
 libvdpau_radeonsi_la_LIBADD = \
+       $(top_builddir)/src/gallium/drivers/radeon/libradeon.la \
        $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
        $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
        $(GALLIUM_VDPAU_LIB_DEPS) \