summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/Makefile.am
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2017-07-07 13:38:22 -0500
committerTim Rowley <[email protected]>2017-07-19 15:12:07 -0500
commitf42186b01dbc78357ace1bf47feb69696471b580 (patch)
treee9ecf1895f7e77b10e97cb44b5b33579479cea3b /src/gallium/drivers/swr/Makefile.am
parent131b9f644cbe70728ba02878483e22459400bcb4 (diff)
configure/swr: configurable swr architectures
Allow configuration of the SWR architecture depend libraries we build for with --with-swr-archs. Maintains current behavior by defaulting to avx,avx2. Scons changes made to make it still build and work, but without the changes for configuring which architectures. v2: * add missing comma for swr_archs default * check that at least one architecture is enabled * modify loader logic to make it clearer how to add archs Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/Makefile.am')
-rw-r--r--src/gallium/drivers/swr/Makefile.am17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/gallium/drivers/swr/Makefile.am b/src/gallium/drivers/swr/Makefile.am
index 74612280fe7..f38ce7b1d97 100644
--- a/src/gallium/drivers/swr/Makefile.am
+++ b/src/gallium/drivers/swr/Makefile.am
@@ -55,6 +55,14 @@ libmesaswr_la_CXXFLAGS = \
$(SWR_AVX_CXXFLAGS) \
$(COMMON_CXXFLAGS)
+if HAVE_SWR_AVX
+libmesaswr_la_CXXFLAGS += -DHAVE_SWR_AVX
+endif
+
+if HAVE_SWR_AVX2
+libmesaswr_la_CXXFLAGS += -DHAVE_SWR_AVX2
+endif
+
COMMON_SOURCES = \
$(ARCHRAST_CXX_SOURCES) \
$(COMMON_CXX_SOURCES) \
@@ -224,7 +232,10 @@ COMMON_LDFLAGS = \
$(GC_SECTIONS) \
$(NO_UNDEFINED)
-lib_LTLIBRARIES = libswrAVX.la libswrAVX2.la
+lib_LTLIBRARIES =
+
+if HAVE_SWR_AVX
+lib_LTLIBRARIES += libswrAVX.la
libswrAVX_la_CXXFLAGS = \
$(SWR_AVX_CXXFLAGS) \
@@ -236,7 +247,10 @@ libswrAVX_la_SOURCES = \
libswrAVX_la_LDFLAGS = \
$(COMMON_LDFLAGS)
+endif
+if HAVE_SWR_AVX2
+lib_LTLIBRARIES += libswrAVX2.la
libswrAVX2_la_CXXFLAGS = \
$(SWR_AVX2_CXXFLAGS) \
-DKNOB_ARCH=KNOB_ARCH_AVX2 \
@@ -247,6 +261,7 @@ libswrAVX2_la_SOURCES = \
libswrAVX2_la_LDFLAGS = \
$(COMMON_LDFLAGS)
+endif
include $(top_srcdir)/install-gallium-links.mk