blob: 4b9f0c294475b6039589f762e94a4a12d41c7ac5 [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
16TESTS =
17
18if ENABLE_TESTS
19TESTS += test_bihash_template \
20 test_dlist \
21 test_elog \
22 test_elf \
23 test_fifo \
24 test_format \
25 test_hash \
26 test_heap \
27 test_longjmp \
28 test_macros \
29 test_md5 \
30 test_mheap \
31 test_pool_iterate \
32 test_ptclosure \
33 test_random \
34 test_random_isaac \
35 test_serialize \
36 test_slist \
37 test_socket \
38 test_time \
39 test_timing_wheel \
Dave Barach8e8f98c2017-02-03 11:58:53 -050040 test_tw_timer \
Damjan Marion7cd468a2016-12-19 23:05:39 +010041 test_vec \
Neale Ranns32e1c012016-11-22 17:07:28 +000042 test_zvec
Damjan Marion7cd468a2016-12-19 23:05:39 +010043endif
44
45noinst_PROGRAMS = $(TESTS)
46check_PROGRAMS = $(TESTS)
47
48test_bihash_template_SOURCES = vppinfra/test_bihash_template.c
49test_dlist_SOURCES = vppinfra/test_dlist.c
50test_elog_SOURCES = vppinfra/test_elog.c
51test_elf_SOURCES = vppinfra/test_elf.c
52test_fifo_SOURCES = vppinfra/test_fifo.c
53test_format_SOURCES = vppinfra/test_format.c
54test_hash_SOURCES = vppinfra/test_hash.c
55test_heap_SOURCES = vppinfra/test_heap.c
56test_longjmp_SOURCES = vppinfra/test_longjmp.c
57test_macros_SOURCES = vppinfra/test_macros.c
58test_md5_SOURCES = vppinfra/test_md5.c
59test_mheap_SOURCES = vppinfra/test_mheap.c
60test_pool_iterate_SOURCES = vppinfra/test_pool_iterate.c
61test_ptclosure_SOURCES = vppinfra/test_ptclosure.c
62test_random_SOURCES = vppinfra/test_random.c
63test_random_isaac_SOURCES = vppinfra/test_random_isaac.c
64test_serialize_SOURCES = vppinfra/test_serialize.c
65test_slist_SOURCES = vppinfra/test_slist.c
66test_socket_SOURCES = vppinfra/test_socket.c
67test_time_SOURCES = vppinfra/test_time.c
68test_timing_wheel_SOURCES = vppinfra/test_timing_wheel.c
Dave Barach8e8f98c2017-02-03 11:58:53 -050069test_tw_timer_SOURCES = vppinfra/test_tw_timer.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010070test_vec_SOURCES = vppinfra/test_vec.c
71test_zvec_SOURCES = vppinfra/test_zvec.c
72
73# All unit tests use ASSERT for failure
74# So we'll need -DDEBUG to enable ASSERTs
75test_bihash_template_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
76test_dlist_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
77test_elog_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
78test_elf_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
79test_fifo_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
80test_format_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
81test_hash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
82test_heap_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
83test_longjmp_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
84test_macros_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
85test_md5_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
86test_mheap_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
87test_pool_iterate_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
88test_ptclosure_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
89test_random_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
90test_random_isaac_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
91test_socket_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
92test_serialize_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
93test_slist_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
94test_time_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
95test_timing_wheel_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Dave Barach8e8f98c2017-02-03 11:58:53 -050096test_tw_timer_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Damjan Marion7cd468a2016-12-19 23:05:39 +010097test_vec_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
98test_zvec_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
99
100test_bihash_template_LDADD = libvppinfra.la
101test_dlist_LDADD = libvppinfra.la
102test_elog_LDADD = libvppinfra.la
103test_elf_LDADD = libvppinfra.la
104test_fifo_LDADD = libvppinfra.la
105test_format_LDADD = libvppinfra.la
106test_hash_LDADD = libvppinfra.la
107test_heap_LDADD = libvppinfra.la
108test_longjmp_LDADD = libvppinfra.la
109test_macros_LDADD = libvppinfra.la
110test_md5_LDADD = libvppinfra.la
111test_mheap_LDADD = libvppinfra.la
112test_pool_iterate_LDADD = libvppinfra.la
113test_ptclosure_LDADD = libvppinfra.la
114test_random_LDADD = libvppinfra.la
115test_random_isaac_LDADD = libvppinfra.la
116test_serialize_LDADD = libvppinfra.la
117test_slist_LDADD = libvppinfra.la
118test_socket_LDADD = libvppinfra.la
119test_time_LDADD = libvppinfra.la -lm
120test_timing_wheel_LDADD = libvppinfra.la -lm
Dave Barach8e8f98c2017-02-03 11:58:53 -0500121test_tw_timer_LDADD = libvppinfra.la
Damjan Marion7cd468a2016-12-19 23:05:39 +0100122test_vec_LDADD = libvppinfra.la
123test_zvec_LDADD = libvppinfra.la
124
125test_bihash_template_LDFLAGS = -static
126test_dlist_LDFLAGS = -static
127test_elog_LDFLAGS = -static
128test_elf_LDFLAGS = -static
129test_fifo_LDFLAGS = -static
130test_format_LDFLAGS = -static
131test_hash_LDFLAGS = -static
132test_heap_LDFLAGS = -static
133test_longjmp_LDFLAGS = -static
134test_macros_LDFLAGS = -static
135test_md5_LDFLAGS = -static
136test_mheap_LDFLAGS = -static
137test_pool_iterate_LDFLAGS = -static
138test_ptclosure_LDFLAGS = -static
139test_random_LDFLAGS = -static
140test_random_isaac_LDFLAGS = -static
141test_serialize_LDFLAGS = -static
142test_slist_LDFLAGS = -static
143test_socket_LDFLAGS = -static
144test_time_LDFLAGS = -static
145test_timing_wheel_LDFLAGS = -static
Dave Barach8e8f98c2017-02-03 11:58:53 -0500146test_tw_timer_LDFLAGS = -static
Damjan Marion7cd468a2016-12-19 23:05:39 +0100147test_vec_LDFLAGS = -static
148test_zvec_LDFLAGS = -static
149
150# noinst_PROGRAMS += test_vhash
151# test_vhash_SOURCES = vppinfra/test_vhash.c vppinfra/vhash.c
152# test_vhash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
153# test_vhash_LDADD = libvppinfra.la
154# test_vhash_LDFLAGS = -static
155
156nobase_include_HEADERS = \
157 vppinfra/asm_mips.h \
158 vppinfra/asm_x86.h \
159 vppinfra/bihash_8_8.h \
Dave Barach68b0fb02017-02-28 15:15:56 -0500160 vppinfra/bihash_16_8.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100161 vppinfra/bihash_24_8.h \
Dave Barach68b0fb02017-02-28 15:15:56 -0500162 vppinfra/bihash_48_8.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100163 vppinfra/bihash_template.h \
164 vppinfra/bihash_template.c \
165 vppinfra/bitmap.h \
166 vppinfra/bitops.h \
167 vppinfra/byte_order.h \
168 vppinfra/cache.h \
169 vppinfra/clib.h \
170 vppinfra/cpu.h \
171 vppinfra/dlist.h \
172 vppinfra/elf.h \
173 vppinfra/elf_clib.h \
174 vppinfra/elog.h \
175 vppinfra/fheap.h \
176 vppinfra/error.h \
177 vppinfra/error_bootstrap.h \
178 vppinfra/fifo.h \
179 vppinfra/format.h \
180 vppinfra/graph.h \
181 vppinfra/hash.h \
182 vppinfra/heap.h \
183 vppinfra/longjmp.h \
184 vppinfra/macros.h \
185 vppinfra/math.h \
186 vppinfra/md5.h \
187 vppinfra/mem.h \
188 vppinfra/memcpy_sse3.h \
189 vppinfra/memcpy_avx.h \
190 vppinfra/mhash.h \
191 vppinfra/mheap.h \
192 vppinfra/mheap_bootstrap.h \
193 vppinfra/os.h \
194 vppinfra/pipeline.h \
195 vppinfra/pool.h \
196 vppinfra/ptclosure.h \
197 vppinfra/random.h \
198 vppinfra/random_buffer.h \
199 vppinfra/random_isaac.h \
200 vppinfra/serialize.h \
201 vppinfra/slist.h \
202 vppinfra/smp.h \
203 vppinfra/socket.h \
204 vppinfra/sparse_vec.h \
205 vppinfra/string.h \
206 vppinfra/time.h \
207 vppinfra/timing_wheel.h \
208 vppinfra/timer.h \
Dave Barach8e8f98c2017-02-03 11:58:53 -0500209 vppinfra/tw_timer_2t_1w_2048sl.h \
210 vppinfra/tw_timer_16t_2w_512sl.h \
Dave Barach68b0fb02017-02-28 15:15:56 -0500211 vppinfra/tw_timer_16t_1w_2048sl.h \
Dave Barach8e8f98c2017-02-03 11:58:53 -0500212 vppinfra/tw_timer_template.h \
Gabriel Ganne613c79f2017-02-15 11:37:53 +0100213 vppinfra/tw_timer_template.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100214 vppinfra/types.h \
215 vppinfra/unix.h \
216 vppinfra/vec.h \
217 vppinfra/vec_bootstrap.h \
218 vppinfra/vector.h \
219 vppinfra/vector_altivec.h \
220 vppinfra/vector_funcs.h \
221 vppinfra/vector_iwmmxt.h \
222 vppinfra/vector_neon.h \
223 vppinfra/vector_sse2.h \
224 vppinfra/valgrind.h \
225 vppinfra/vm_unix.h \
226 vppinfra/xxhash.h \
227 vppinfra/xy.h \
228 vppinfra/zvec.h
229
230CLIB_CORE = \
231 vppinfra/asm_x86.c \
232 vppinfra/backtrace.c \
233 vppinfra/bihash_8_8.h \
234 vppinfra/bihash_24_8.h \
235 vppinfra/bihash_template.h \
236 vppinfra/cpu.c \
237 vppinfra/elf.c \
238 vppinfra/elog.c \
239 vppinfra/error.c \
240 vppinfra/fifo.c \
241 vppinfra/fheap.c \
242 vppinfra/format.c \
243 vppinfra/graph.c \
244 vppinfra/hash.c \
245 vppinfra/heap.c \
246 vppinfra/longjmp.S \
247 vppinfra/macros.c \
248 vppinfra/mhash.c \
249 vppinfra/mheap.c \
250 vppinfra/md5.c \
251 vppinfra/mem_mheap.c \
252 vppinfra/ptclosure.c \
253 vppinfra/random.c \
254 vppinfra/random_buffer.c \
255 vppinfra/random_isaac.c \
256 vppinfra/serialize.c \
257 vppinfra/slist.c \
258 vppinfra/std-formats.c \
259 vppinfra/string.c \
260 vppinfra/time.c \
261 vppinfra/timing_wheel.c \
Dave Barach8e8f98c2017-02-03 11:58:53 -0500262 vppinfra/tw_timer_template.h \
263 vppinfra/tw_timer_2t_1w_2048sl.h \
264 vppinfra/tw_timer_2t_1w_2048sl.c \
265 vppinfra/tw_timer_16t_2w_512sl.h \
266 vppinfra/tw_timer_16t_2w_512sl.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500267 vppinfra/tw_timer_16t_1w_2048sl.h \
268 vppinfra/tw_timer_16t_1w_2048sl.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100269 vppinfra/unformat.c \
270 vppinfra/vec.c \
271 vppinfra/vector.c \
272 vppinfra/zvec.c
273
274# Core plus Unix additions
275libvppinfra_la_SOURCES = \
276 $(CLIB_CORE) \
277 vppinfra/elf_clib.c \
278 vppinfra/socket.c \
279 vppinfra/timer.c \
280 vppinfra/unix-formats.c \
281 vppinfra/unix-misc.c
282
283bin_PROGRAMS = elftool
284
285elftool_SOURCES = tools/elftool/elftool.c
286elftool_CPPFLAGS = $(AM_CPPFLAGS)
287elftool_LDADD = libvppinfra.la -lpthread -lrt -lm
288
289# vi:syntax=automake