blob: 25cf14460417676ad2fa05ad8b93e1d94f531b83 [file] [log] [blame]
Damjan Marion7cd468a2016-12-19 23:05:39 +01001# 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
Damjan Marion724f64c2017-01-11 11:11:00 +010014lib_LTLIBRARIES += libvppinfra.la
Damjan Marion7cd468a2016-12-19 23:05:39 +010015
Dave Barach310518e2017-10-30 09:42:54 -040016TESTS =
Damjan Marion7cd468a2016-12-19 23:05:39 +010017
18if ENABLE_TESTS
19TESTS += test_bihash_template \
Dave Barach310518e2017-10-30 09:42:54 -040020 test_bihash_vec88 \
21 test_cuckoo_bihash \
22 test_cuckoo_template\
Damjan Marion7cd468a2016-12-19 23:05:39 +010023 test_dlist \
Damjan Marion7cd468a2016-12-19 23:05:39 +010024 test_elf \
Dave Barachb7f1faa2017-08-29 11:43:37 -040025 test_elog \
Damjan Marion7cd468a2016-12-19 23:05:39 +010026 test_fifo \
27 test_format \
Dave Barachb7f1faa2017-08-29 11:43:37 -040028 test_fpool \
Damjan Marion7cd468a2016-12-19 23:05:39 +010029 test_hash \
30 test_heap \
31 test_longjmp \
32 test_macros \
33 test_md5 \
34 test_mheap \
35 test_pool_iterate \
36 test_ptclosure \
37 test_random \
38 test_random_isaac \
39 test_serialize \
40 test_slist \
41 test_socket \
42 test_time \
43 test_timing_wheel \
Dave Barach8e8f98c2017-02-03 11:58:53 -050044 test_tw_timer \
Damjan Marion7cd468a2016-12-19 23:05:39 +010045 test_vec \
Neale Ranns32e1c012016-11-22 17:07:28 +000046 test_zvec
Damjan Marion7cd468a2016-12-19 23:05:39 +010047endif
48
49noinst_PROGRAMS = $(TESTS)
50check_PROGRAMS = $(TESTS)
51
52test_bihash_template_SOURCES = vppinfra/test_bihash_template.c
Dave Barach310518e2017-10-30 09:42:54 -040053test_bihash_vec88_SOURCES = vppinfra/test_bihash_vec88.c
Klement Sekera470a0112017-03-08 05:21:24 +010054test_cuckoo_template_SOURCES = vppinfra/test_cuckoo_template.c
55test_cuckoo_bihash_SOURCES = vppinfra/test_cuckoo_bihash.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010056test_dlist_SOURCES = vppinfra/test_dlist.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010057test_elf_SOURCES = vppinfra/test_elf.c
Dave Barachb7f1faa2017-08-29 11:43:37 -040058test_elog_SOURCES = vppinfra/test_elog.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010059test_fifo_SOURCES = vppinfra/test_fifo.c
60test_format_SOURCES = vppinfra/test_format.c
Dave Barachb7f1faa2017-08-29 11:43:37 -040061test_fpool_SOURCES = vppinfra/test_fpool.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010062test_hash_SOURCES = vppinfra/test_hash.c
63test_heap_SOURCES = vppinfra/test_heap.c
64test_longjmp_SOURCES = vppinfra/test_longjmp.c
65test_macros_SOURCES = vppinfra/test_macros.c
66test_md5_SOURCES = vppinfra/test_md5.c
67test_mheap_SOURCES = vppinfra/test_mheap.c
68test_pool_iterate_SOURCES = vppinfra/test_pool_iterate.c
69test_ptclosure_SOURCES = vppinfra/test_ptclosure.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010070test_random_isaac_SOURCES = vppinfra/test_random_isaac.c
Dave Barachb7f1faa2017-08-29 11:43:37 -040071test_random_SOURCES = vppinfra/test_random.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010072test_serialize_SOURCES = vppinfra/test_serialize.c
73test_slist_SOURCES = vppinfra/test_slist.c
74test_socket_SOURCES = vppinfra/test_socket.c
75test_time_SOURCES = vppinfra/test_time.c
76test_timing_wheel_SOURCES = vppinfra/test_timing_wheel.c
Dave Barach8e8f98c2017-02-03 11:58:53 -050077test_tw_timer_SOURCES = vppinfra/test_tw_timer.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010078test_vec_SOURCES = vppinfra/test_vec.c
79test_zvec_SOURCES = vppinfra/test_zvec.c
80
81# All unit tests use ASSERT for failure
82# So we'll need -DDEBUG to enable ASSERTs
83test_bihash_template_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Dave Barach310518e2017-10-30 09:42:54 -040084test_bihash_vec88_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Klement Sekera470a0112017-03-08 05:21:24 +010085test_cuckoo_template_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
86test_cuckoo_bihash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Damjan Marion7cd468a2016-12-19 23:05:39 +010087test_dlist_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Damjan Marion7cd468a2016-12-19 23:05:39 +010088test_elf_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Dave Barachb7f1faa2017-08-29 11:43:37 -040089test_elog_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Damjan Marion7cd468a2016-12-19 23:05:39 +010090test_fifo_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
91test_format_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Dave Barachb7f1faa2017-08-29 11:43:37 -040092test_fpool_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Damjan Marion7cd468a2016-12-19 23:05:39 +010093test_hash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
94test_heap_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
95test_longjmp_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
96test_macros_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
97test_md5_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
98test_mheap_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
99test_pool_iterate_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
100test_ptclosure_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
101test_random_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
102test_random_isaac_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Damjan Marion7cd468a2016-12-19 23:05:39 +0100103test_serialize_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
104test_slist_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Dave Barachb7f1faa2017-08-29 11:43:37 -0400105test_socket_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Damjan Marion7cd468a2016-12-19 23:05:39 +0100106test_time_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
107test_timing_wheel_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Dave Barach8e8f98c2017-02-03 11:58:53 -0500108test_tw_timer_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Damjan Marion7cd468a2016-12-19 23:05:39 +0100109test_vec_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
110test_zvec_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
111
112test_bihash_template_LDADD = libvppinfra.la
Dave Barach310518e2017-10-30 09:42:54 -0400113test_bihash_vec88_LDADD = libvppinfra.la
Klement Sekera470a0112017-03-08 05:21:24 +0100114test_cuckoo_template_LDADD = libvppinfra.la
115test_cuckoo_bihash_LDADD = libvppinfra.la
Damjan Marion7cd468a2016-12-19 23:05:39 +0100116test_dlist_LDADD = libvppinfra.la
Damjan Marion7cd468a2016-12-19 23:05:39 +0100117test_elf_LDADD = libvppinfra.la
Dave Barachb7f1faa2017-08-29 11:43:37 -0400118test_elog_LDADD = libvppinfra.la
Damjan Marion7cd468a2016-12-19 23:05:39 +0100119test_fifo_LDADD = libvppinfra.la
120test_format_LDADD = libvppinfra.la
Dave Barachb7f1faa2017-08-29 11:43:37 -0400121test_fpool_LDADD = libvppinfra.la
Damjan Marion7cd468a2016-12-19 23:05:39 +0100122test_hash_LDADD = libvppinfra.la
123test_heap_LDADD = libvppinfra.la
124test_longjmp_LDADD = libvppinfra.la
125test_macros_LDADD = libvppinfra.la
126test_md5_LDADD = libvppinfra.la
127test_mheap_LDADD = libvppinfra.la
128test_pool_iterate_LDADD = libvppinfra.la
129test_ptclosure_LDADD = libvppinfra.la
Damjan Marion7cd468a2016-12-19 23:05:39 +0100130test_random_isaac_LDADD = libvppinfra.la
Dave Barachb7f1faa2017-08-29 11:43:37 -0400131test_random_LDADD = libvppinfra.la
Damjan Marion7cd468a2016-12-19 23:05:39 +0100132test_serialize_LDADD = libvppinfra.la
133test_slist_LDADD = libvppinfra.la
134test_socket_LDADD = libvppinfra.la
135test_time_LDADD = libvppinfra.la -lm
136test_timing_wheel_LDADD = libvppinfra.la -lm
Dave Barach8e8f98c2017-02-03 11:58:53 -0500137test_tw_timer_LDADD = libvppinfra.la
Damjan Marion7cd468a2016-12-19 23:05:39 +0100138test_vec_LDADD = libvppinfra.la
139test_zvec_LDADD = libvppinfra.la
140
141test_bihash_template_LDFLAGS = -static
Dave Barach310518e2017-10-30 09:42:54 -0400142test_bihash_vec88_LDFLAGS = -static
Klement Sekera470a0112017-03-08 05:21:24 +0100143test_cuckoo_template_LDFLAGS = -static
144test_cuckoo_bihash_LDFLAGS = -static -lpthread
Damjan Marion7cd468a2016-12-19 23:05:39 +0100145test_dlist_LDFLAGS = -static
Damjan Marion7cd468a2016-12-19 23:05:39 +0100146test_elf_LDFLAGS = -static
Dave Barachb7f1faa2017-08-29 11:43:37 -0400147test_elog_LDFLAGS = -static
Damjan Marion7cd468a2016-12-19 23:05:39 +0100148test_fifo_LDFLAGS = -static
149test_format_LDFLAGS = -static
Dave Barachb7f1faa2017-08-29 11:43:37 -0400150test_fpool_LDFLAGS = -static
Damjan Marion7cd468a2016-12-19 23:05:39 +0100151test_hash_LDFLAGS = -static
152test_heap_LDFLAGS = -static
153test_longjmp_LDFLAGS = -static
154test_macros_LDFLAGS = -static
155test_md5_LDFLAGS = -static
156test_mheap_LDFLAGS = -static
157test_pool_iterate_LDFLAGS = -static
158test_ptclosure_LDFLAGS = -static
Damjan Marion7cd468a2016-12-19 23:05:39 +0100159test_random_isaac_LDFLAGS = -static
Dave Barachb7f1faa2017-08-29 11:43:37 -0400160test_random_LDFLAGS = -static
Damjan Marion7cd468a2016-12-19 23:05:39 +0100161test_serialize_LDFLAGS = -static
162test_slist_LDFLAGS = -static
163test_socket_LDFLAGS = -static
164test_time_LDFLAGS = -static
165test_timing_wheel_LDFLAGS = -static
Dave Barach8e8f98c2017-02-03 11:58:53 -0500166test_tw_timer_LDFLAGS = -static
Damjan Marion7cd468a2016-12-19 23:05:39 +0100167test_vec_LDFLAGS = -static
168test_zvec_LDFLAGS = -static
169
170# noinst_PROGRAMS += test_vhash
171# test_vhash_SOURCES = vppinfra/test_vhash.c vppinfra/vhash.c
172# test_vhash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
173# test_vhash_LDADD = libvppinfra.la
174# test_vhash_LDFLAGS = -static
175
176nobase_include_HEADERS = \
177 vppinfra/asm_mips.h \
178 vppinfra/asm_x86.h \
179 vppinfra/bihash_8_8.h \
Dave Barach310518e2017-10-30 09:42:54 -0400180 vppinfra/bihash_vec8_8.h \
Dave Barach68b0fb02017-02-28 15:15:56 -0500181 vppinfra/bihash_16_8.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100182 vppinfra/bihash_24_8.h \
Dave Barach68b0fb02017-02-28 15:15:56 -0500183 vppinfra/bihash_48_8.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100184 vppinfra/bihash_template.h \
185 vppinfra/bihash_template.c \
186 vppinfra/bitmap.h \
187 vppinfra/bitops.h \
188 vppinfra/byte_order.h \
189 vppinfra/cache.h \
190 vppinfra/clib.h \
Klement Sekera58eb8662017-06-09 06:06:49 +0200191 vppinfra/clib_error.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100192 vppinfra/cpu.h \
Damjan Marion0f68c792017-04-26 13:05:05 +0200193 vppinfra/crc32.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100194 vppinfra/dlist.h \
195 vppinfra/elf.h \
196 vppinfra/elf_clib.h \
197 vppinfra/elog.h \
198 vppinfra/fheap.h \
199 vppinfra/error.h \
200 vppinfra/error_bootstrap.h \
201 vppinfra/fifo.h \
Damjan Marion56dd5432017-09-08 19:52:02 +0200202 vppinfra/file.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100203 vppinfra/format.h \
204 vppinfra/graph.h \
205 vppinfra/hash.h \
206 vppinfra/heap.h \
Damjan Marion01914ce2017-09-14 19:04:50 +0200207 vppinfra/linux/sysfs.h \
208 vppinfra/linux/syscall.h \
Damjan Marion1927da22017-03-27 17:08:20 +0200209 vppinfra/lock.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100210 vppinfra/longjmp.h \
211 vppinfra/macros.h \
212 vppinfra/math.h \
213 vppinfra/md5.h \
214 vppinfra/mem.h \
215 vppinfra/memcpy_sse3.h \
216 vppinfra/memcpy_avx.h \
217 vppinfra/mhash.h \
218 vppinfra/mheap.h \
219 vppinfra/mheap_bootstrap.h \
220 vppinfra/os.h \
221 vppinfra/pipeline.h \
222 vppinfra/pool.h \
223 vppinfra/ptclosure.h \
224 vppinfra/random.h \
225 vppinfra/random_buffer.h \
226 vppinfra/random_isaac.h \
227 vppinfra/serialize.h \
228 vppinfra/slist.h \
229 vppinfra/smp.h \
230 vppinfra/socket.h \
231 vppinfra/sparse_vec.h \
232 vppinfra/string.h \
233 vppinfra/time.h \
234 vppinfra/timing_wheel.h \
235 vppinfra/timer.h \
Dave Barach8e8f98c2017-02-03 11:58:53 -0500236 vppinfra/tw_timer_2t_1w_2048sl.h \
237 vppinfra/tw_timer_16t_2w_512sl.h \
Dave Barach68b0fb02017-02-28 15:15:56 -0500238 vppinfra/tw_timer_16t_1w_2048sl.h \
Dave Barach4af9ba12017-06-07 15:18:23 -0400239 vppinfra/tw_timer_4t_3w_256sl.h \
240 vppinfra/tw_timer_1t_3w_1024sl_ov.h \
Dave Barach8e8f98c2017-02-03 11:58:53 -0500241 vppinfra/tw_timer_template.h \
Gabriel Ganne613c79f2017-02-15 11:37:53 +0100242 vppinfra/tw_timer_template.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100243 vppinfra/types.h \
244 vppinfra/unix.h \
245 vppinfra/vec.h \
246 vppinfra/vec_bootstrap.h \
247 vppinfra/vector.h \
248 vppinfra/vector_altivec.h \
249 vppinfra/vector_funcs.h \
250 vppinfra/vector_iwmmxt.h \
251 vppinfra/vector_neon.h \
252 vppinfra/vector_sse2.h \
253 vppinfra/valgrind.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100254 vppinfra/xxhash.h \
255 vppinfra/xy.h \
256 vppinfra/zvec.h
257
258CLIB_CORE = \
259 vppinfra/asm_x86.c \
260 vppinfra/backtrace.c \
261 vppinfra/bihash_8_8.h \
Dave Barach310518e2017-10-30 09:42:54 -0400262 vppinfra/bihash_vec8_8.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100263 vppinfra/bihash_24_8.h \
264 vppinfra/bihash_template.h \
265 vppinfra/cpu.c \
266 vppinfra/elf.c \
267 vppinfra/elog.c \
268 vppinfra/error.c \
269 vppinfra/fifo.c \
270 vppinfra/fheap.c \
271 vppinfra/format.c \
Dave Barachb7f1faa2017-08-29 11:43:37 -0400272 vppinfra/pool.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100273 vppinfra/graph.c \
274 vppinfra/hash.c \
275 vppinfra/heap.c \
276 vppinfra/longjmp.S \
277 vppinfra/macros.c \
278 vppinfra/mhash.c \
279 vppinfra/mheap.c \
280 vppinfra/md5.c \
281 vppinfra/mem_mheap.c \
282 vppinfra/ptclosure.c \
283 vppinfra/random.c \
284 vppinfra/random_buffer.c \
285 vppinfra/random_isaac.c \
286 vppinfra/serialize.c \
287 vppinfra/slist.c \
288 vppinfra/std-formats.c \
289 vppinfra/string.c \
290 vppinfra/time.c \
291 vppinfra/timing_wheel.c \
Dave Barach8e8f98c2017-02-03 11:58:53 -0500292 vppinfra/tw_timer_template.h \
293 vppinfra/tw_timer_2t_1w_2048sl.h \
294 vppinfra/tw_timer_2t_1w_2048sl.c \
295 vppinfra/tw_timer_16t_2w_512sl.h \
296 vppinfra/tw_timer_16t_2w_512sl.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500297 vppinfra/tw_timer_16t_1w_2048sl.h \
298 vppinfra/tw_timer_16t_1w_2048sl.c \
Dave Barach4af9ba12017-06-07 15:18:23 -0400299 vppinfra/tw_timer_4t_3w_256sl.h \
300 vppinfra/tw_timer_4t_3w_256sl.c \
301 vppinfra/tw_timer_1t_3w_1024sl_ov.h \
302 vppinfra/tw_timer_1t_3w_1024sl_ov.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100303 vppinfra/unformat.c \
304 vppinfra/vec.c \
305 vppinfra/vector.c \
306 vppinfra/zvec.c
307
308# Core plus Unix additions
309libvppinfra_la_SOURCES = \
310 $(CLIB_CORE) \
311 vppinfra/elf_clib.c \
Damjan Marion01914ce2017-09-14 19:04:50 +0200312 vppinfra/linux/mem.c \
313 vppinfra/linux/sysfs.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100314 vppinfra/socket.c \
315 vppinfra/timer.c \
316 vppinfra/unix-formats.c \
317 vppinfra/unix-misc.c
318
319bin_PROGRAMS = elftool
320
321elftool_SOURCES = tools/elftool/elftool.c
322elftool_CPPFLAGS = $(AM_CPPFLAGS)
323elftool_LDADD = libvppinfra.la -lpthread -lrt -lm
324
325# vi:syntax=automake