summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk.am
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/dpdk.am')
-rw-r--r--src/plugins/dpdk.am32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/plugins/dpdk.am b/src/plugins/dpdk.am
index 905ba2016a3..99abded7cd2 100644
--- a/src/plugins/dpdk.am
+++ b/src/plugins/dpdk.am
@@ -36,6 +36,7 @@ dpdk_plugin_la_LDFLAGS += -Wl,-lnuma
endif
dpdk_plugin_la_LDFLAGS += -Wl,-lm,-ldl
+dpdk_plugin_la_LIBADD =
dpdk_plugin_la_SOURCES = \
dpdk/main.c \
@@ -59,6 +60,37 @@ dpdk_plugin_la_SOURCES = \
API_FILES += dpdk/api/dpdk.api
+if CPU_X86_64
+dpdk_multiversioning_files = \
+ dpdk/buffer.c \
+ dpdk/device/node.c \
+ dpdk/device/device.c
+
+if CC_SUPPORTS_AVX2
+###############################################################
+# AVX2
+###############################################################
+libdpdk_plugin_avx2_la_SOURCES = $(dpdk_multiversioning_files)
+libdpdk_plugin_avx2_la_CFLAGS = \
+ $(AM_CFLAGS) @CPU_AVX2_FLAGS@ \
+ -DCLIB_MULTIARCH_VARIANT=avx2
+noinst_LTLIBRARIES += libdpdk_plugin_avx2.la
+dpdk_plugin_la_LIBADD += libdpdk_plugin_avx2.la
+endif
+
+if CC_SUPPORTS_AVX512
+###############################################################
+# AVX512
+###############################################################
+libdpdk_plugin_avx512_la_SOURCES = $(dpdk_multiversioning_files)
+libdpdk_plugin_avx512_la_CFLAGS = \
+ $(AM_CFLAGS) @CPU_AVX512_FLAGS@ \
+ -DCLIB_MULTIARCH_VARIANT=avx512
+noinst_LTLIBRARIES += libdpdk_plugin_avx512.la
+dpdk_plugin_la_LIBADD += libdpdk_plugin_avx512.la
+endif
+endif
+
nobase_include_HEADERS += \
dpdk/device/dpdk.h \
dpdk/api/dpdk_all_api_h.h \