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