acl-plugin: refactor to introduce multiarch dataplane functions
[vpp.git] / src / plugins / acl.am
1 # Copyright (c) 2016 Cisco and/or its affiliates.
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 += acl_test_plugin.la
15 vppplugins_LTLIBRARIES += acl_plugin.la
16
17 acl_plugin_la_LDFLAGS = $(AM_LDFLAGS)
18 acl_plugin_la_LDFLAGS += -Wl,-lm,-ldl
19
20
21
22 acl_plugin_la_LIBADD =
23
24 acl_plugin_la_SOURCES =                         \
25         acl/acl.c                               \
26         acl/hash_lookup.c                       \
27         acl/lookup_context.c                    \
28         acl/sess_mgmt_node.c                    \
29         acl/dataplane_node.c                    \
30         acl/l2sess.h                            \
31         acl/manual_fns.h                        \
32         acl/acl_plugin.api.h
33
34 API_FILES += acl/acl.api
35
36 if CPU_X86_64
37 acl_multiversioning_files =                                    \
38         acl/dataplane_node.c
39
40
41 if CC_SUPPORTS_AVX2
42 ###############################################################
43 # AVX2
44 ###############################################################
45 libacl_plugin_avx2_la_SOURCES = $(acl_multiversioning_files)
46 libacl_plugin_avx2_la_CFLAGS =                                 \
47         $(AM_CFLAGS)  @CPU_AVX2_FLAGS@                          \
48         -DCLIB_MULTIARCH_VARIANT=avx2
49 noinst_LTLIBRARIES += libacl_plugin_avx2.la
50 acl_plugin_la_LIBADD += libacl_plugin_avx2.la
51 endif
52
53 if CC_SUPPORTS_AVX512
54 ###############################################################
55 # AVX512
56 ###############################################################
57 libacl_plugin_avx512_la_SOURCES = $(acl_multiversioning_files)
58 libacl_plugin_avx512_la_CFLAGS =                               \
59         $(AM_CFLAGS) @CPU_AVX512_FLAGS@                         \
60         -DCLIB_MULTIARCH_VARIANT=avx512
61 noinst_LTLIBRARIES += libacl_plugin_avx512.la
62 acl_plugin_la_LIBADD += libacl_plugin_avx512.la
63 endif
64 endif
65
66 nobase_apiinclude_HEADERS +=                    \
67   acl/acl_all_api_h.h                           \
68   acl/acl_msg_enum.h                            \
69   acl/manual_fns.h                              \
70   acl/acl.api.h
71
72 acl_test_plugin_la_SOURCES = acl/acl_test.c acl/acl_plugin.api.h acl/acl_all_api.h
73
74 # vi:syntax=automake