aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet.am
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet.am')
-rw-r--r--src/vnet.am31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/vnet.am b/src/vnet.am
index 3a1e10d7d8b..3450b102fa8 100644
--- a/src/vnet.am
+++ b/src/vnet.am
@@ -12,6 +12,7 @@
# limitations under the License.
lib_LTLIBRARIES += libvnet.la
+noinst_LTLIBRARIES =
libvnet_la_SOURCES =
libvnet_la_DEPENDENCIES = \
@@ -20,6 +21,7 @@ libvnet_la_DEPENDENCIES = \
libsvmdb.la \
libsvm.la \
libvlibmemory.la
+libvnet_multiversioning_files =
libvnet_la_LIBADD = $(libvnet_la_DEPENDENCIES) -lm -lpthread -ldl -lrt
@@ -126,6 +128,9 @@ libvnet_la_SOURCES += \
vnet/ethernet/p2p_ethernet_input.c \
vnet/ethernet/p2p_ethernet_api.c
+libvnet_multiversioning_files += \
+ vnet/l2/l2_output.c
+
nobase_include_HEADERS += \
vnet/ethernet/arp_packet.h \
vnet/ethernet/error.def \
@@ -1270,6 +1275,32 @@ nobase_include_HEADERS += \
API_FILES += vnet/bier/bier.api
+if CPU_X86_64
+if CC_SUPPORTS_AVX2
+###############################################################
+# AVX2
+###############################################################
+libvnet_avx2_la_SOURCES = $(libvnet_multiversioning_files)
+libvnet_avx2_la_CFLAGS = \
+ $(AM_CFLAGS) @CPU_AVX2_FLAGS@ \
+ -DCLIB_MULTIARCH_VARIANT=avx2
+noinst_LTLIBRARIES += libvnet_avx2.la
+libvnet_la_LIBADD += libvnet_avx2.la
+endif
+
+if CC_SUPPORTS_AVX512
+###############################################################
+# AVX512
+###############################################################
+libvnet_avx512_la_SOURCES = $(libvnet_multiversioning_files)
+libvnet_avx512_la_CFLAGS = \
+ $(AM_CFLAGS) @CPU_AVX512_FLAGS@ \
+ -DCLIB_MULTIARCH_VARIANT=avx512
+noinst_LTLIBRARIES += libvnet_avx512.la
+libvnet_la_LIBADD += libvnet_avx512.la
+endif
+endif
+
########################################
# Test apps
########################################