summaryrefslogtreecommitdiffstats
path: root/src/plugins/memif.am
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-11-23 17:19:08 +0100
committerDamjan Marion <damarion@cisco.com>2017-11-23 17:23:18 +0100
commite9890ba546876aca343ae676b3c8f3c8d210829d (patch)
tree13425395486b51e0dd0c4cbc37e658e4bfee9424 /src/plugins/memif.am
parentb328f36d08b739a1ec0c6b777431be3fefa7c3cb (diff)
memif: multiversioning
Change-Id: I881551e6c13503a71ae29a7a58bde4d193745d55 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/memif.am')
-rw-r--r--src/plugins/memif.am31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/plugins/memif.am b/src/plugins/memif.am
index 15147e77621..6e9aa779155 100644
--- a/src/plugins/memif.am
+++ b/src/plugins/memif.am
@@ -14,6 +14,7 @@
vppplugins_LTLIBRARIES += memif_plugin.la
vppapitestplugins_LTLIBRARIES += memif_test_plugin.la
+memif_plugin_la_LIBADD =
memif_plugin_la_SOURCES = memif/memif.c \
memif/memif_api.c \
memif/cli.c \
@@ -34,4 +35,34 @@ nobase_apiinclude_HEADERS += \
API_FILES += memif/memif.api
+if CPU_X86_64
+memif_multiversioning_files = \
+ memif/node.c \
+ memif/device.c
+
+if CC_SUPPORTS_AVX2
+###############################################################
+# AVX2
+###############################################################
+libmemif_plugin_avx2_la_SOURCES = $(memif_multiversioning_files)
+libmemif_plugin_avx2_la_CFLAGS = \
+ $(AM_CFLAGS) @CPU_AVX2_FLAGS@ \
+ -DCLIB_MULTIARCH_VARIANT=avx2
+noinst_LTLIBRARIES += libmemif_plugin_avx2.la
+memif_plugin_la_LIBADD += libmemif_plugin_avx2.la
+endif
+
+if CC_SUPPORTS_AVX512
+###############################################################
+# AVX512
+###############################################################
+libmemif_plugin_avx512_la_SOURCES = $(memif_multiversioning_files)
+libmemif_plugin_avx512_la_CFLAGS = \
+ $(AM_CFLAGS) @CPU_AVX512_FLAGS@ \
+ -DCLIB_MULTIARCH_VARIANT=avx512
+noinst_LTLIBRARIES += libmemif_plugin_avx512.la
+memif_plugin_la_LIBADD += libmemif_plugin_avx512.la
+endif
+endif
+
# vi:syntax=automake