vppinfra: add AVX512 variant of clib_memcpy
[vpp.git] / src / vppinfra.am
1 # Copyright (c) 2015 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 lib_LTLIBRARIES += libvppinfra.la
15
16 TESTS = 
17
18 if ENABLE_TESTS
19 TESTS  +=  test_bihash_template \
20            test_bihash_vec88 \
21            test_cuckoo_bihash \
22            test_cuckoo_template\
23            test_dlist \
24            test_elf \
25            test_elog \
26            test_fifo \
27            test_format \
28            test_fpool \
29            test_hash \
30            test_heap \
31            test_longjmp \
32            test_macros \
33            test_maplog \
34            test_md5 \
35            test_mheap \
36            test_pool_iterate \
37            test_ptclosure \
38            test_random \
39            test_random_isaac \
40            test_serialize \
41            test_slist \
42            test_socket \
43            test_time \
44            test_timing_wheel \
45            test_tw_timer \
46            test_vec \
47            test_zvec
48 endif
49
50 noinst_PROGRAMS = $(TESTS)
51 check_PROGRAMS  = $(TESTS)
52
53 test_bihash_template_SOURCES = vppinfra/test_bihash_template.c
54 test_bihash_vec88_SOURCES = vppinfra/test_bihash_vec88.c
55 test_cuckoo_template_SOURCES = vppinfra/test_cuckoo_template.c
56 test_cuckoo_bihash_SOURCES = vppinfra/test_cuckoo_bihash.c
57 test_dlist_SOURCES = vppinfra/test_dlist.c
58 test_elf_SOURCES = vppinfra/test_elf.c
59 test_elog_SOURCES = vppinfra/test_elog.c
60 test_fifo_SOURCES = vppinfra/test_fifo.c
61 test_format_SOURCES = vppinfra/test_format.c
62 test_fpool_SOURCES = vppinfra/test_fpool.c
63 test_hash_SOURCES = vppinfra/test_hash.c
64 test_heap_SOURCES = vppinfra/test_heap.c
65 test_longjmp_SOURCES = vppinfra/test_longjmp.c
66 test_macros_SOURCES = vppinfra/test_macros.c
67 test_maplog_SOURCES = vppinfra/test_maplog.c
68 test_md5_SOURCES = vppinfra/test_md5.c
69 test_mheap_SOURCES = vppinfra/test_mheap.c
70 test_pool_iterate_SOURCES = vppinfra/test_pool_iterate.c
71 test_ptclosure_SOURCES = vppinfra/test_ptclosure.c
72 test_random_isaac_SOURCES = vppinfra/test_random_isaac.c
73 test_random_SOURCES = vppinfra/test_random.c
74 test_serialize_SOURCES = vppinfra/test_serialize.c
75 test_slist_SOURCES = vppinfra/test_slist.c
76 test_socket_SOURCES = vppinfra/test_socket.c
77 test_time_SOURCES = vppinfra/test_time.c
78 test_timing_wheel_SOURCES = vppinfra/test_timing_wheel.c
79 test_tw_timer_SOURCES = vppinfra/test_tw_timer.c
80 test_vec_SOURCES = vppinfra/test_vec.c
81 test_zvec_SOURCES = vppinfra/test_zvec.c
82
83 # All unit tests use ASSERT for failure
84 # So we'll need -DDEBUG to enable ASSERTs
85 test_bihash_template_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
86 test_bihash_vec88_CPPFLAGS =    $(AM_CPPFLAGS) -DCLIB_DEBUG
87 test_cuckoo_template_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
88 test_cuckoo_bihash_CPPFLAGS =   $(AM_CPPFLAGS) -DCLIB_DEBUG
89 test_dlist_CPPFLAGS =   $(AM_CPPFLAGS) -DCLIB_DEBUG
90 test_elf_CPPFLAGS =     $(AM_CPPFLAGS) -DCLIB_DEBUG
91 test_elog_CPPFLAGS =    $(AM_CPPFLAGS) -DCLIB_DEBUG
92 test_fifo_CPPFLAGS =    $(AM_CPPFLAGS) -DCLIB_DEBUG
93 test_format_CPPFLAGS =  $(AM_CPPFLAGS) -DCLIB_DEBUG
94 test_fpool_CPPFLAGS =   $(AM_CPPFLAGS) -DCLIB_DEBUG
95 test_hash_CPPFLAGS =    $(AM_CPPFLAGS) -DCLIB_DEBUG
96 test_heap_CPPFLAGS =    $(AM_CPPFLAGS) -DCLIB_DEBUG
97 test_longjmp_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
98 test_macros_CPPFLAGS =  $(AM_CPPFLAGS) -DCLIB_DEBUG
99 test_maplog_CPPFLAGS =  $(AM_CPPFLAGS) -DCLIB_DEBUG
100 test_md5_CPPFLAGS =     $(AM_CPPFLAGS) -DCLIB_DEBUG
101 test_mheap_CPPFLAGS =   $(AM_CPPFLAGS) -DCLIB_DEBUG
102 test_pool_iterate_CPPFLAGS =    $(AM_CPPFLAGS) -DCLIB_DEBUG
103 test_ptclosure_CPPFLAGS =       $(AM_CPPFLAGS) -DCLIB_DEBUG
104 test_random_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
105 test_random_isaac_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
106 test_serialize_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
107 test_slist_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
108 test_socket_CPPFLAGS =  $(AM_CPPFLAGS) -DCLIB_DEBUG
109 test_time_CPPFLAGS =    $(AM_CPPFLAGS) -DCLIB_DEBUG
110 test_timing_wheel_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
111 test_tw_timer_CPPFLAGS =        $(AM_CPPFLAGS) -DCLIB_DEBUG
112 test_vec_CPPFLAGS =     $(AM_CPPFLAGS) -DCLIB_DEBUG
113 test_zvec_CPPFLAGS =    $(AM_CPPFLAGS) -DCLIB_DEBUG
114
115 test_bihash_template_LDADD =    libvppinfra.la
116 test_bihash_vec88_LDADD =       libvppinfra.la
117 test_cuckoo_template_LDADD =    libvppinfra.la
118 test_cuckoo_bihash_LDADD =      libvppinfra.la
119 test_dlist_LDADD =      libvppinfra.la
120 test_elf_LDADD =        libvppinfra.la
121 test_elog_LDADD =       libvppinfra.la
122 test_fifo_LDADD =       libvppinfra.la
123 test_format_LDADD =     libvppinfra.la
124 test_fpool_LDADD =      libvppinfra.la
125 test_hash_LDADD =       libvppinfra.la
126 test_heap_LDADD =       libvppinfra.la
127 test_longjmp_LDADD =    libvppinfra.la
128 test_macros_LDADD =     libvppinfra.la
129 test_maplog_LDADD =     libvppinfra.la
130 test_md5_LDADD =        libvppinfra.la
131 test_mheap_LDADD =      libvppinfra.la
132 test_pool_iterate_LDADD =       libvppinfra.la
133 test_ptclosure_LDADD =  libvppinfra.la
134 test_random_isaac_LDADD =       libvppinfra.la
135 test_random_LDADD =     libvppinfra.la
136 test_serialize_LDADD =  libvppinfra.la
137 test_slist_LDADD =      libvppinfra.la
138 test_socket_LDADD =     libvppinfra.la
139 test_time_LDADD =       libvppinfra.la -lm
140 test_timing_wheel_LDADD =       libvppinfra.la -lm
141 test_tw_timer_LDADD =   libvppinfra.la
142 test_vec_LDADD =        libvppinfra.la
143 test_zvec_LDADD =       libvppinfra.la
144
145 test_bihash_template_LDFLAGS = -static
146 test_bihash_vec88_LDFLAGS = -static
147 test_cuckoo_template_LDFLAGS = -static
148 test_cuckoo_bihash_LDFLAGS = -static -lpthread
149 test_dlist_LDFLAGS = -static
150 test_elf_LDFLAGS = -static
151 test_elog_LDFLAGS = -static
152 test_fifo_LDFLAGS = -static
153 test_format_LDFLAGS = -static
154 test_fpool_LDFLAGS = -static
155 test_hash_LDFLAGS = -static
156 test_heap_LDFLAGS = -static
157 test_longjmp_LDFLAGS = -static
158 test_macros_LDFLAGS = -static
159 test_maplog_LDFLAGS = -static
160 test_md5_LDFLAGS = -static
161 test_mheap_LDFLAGS = -static
162 test_pool_iterate_LDFLAGS = -static
163 test_ptclosure_LDFLAGS = -static
164 test_random_isaac_LDFLAGS = -static
165 test_random_LDFLAGS = -static
166 test_serialize_LDFLAGS = -static
167 test_slist_LDFLAGS = -static
168 test_socket_LDFLAGS = -static
169 test_time_LDFLAGS = -static
170 test_timing_wheel_LDFLAGS = -static
171 test_tw_timer_LDFLAGS = -static
172 test_vec_LDFLAGS = -static
173 test_zvec_LDFLAGS = -static
174
175 # noinst_PROGRAMS += test_vhash
176 # test_vhash_SOURCES = vppinfra/test_vhash.c vppinfra/vhash.c
177 # test_vhash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
178 # test_vhash_LDADD = libvppinfra.la
179 # test_vhash_LDFLAGS = -static
180
181 nobase_include_HEADERS = \
182   vppinfra/asm_mips.h \
183   vppinfra/asm_x86.h \
184   vppinfra/bihash_8_8.h \
185   vppinfra/bihash_vec8_8.h \
186   vppinfra/bihash_16_8.h \
187   vppinfra/bihash_24_8.h \
188   vppinfra/bihash_48_8.h \
189   vppinfra/bihash_template.h \
190   vppinfra/bihash_template.c \
191   vppinfra/bitmap.h \
192   vppinfra/bitops.h \
193   vppinfra/byte_order.h \
194   vppinfra/cache.h \
195   vppinfra/clib.h \
196   vppinfra/clib_error.h \
197   vppinfra/cpu.h \
198   vppinfra/crc32.h \
199   vppinfra/dlist.h \
200   vppinfra/elf.h \
201   vppinfra/elf_clib.h \
202   vppinfra/elog.h \
203   vppinfra/fheap.h \
204   vppinfra/error.h \
205   vppinfra/error_bootstrap.h \
206   vppinfra/fifo.h \
207   vppinfra/file.h \
208   vppinfra/format.h \
209   vppinfra/graph.h \
210   vppinfra/hash.h \
211   vppinfra/heap.h \
212   vppinfra/linux/sysfs.h \
213   vppinfra/linux/syscall.h \
214   vppinfra/lock.h \
215   vppinfra/longjmp.h \
216   vppinfra/macros.h \
217   vppinfra/maplog.h \
218   vppinfra/math.h \
219   vppinfra/md5.h \
220   vppinfra/mem.h \
221   vppinfra/memcpy_sse3.h \
222   vppinfra/memcpy_avx2.h \
223   vppinfra/memcpy_avx512.h \
224   vppinfra/mhash.h \
225   vppinfra/mheap.h \
226   vppinfra/mheap_bootstrap.h \
227   vppinfra/os.h \
228   vppinfra/pipeline.h \
229   vppinfra/pool.h \
230   vppinfra/ptclosure.h \
231   vppinfra/random.h \
232   vppinfra/random_buffer.h \
233   vppinfra/random_isaac.h \
234   vppinfra/serialize.h \
235   vppinfra/slist.h \
236   vppinfra/smp.h \
237   vppinfra/socket.h \
238   vppinfra/sparse_vec.h \
239   vppinfra/string.h \
240   vppinfra/time.h \
241   vppinfra/timing_wheel.h \
242   vppinfra/timer.h \
243   vppinfra/tw_timer_2t_1w_2048sl.h \
244   vppinfra/tw_timer_16t_2w_512sl.h \
245   vppinfra/tw_timer_16t_1w_2048sl.h \
246   vppinfra/tw_timer_4t_3w_256sl.h \
247   vppinfra/tw_timer_1t_3w_1024sl_ov.h \
248   vppinfra/tw_timer_template.h \
249   vppinfra/tw_timer_template.c \
250   vppinfra/types.h \
251   vppinfra/unix.h \
252   vppinfra/vec.h \
253   vppinfra/vec_bootstrap.h \
254   vppinfra/vector.h \
255   vppinfra/vector_altivec.h \
256   vppinfra/vector_funcs.h \
257   vppinfra/vector_iwmmxt.h \
258   vppinfra/vector_neon.h \
259   vppinfra/vector_sse2.h \
260   vppinfra/valgrind.h \
261   vppinfra/xxhash.h \
262   vppinfra/xy.h \
263   vppinfra/zvec.h
264
265 CLIB_CORE = \
266   vppinfra/asm_x86.c \
267   vppinfra/backtrace.c \
268   vppinfra/bihash_8_8.h \
269   vppinfra/bihash_vec8_8.h \
270   vppinfra/bihash_24_8.h \
271   vppinfra/bihash_template.h \
272   vppinfra/cpu.c \
273   vppinfra/elf.c \
274   vppinfra/elog.c \
275   vppinfra/error.c \
276   vppinfra/fifo.c \
277   vppinfra/fheap.c \
278   vppinfra/format.c \
279   vppinfra/pool.c \
280   vppinfra/graph.c \
281   vppinfra/hash.c \
282   vppinfra/heap.c \
283   vppinfra/longjmp.S \
284   vppinfra/macros.c \
285   vppinfra/mhash.c \
286   vppinfra/mheap.c \
287   vppinfra/md5.c \
288   vppinfra/mem_mheap.c \
289   vppinfra/ptclosure.c \
290   vppinfra/random.c \
291   vppinfra/random_buffer.c \
292   vppinfra/random_isaac.c \
293   vppinfra/serialize.c \
294   vppinfra/slist.c \
295   vppinfra/std-formats.c \
296   vppinfra/string.c \
297   vppinfra/time.c \
298   vppinfra/timing_wheel.c \
299   vppinfra/tw_timer_template.h \
300   vppinfra/tw_timer_2t_1w_2048sl.h \
301   vppinfra/tw_timer_2t_1w_2048sl.c \
302   vppinfra/tw_timer_16t_2w_512sl.h \
303   vppinfra/tw_timer_16t_2w_512sl.c \
304   vppinfra/tw_timer_16t_1w_2048sl.h \
305   vppinfra/tw_timer_16t_1w_2048sl.c \
306   vppinfra/tw_timer_4t_3w_256sl.h \
307   vppinfra/tw_timer_4t_3w_256sl.c \
308   vppinfra/tw_timer_1t_3w_1024sl_ov.h \
309   vppinfra/tw_timer_1t_3w_1024sl_ov.c \
310   vppinfra/unformat.c \
311   vppinfra/vec.c \
312   vppinfra/vector.c \
313   vppinfra/zvec.c
314
315 # Core plus Unix additions
316 libvppinfra_la_SOURCES =                        \
317   $(CLIB_CORE)                                  \
318   vppinfra/elf_clib.c                           \
319   vppinfra/linux/mem.c                          \
320   vppinfra/linux/sysfs.c                        \
321   vppinfra/maplog.c                             \
322   vppinfra/socket.c                             \
323   vppinfra/timer.c                              \
324   vppinfra/unix-formats.c                       \
325   vppinfra/unix-misc.c
326
327 bin_PROGRAMS = elftool
328
329 elftool_SOURCES = tools/elftool/elftool.c
330 elftool_CPPFLAGS = $(AM_CPPFLAGS)
331 elftool_LDADD = libvppinfra.la -lpthread -lrt -lm
332
333 # vi:syntax=automake