summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/xa
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2014-06-21 12:42:03 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2014-06-30 22:27:11 +0100
commit37e640a073f8cd103bb4add7c82579d426a6982b (patch)
treec7945c35dc66dda140011f43d1cf1130715f14c9 /src/gallium/targets/xa
parentc60a4ba7e36f069d6829948ee14d87970f5f39a1 (diff)
downloadexternal_mesa3d-37e640a073f8cd103bb4add7c82579d426a6982b.zip
external_mesa3d-37e640a073f8cd103bb4add7c82579d426a6982b.tar.gz
external_mesa3d-37e640a073f8cd103bb4add7c82579d426a6982b.tar.bz2
targets/xa: provide alternative(static) xa target
Now we can build the xa target (libxatracker) with either static pipe-drivers or shared ones. Currently we default to static. - Remove the unused CFLAGS/CPPFLAGS. - Use GALLIUM_TARGET_CFLAGS where applicable. v2: Update the printout messages at configure. v3: Drop inclusion of the wrapper winsys and softpipe/llvmpipe. Cc: Jakob Bornecrantz <jakob@vmware.com> Cc: Rob Clark <robclark@freedesktop.org> Cc: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'src/gallium/targets/xa')
-rw-r--r--src/gallium/targets/xa/Makefile.am102
-rw-r--r--src/gallium/targets/xa/target.c1
2 files changed, 93 insertions, 10 deletions
diff --git a/src/gallium/targets/xa/Makefile.am b/src/gallium/targets/xa/Makefile.am
index a627040..6a20ae7 100644
--- a/src/gallium/targets/xa/Makefile.am
+++ b/src/gallium/targets/xa/Makefile.am
@@ -22,14 +22,8 @@
include $(top_srcdir)/src/gallium/Automake.inc
-AM_CPPFLAGS = \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/src/gallium/state_trackers/xa \
- -I$(top_srcdir)/src/gallium/winsys
-
AM_CFLAGS = \
- $(GALLIUM_CFLAGS) \
- $(LIBDRM_CFLAGS)
+ $(GALLIUM_TARGET_CFLAGS)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xatracker.pc
@@ -40,11 +34,8 @@ nodist_EXTRA_libxatracker_la_SOURCES = dummy.cpp
libxatracker_la_SOURCES =
libxatracker_la_LIBADD = \
- $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader.la \
$(top_builddir)/src/gallium/state_trackers/xa/libxatracker.la \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
- $(GALLIUM_PIPE_LOADER_WINSYS_LIBS) \
- $(GALLIUM_PIPE_LOADER_LIBS) \
$(LIBDRM_LIBS) \
$(GALLIUM_COMMON_LIB_DEPS)
@@ -59,6 +50,97 @@ libxatracker_la_LDFLAGS += \
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/xa/xa.sym
endif
+if HAVE_GALLIUM_STATIC_TARGETS
+
+STATIC_TARGET_CPPFLAGS =
+STATIC_TARGET_LIB_DEPS = \
+ $(top_builddir)/src/loader/libloader.la
+
+if HAVE_GALLIUM_I915
+STATIC_TARGET_CPPFLAGS += -DGALLIUM_I915
+STATIC_TARGET_LIB_DEPS += \
+ $(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
+ $(top_builddir)/src/gallium/drivers/i915/libi915.la \
+ $(INTEL_LIBS)
+endif
+
+if HAVE_GALLIUM_ILO
+STATIC_TARGET_CPPFLAGS += -DGALLIUM_ILO
+STATIC_TARGET_LIB_DEPS += \
+ $(top_builddir)/src/gallium/winsys/intel/drm/libintelwinsys.la \
+ $(top_builddir)/src/gallium/drivers/ilo/libilo.la \
+ $(INTEL_LIBS)
+endif
+
+if HAVE_GALLIUM_NOUVEAU
+STATIC_TARGET_CPPFLAGS += -DGALLIUM_NOUVEAU
+STATIC_TARGET_LIB_DEPS += \
+ $(top_builddir)/src/gallium/winsys/nouveau/drm/libnouveaudrm.la \
+ $(top_builddir)/src/gallium/drivers/nouveau/libnouveau.la \
+ $(NOUVEAU_LIBS)
+endif
+
+if NEED_RADEON_DRM_WINSYS
+STATIC_TARGET_LIB_DEPS += \
+ $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la
+endif
+
+if HAVE_GALLIUM_RADEON_COMMON
+STATIC_TARGET_LIB_DEPS += \
+ $(top_builddir)/src/gallium/drivers/radeon/libradeon.la
+endif
+
+if HAVE_GALLIUM_R300
+STATIC_TARGET_CPPFLAGS += -DGALLIUM_R300
+STATIC_TARGET_LIB_DEPS += \
+ $(top_builddir)/src/gallium/drivers/r300/libr300.la \
+ $(top_builddir)/src/gallium/drivers/r300/libr300-helper.la \
+ $(RADEON_LIBS)
+endif
+
+if HAVE_GALLIUM_R600
+STATIC_TARGET_CPPFLAGS += -DGALLIUM_R600
+STATIC_TARGET_LIB_DEPS += \
+ $(top_builddir)/src/gallium/drivers/r600/libr600.la \
+ $(RADEON_LIBS)
+endif
+
+if HAVE_GALLIUM_RADEONSI
+STATIC_TARGET_CPPFLAGS += -DGALLIUM_RADEONSI
+STATIC_TARGET_LIB_DEPS += \
+ $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
+ $(RADEON_LIBS)
+endif
+
+if HAVE_GALLIUM_SVGA
+STATIC_TARGET_CPPFLAGS += -DGALLIUM_VMWGFX
+STATIC_TARGET_LIB_DEPS += \
+ $(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
+ $(top_builddir)/src/gallium/drivers/svga/libsvga.la
+endif
+
+if HAVE_GALLIUM_FREEDRENO
+STATIC_TARGET_CPPFLAGS += -DGALLIUM_FREEDRENO
+STATIC_TARGET_LIB_DEPS += \
+ $(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
+ $(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
+ $(FREEDRENO_LIBS)
+
+endif
+
+libxatracker_la_SOURCES += target.c
+libxatracker_la_CPPFLAGS = $(STATIC_TARGET_CPPFLAGS)
+libxatracker_la_LIBADD += $(STATIC_TARGET_LIB_DEPS)
+
+else # HAVE_GALLIUM_STATIC_TARGETS
+
+libxatracker_la_LIBADD += \
+ $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader.la \
+ $(GALLIUM_PIPE_LOADER_WINSYS_LIBS) \
+ $(GALLIUM_PIPE_LOADER_LIBS)
+
+endif # HAVE_GALLIUM_STATIC_TARGETS
+
if HAVE_MESA_LLVM
libxatracker_la_LIBADD += $(LLVM_LIBS)
libxatracker_la_LDFLAGS += $(LLVM_LDFLAGS)
diff --git a/src/gallium/targets/xa/target.c b/src/gallium/targets/xa/target.c
new file mode 100644
index 0000000..fde4a4a
--- /dev/null
+++ b/src/gallium/targets/xa/target.c
@@ -0,0 +1 @@
+#include "target-helpers/inline_drm_helper.h"