avoid using thread local storage for thread index
[vpp.git] / src / plugins / dpdk.am
1 # Copyright (c) 2016 Cisco Systems, Inc.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 vppapitestplugins_LTLIBRARIES += dpdk_test_plugin.la
15 vppplugins_LTLIBRARIES += dpdk_plugin.la
16
17 if ENABLE_DPDK_SHARED
18 dpdk_plugin_la_LDFLAGS = $(AM_LDFLAGS) -ldpdk
19 else
20 dpdk_plugin_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--whole-archive,-l:libdpdk.a,--no-whole-archive
21 endif
22 if WITH_AESNI_MB_LIB
23 dpdk_plugin_la_LDFLAGS += -Wl,--exclude-libs,libIPSec_MB.a,-l:libIPSec_MB.a
24 endif
25 if WITH_ISA_L_CRYPTO_LIB
26 dpdk_plugin_la_LDFLAGS += -Wl,--exclude-libs,libisal_crypto.a,-l:libisal_crypto.a
27 endif
28 dpdk_plugin_la_CFLAGS = $(AM_CFLAGS)
29 if WITH_LIBNUMA
30 dpdk_plugin_la_LDFLAGS += -Wl,-lnuma
31 endif
32
33 dpdk_plugin_la_LDFLAGS += -Wl,-lm,-ldl
34 dpdk_plugin_la_LIBADD =
35
36 dpdk_plugin_la_SOURCES =                                        \
37   dpdk/main.c                                                   \
38   dpdk/buffer.c                                                 \
39   dpdk/thread.c                                                 \
40   dpdk/api/dpdk_api.c                                           \
41   dpdk/device/cli.c                                             \
42   dpdk/device/common.c                                          \
43   dpdk/device/flow.c                                            \
44   dpdk/device/dpdk_priv.h                                       \
45   dpdk/device/device.c                                          \
46   dpdk/device/format.c                                          \
47   dpdk/device/init.c                                            \
48   dpdk/device/node.c                                            \
49   dpdk/hqos/hqos.c                                              \
50   dpdk/ipsec/esp_encrypt.c                                      \
51   dpdk/ipsec/esp_decrypt.c                                      \
52   dpdk/ipsec/crypto_node.c                                      \
53   dpdk/ipsec/cli.c                                              \
54   dpdk/ipsec/ipsec.c                                            \
55   dpdk/api/dpdk_plugin.api.h
56
57 API_FILES += dpdk/api/dpdk.api
58
59 if CPU_X86_64
60 dpdk_multiversioning_sources =                                  \
61         dpdk/buffer.c                                           \
62         dpdk/device/node.c                                      \
63         dpdk/device/device.c
64
65 if CC_SUPPORTS_AVX2
66 ###############################################################
67 # AVX2
68 ###############################################################
69 libdpdk_plugin_avx2_la_SOURCES = $(dpdk_multiversioning_sources)
70 libdpdk_plugin_avx2_la_CFLAGS =                                 \
71         $(AM_CFLAGS)  @CPU_AVX2_FLAGS@                          \
72         -DCLIB_MARCH_VARIANT=avx2
73 noinst_LTLIBRARIES += libdpdk_plugin_avx2.la
74 dpdk_plugin_la_LIBADD += libdpdk_plugin_avx2.la
75 endif
76
77 if CC_SUPPORTS_AVX512
78 ###############################################################
79 # AVX512
80 ###############################################################
81 libdpdk_plugin_avx512_la_SOURCES = $(dpdk_multiversioning_sources)
82 libdpdk_plugin_avx512_la_CFLAGS =                               \
83         $(AM_CFLAGS) @CPU_AVX512_FLAGS@                         \
84         -DCLIB_MARCH_VARIANT=avx512
85 noinst_LTLIBRARIES += libdpdk_plugin_avx512.la
86 dpdk_plugin_la_LIBADD += libdpdk_plugin_avx512.la
87 endif
88 endif
89
90 nobase_include_HEADERS +=                                       \
91   dpdk/device/dpdk.h                                            \
92   dpdk/api/dpdk_all_api_h.h                                     \
93   dpdk/ipsec/ipsec.h
94
95 dpdk_test_plugin_la_SOURCES =                                   \
96   dpdk/api/dpdk_test.c dpdk/api/dpdk_plugin.api.h
97
98 # vi:syntax=automake