blob: a70e7ce2084b8862f8b7158736513327b1a11f2a [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001# 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.
13AUTOMAKE_OPTIONS = foreign subdir-objects
14
15AM_CPPFLAGS = -Wall @VEC64@ # -Werror
16
17if WITH_UNIX
18 lib_LTLIBRARIES = libvppinfra.la
19endif
20
21lib_LIBRARIES =
22
Dave Barachd6534602016-06-14 18:38:02 -040023TESTS =
Damjan Marionc47e9792016-04-11 13:34:36 +020024
25if ENABLE_TESTS
26TESTS += test_bihash_template \
Dave Barach034fccc2016-06-24 18:53:21 -040027 test_dlist \
Ed Warnickecb9cada2015-12-08 15:45:58 -070028 test_elog \
29 test_elf \
30 test_fifo \
31 test_format \
32 test_hash \
33 test_heap \
34 test_longjmp \
35 test_macros \
36 test_md5 \
37 test_mheap \
38 test_pfhash \
39 test_phash \
40 test_pool_iterate \
Dave Barachd6534602016-06-14 18:38:02 -040041 test_ptclosure \
Ed Warnickecb9cada2015-12-08 15:45:58 -070042 test_qhash \
43 test_random \
44 test_random_isaac \
45 test_serialize \
46 test_slist \
47 test_socket \
48 test_time \
49 test_timing_wheel \
50 test_vec \
51 test_zvec
Damjan Marionc47e9792016-04-11 13:34:36 +020052endif
Ed Warnickecb9cada2015-12-08 15:45:58 -070053
54noinst_PROGRAMS = $(TESTS)
55check_PROGRAMS = $(TESTS)
56
57test_bihash_template_SOURCES = vppinfra/test_bihash_template.c
Dave Barach034fccc2016-06-24 18:53:21 -040058test_dlist_SOURCES = vppinfra/test_dlist.c
Ed Warnickecb9cada2015-12-08 15:45:58 -070059test_elog_SOURCES = vppinfra/test_elog.c
60test_elf_SOURCES = vppinfra/test_elf.c
61test_fifo_SOURCES = vppinfra/test_fifo.c
62test_format_SOURCES = vppinfra/test_format.c
63test_hash_SOURCES = vppinfra/test_hash.c
64test_heap_SOURCES = vppinfra/test_heap.c
65test_longjmp_SOURCES = vppinfra/test_longjmp.c
66test_macros_SOURCES = vppinfra/test_macros.c
67test_md5_SOURCES = vppinfra/test_md5.c
68test_mheap_SOURCES = vppinfra/test_mheap.c
69test_pfhash_SOURCES = vppinfra/test_pfhash.c
70test_phash_SOURCES = vppinfra/test_phash.c
71test_pool_iterate_SOURCES = vppinfra/test_pool_iterate.c
Dave Barachd6534602016-06-14 18:38:02 -040072test_ptclosure_SOURCES = vppinfra/test_ptclosure.c
Ed Warnickecb9cada2015-12-08 15:45:58 -070073test_qhash_SOURCES = vppinfra/test_qhash.c
74test_random_SOURCES = vppinfra/test_random.c
75test_random_isaac_SOURCES = vppinfra/test_random_isaac.c
76test_serialize_SOURCES = vppinfra/test_serialize.c
77test_slist_SOURCES = vppinfra/test_slist.c
78test_socket_SOURCES = vppinfra/test_socket.c
79test_time_SOURCES = vppinfra/test_time.c
80test_timing_wheel_SOURCES = vppinfra/test_timing_wheel.c
81test_vec_SOURCES = vppinfra/test_vec.c
82test_zvec_SOURCES = vppinfra/test_zvec.c
83
84# All unit tests use ASSERT for failure
85# So we'll need -DDEBUG to enable ASSERTs
86test_bihash_template_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Dave Barach034fccc2016-06-24 18:53:21 -040087test_dlist_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Ed Warnickecb9cada2015-12-08 15:45:58 -070088test_elog_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
89test_elf_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
90test_fifo_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
91test_format_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
92test_hash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
93test_heap_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
94test_longjmp_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
95test_macros_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
96test_md5_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
97test_mheap_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
98test_pfhash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
99test_phash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
100test_pool_iterate_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Dave Barachd6534602016-06-14 18:38:02 -0400101test_ptclosure_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Ed Warnickecb9cada2015-12-08 15:45:58 -0700102test_qhash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
103test_random_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
104test_random_isaac_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
105test_socket_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
106test_serialize_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
107test_slist_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
108test_time_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
109test_timing_wheel_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
110test_vec_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
111test_zvec_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
112
113test_bihash_template_LDADD = libvppinfra.la
Dave Barach034fccc2016-06-24 18:53:21 -0400114test_dlist_LDADD = libvppinfra.la
Ed Warnickecb9cada2015-12-08 15:45:58 -0700115test_elog_LDADD = libvppinfra.la
116test_elf_LDADD = libvppinfra.la
117test_fifo_LDADD = libvppinfra.la
118test_format_LDADD = libvppinfra.la
119test_hash_LDADD = libvppinfra.la
120test_heap_LDADD = libvppinfra.la
121test_longjmp_LDADD = libvppinfra.la
122test_macros_LDADD = libvppinfra.la
123test_md5_LDADD = libvppinfra.la
124test_mheap_LDADD = libvppinfra.la
125test_pfhash_LDADD = libvppinfra.la
126test_phash_LDADD = libvppinfra.la
127test_pool_iterate_LDADD = libvppinfra.la
Dave Barachd6534602016-06-14 18:38:02 -0400128test_ptclosure_LDADD = libvppinfra.la
Ed Warnickecb9cada2015-12-08 15:45:58 -0700129test_qhash_LDADD = libvppinfra.la
130test_random_LDADD = libvppinfra.la
131test_random_isaac_LDADD = libvppinfra.la
132test_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
137test_vec_LDADD = libvppinfra.la
138test_zvec_LDADD = libvppinfra.la
139
140test_bihash_template_LDFLAGS = -static
Dave Barach034fccc2016-06-24 18:53:21 -0400141test_dlist_LDFLAGS = -static
Ed Warnickecb9cada2015-12-08 15:45:58 -0700142test_elog_LDFLAGS = -static
143test_elf_LDFLAGS = -static
144test_fifo_LDFLAGS = -static
145test_format_LDFLAGS = -static
146test_hash_LDFLAGS = -static
147test_heap_LDFLAGS = -static
148test_longjmp_LDFLAGS = -static
149test_macros_LDFLAGS = -static
150test_md5_LDFLAGS = -static
151test_mheap_LDFLAGS = -static
152test_pfhash_LDFLAGS = -static
153test_phash_LDFLAGS = -static
154test_pool_iterate_LDFLAGS = -static
Dave Barachd6534602016-06-14 18:38:02 -0400155test_ptclosure_LDFLAGS = -static
Ed Warnickecb9cada2015-12-08 15:45:58 -0700156test_qhash_LDFLAGS = -static
157test_random_LDFLAGS = -static
158test_random_isaac_LDFLAGS = -static
159test_serialize_LDFLAGS = -static
160test_slist_LDFLAGS = -static
161test_socket_LDFLAGS = -static
162test_time_LDFLAGS = -static
163test_timing_wheel_LDFLAGS = -static
164test_vec_LDFLAGS = -static
165test_zvec_LDFLAGS = -static
166
167# noinst_PROGRAMS += test_vhash
168# test_vhash_SOURCES = vppinfra/test_vhash.c vppinfra/vhash.c
169# test_vhash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
170# test_vhash_LDADD = libvppinfra.la
171# test_vhash_LDFLAGS = -static
172
173nobase_include_HEADERS = \
174 vppinfra/asm_mips.h \
175 vppinfra/asm_x86.h \
176 vppinfra/bihash_8_8.h \
177 vppinfra/bihash_24_8.h \
178 vppinfra/bihash_template.h \
179 vppinfra/bihash_template.c \
180 vppinfra/bitmap.h \
181 vppinfra/bitops.h \
182 vppinfra/byte_order.h \
183 vppinfra/cache.h \
184 vppinfra/clib.h \
Damjan Marion522e4862016-03-04 12:44:14 +0100185 vppinfra/cpu.h \
Dave Barach034fccc2016-06-24 18:53:21 -0400186 vppinfra/dlist.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700187 vppinfra/elf.h \
188 vppinfra/elf_clib.h \
189 vppinfra/elog.h \
190 vppinfra/fheap.h \
191 vppinfra/error.h \
192 vppinfra/error_bootstrap.h \
193 vppinfra/fifo.h \
194 vppinfra/format.h \
195 vppinfra/graph.h \
196 vppinfra/hash.h \
197 vppinfra/heap.h \
198 vppinfra/longjmp.h \
199 vppinfra/macros.h \
200 vppinfra/math.h \
201 vppinfra/md5.h \
202 vppinfra/mem.h \
Damjan Marionf1213b82016-03-13 02:22:06 +0100203 vppinfra/memcpy_sse3.h \
204 vppinfra/memcpy_avx.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700205 vppinfra/mhash.h \
206 vppinfra/mheap.h \
207 vppinfra/mheap_bootstrap.h \
208 vppinfra/os.h \
209 vppinfra/pfhash.h \
210 vppinfra/phash.h \
211 vppinfra/pipeline.h \
212 vppinfra/pool.h \
Dave Barachd6534602016-06-14 18:38:02 -0400213 vppinfra/ptclosure.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700214 vppinfra/qhash.h \
215 vppinfra/random.h \
216 vppinfra/random_buffer.h \
217 vppinfra/random_isaac.h \
218 vppinfra/serialize.h \
219 vppinfra/slist.h \
220 vppinfra/smp.h \
221 vppinfra/smp_fifo.h \
222 vppinfra/socket.h \
223 vppinfra/sparse_vec.h \
224 vppinfra/string.h \
225 vppinfra/time.h \
226 vppinfra/timing_wheel.h \
227 vppinfra/timer.h \
228 vppinfra/types.h \
229 vppinfra/unix.h \
230 vppinfra/vec.h \
231 vppinfra/vec_bootstrap.h \
232 vppinfra/vector.h \
233 vppinfra/vector_altivec.h \
234 vppinfra/vector_funcs.h \
235 vppinfra/vector_iwmmxt.h \
236 vppinfra/vector_sse2.h \
237 vppinfra/valgrind.h \
238 vppinfra/vm_unix.h \
239 vppinfra/xxhash.h \
240 vppinfra/xy.h \
241 vppinfra/zvec.h
242
243CLIB_CORE = \
244 vppinfra/asm_x86.c \
245 vppinfra/backtrace.c \
Damjan Marion522e4862016-03-04 12:44:14 +0100246 vppinfra/cpu.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700247 vppinfra/elf.c \
248 vppinfra/elog.c \
249 vppinfra/error.c \
250 vppinfra/fifo.c \
251 vppinfra/fheap.c \
252 vppinfra/format.c \
253 vppinfra/graph.c \
254 vppinfra/hash.c \
255 vppinfra/heap.c \
256 vppinfra/longjmp.S \
257 vppinfra/macros.c \
258 vppinfra/mhash.c \
259 vppinfra/mheap.c \
260 vppinfra/md5.c \
261 vppinfra/mem_mheap.c \
262 vppinfra/pfhash.c \
263 vppinfra/phash.c \
Dave Barachd6534602016-06-14 18:38:02 -0400264 vppinfra/ptclosure.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700265 vppinfra/qhash.c \
266 vppinfra/random.c \
267 vppinfra/random_buffer.c \
268 vppinfra/random_isaac.c \
269 vppinfra/serialize.c \
270 vppinfra/slist.c \
271 vppinfra/smp.c \
272 vppinfra/smp_fifo.c \
273 vppinfra/std-formats.c \
274 vppinfra/string.c \
275 vppinfra/time.c \
276 vppinfra/timing_wheel.c \
277 vppinfra/unformat.c \
278 vppinfra/vec.c \
279 vppinfra/vector.c \
280 vppinfra/zvec.c
281
282# Core plus Unix additions
283libvppinfra_la_SOURCES = \
284 $(CLIB_CORE) \
285 vppinfra/elf_clib.c \
286 vppinfra/socket.c \
287 vppinfra/timer.c \
288 vppinfra/unix-formats.c \
289 vppinfra/unix-misc.c
Damjan Marion29b6af92015-12-13 21:17:07 +0100290
291bin_PROGRAMS = elftool
292
293elftool_SOURCES = tools/elftool.c
294elftool_CPPFLAGS = -Wall
295elftool_LDADD = libvppinfra.la -lpthread -lrt -lm