blob: b99f3d53716e99dba11441c7183855a1c7966cde [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 \
Ed Warnickecb9cada2015-12-08 15:45:58 -070027 test_elog \
28 test_elf \
29 test_fifo \
30 test_format \
31 test_hash \
32 test_heap \
33 test_longjmp \
34 test_macros \
35 test_md5 \
36 test_mheap \
37 test_pfhash \
38 test_phash \
39 test_pool_iterate \
Dave Barachd6534602016-06-14 18:38:02 -040040 test_ptclosure \
Ed Warnickecb9cada2015-12-08 15:45:58 -070041 test_qhash \
42 test_random \
43 test_random_isaac \
44 test_serialize \
45 test_slist \
46 test_socket \
47 test_time \
48 test_timing_wheel \
49 test_vec \
50 test_zvec
Damjan Marionc47e9792016-04-11 13:34:36 +020051endif
Ed Warnickecb9cada2015-12-08 15:45:58 -070052
53noinst_PROGRAMS = $(TESTS)
54check_PROGRAMS = $(TESTS)
55
56test_bihash_template_SOURCES = vppinfra/test_bihash_template.c
57test_elog_SOURCES = vppinfra/test_elog.c
58test_elf_SOURCES = vppinfra/test_elf.c
59test_fifo_SOURCES = vppinfra/test_fifo.c
60test_format_SOURCES = vppinfra/test_format.c
61test_hash_SOURCES = vppinfra/test_hash.c
62test_heap_SOURCES = vppinfra/test_heap.c
63test_longjmp_SOURCES = vppinfra/test_longjmp.c
64test_macros_SOURCES = vppinfra/test_macros.c
65test_md5_SOURCES = vppinfra/test_md5.c
66test_mheap_SOURCES = vppinfra/test_mheap.c
67test_pfhash_SOURCES = vppinfra/test_pfhash.c
68test_phash_SOURCES = vppinfra/test_phash.c
69test_pool_iterate_SOURCES = vppinfra/test_pool_iterate.c
Dave Barachd6534602016-06-14 18:38:02 -040070test_ptclosure_SOURCES = vppinfra/test_ptclosure.c
Ed Warnickecb9cada2015-12-08 15:45:58 -070071test_qhash_SOURCES = vppinfra/test_qhash.c
72test_random_SOURCES = vppinfra/test_random.c
73test_random_isaac_SOURCES = vppinfra/test_random_isaac.c
74test_serialize_SOURCES = vppinfra/test_serialize.c
75test_slist_SOURCES = vppinfra/test_slist.c
76test_socket_SOURCES = vppinfra/test_socket.c
77test_time_SOURCES = vppinfra/test_time.c
78test_timing_wheel_SOURCES = vppinfra/test_timing_wheel.c
79test_vec_SOURCES = vppinfra/test_vec.c
80test_zvec_SOURCES = vppinfra/test_zvec.c
81
82# All unit tests use ASSERT for failure
83# So we'll need -DDEBUG to enable ASSERTs
84test_bihash_template_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
85test_elog_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
86test_elf_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
87test_fifo_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
88test_format_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
89test_hash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
90test_heap_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
91test_longjmp_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
92test_macros_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
93test_md5_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
94test_mheap_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
95test_pfhash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
96test_phash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
97test_pool_iterate_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Dave Barachd6534602016-06-14 18:38:02 -040098test_ptclosure_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
Ed Warnickecb9cada2015-12-08 15:45:58 -070099test_qhash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
100test_random_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
101test_random_isaac_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
102test_socket_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
103test_serialize_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
104test_slist_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
105test_time_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
106test_timing_wheel_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
107test_vec_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
108test_zvec_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
109
110test_bihash_template_LDADD = libvppinfra.la
111test_elog_LDADD = libvppinfra.la
112test_elf_LDADD = libvppinfra.la
113test_fifo_LDADD = libvppinfra.la
114test_format_LDADD = libvppinfra.la
115test_hash_LDADD = libvppinfra.la
116test_heap_LDADD = libvppinfra.la
117test_longjmp_LDADD = libvppinfra.la
118test_macros_LDADD = libvppinfra.la
119test_md5_LDADD = libvppinfra.la
120test_mheap_LDADD = libvppinfra.la
121test_pfhash_LDADD = libvppinfra.la
122test_phash_LDADD = libvppinfra.la
123test_pool_iterate_LDADD = libvppinfra.la
Dave Barachd6534602016-06-14 18:38:02 -0400124test_ptclosure_LDADD = libvppinfra.la
Ed Warnickecb9cada2015-12-08 15:45:58 -0700125test_qhash_LDADD = libvppinfra.la
126test_random_LDADD = libvppinfra.la
127test_random_isaac_LDADD = libvppinfra.la
128test_serialize_LDADD = libvppinfra.la
129test_slist_LDADD = libvppinfra.la
130test_socket_LDADD = libvppinfra.la
131test_time_LDADD = libvppinfra.la -lm
132test_timing_wheel_LDADD = libvppinfra.la -lm
133test_vec_LDADD = libvppinfra.la
134test_zvec_LDADD = libvppinfra.la
135
136test_bihash_template_LDFLAGS = -static
137test_elog_LDFLAGS = -static
138test_elf_LDFLAGS = -static
139test_fifo_LDFLAGS = -static
140test_format_LDFLAGS = -static
141test_hash_LDFLAGS = -static
142test_heap_LDFLAGS = -static
143test_longjmp_LDFLAGS = -static
144test_macros_LDFLAGS = -static
145test_md5_LDFLAGS = -static
146test_mheap_LDFLAGS = -static
147test_pfhash_LDFLAGS = -static
148test_phash_LDFLAGS = -static
149test_pool_iterate_LDFLAGS = -static
Dave Barachd6534602016-06-14 18:38:02 -0400150test_ptclosure_LDFLAGS = -static
Ed Warnickecb9cada2015-12-08 15:45:58 -0700151test_qhash_LDFLAGS = -static
152test_random_LDFLAGS = -static
153test_random_isaac_LDFLAGS = -static
154test_serialize_LDFLAGS = -static
155test_slist_LDFLAGS = -static
156test_socket_LDFLAGS = -static
157test_time_LDFLAGS = -static
158test_timing_wheel_LDFLAGS = -static
159test_vec_LDFLAGS = -static
160test_zvec_LDFLAGS = -static
161
162# noinst_PROGRAMS += test_vhash
163# test_vhash_SOURCES = vppinfra/test_vhash.c vppinfra/vhash.c
164# test_vhash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
165# test_vhash_LDADD = libvppinfra.la
166# test_vhash_LDFLAGS = -static
167
168nobase_include_HEADERS = \
169 vppinfra/asm_mips.h \
170 vppinfra/asm_x86.h \
171 vppinfra/bihash_8_8.h \
172 vppinfra/bihash_24_8.h \
173 vppinfra/bihash_template.h \
174 vppinfra/bihash_template.c \
175 vppinfra/bitmap.h \
176 vppinfra/bitops.h \
177 vppinfra/byte_order.h \
178 vppinfra/cache.h \
179 vppinfra/clib.h \
Damjan Marion522e4862016-03-04 12:44:14 +0100180 vppinfra/cpu.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700181 vppinfra/elf.h \
182 vppinfra/elf_clib.h \
183 vppinfra/elog.h \
184 vppinfra/fheap.h \
185 vppinfra/error.h \
186 vppinfra/error_bootstrap.h \
187 vppinfra/fifo.h \
188 vppinfra/format.h \
189 vppinfra/graph.h \
190 vppinfra/hash.h \
191 vppinfra/heap.h \
192 vppinfra/longjmp.h \
193 vppinfra/macros.h \
194 vppinfra/math.h \
195 vppinfra/md5.h \
196 vppinfra/mem.h \
Damjan Marionf1213b82016-03-13 02:22:06 +0100197 vppinfra/memcpy_sse3.h \
198 vppinfra/memcpy_avx.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700199 vppinfra/mhash.h \
200 vppinfra/mheap.h \
201 vppinfra/mheap_bootstrap.h \
202 vppinfra/os.h \
203 vppinfra/pfhash.h \
204 vppinfra/phash.h \
205 vppinfra/pipeline.h \
206 vppinfra/pool.h \
Dave Barachd6534602016-06-14 18:38:02 -0400207 vppinfra/ptclosure.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700208 vppinfra/qhash.h \
209 vppinfra/random.h \
210 vppinfra/random_buffer.h \
211 vppinfra/random_isaac.h \
212 vppinfra/serialize.h \
213 vppinfra/slist.h \
214 vppinfra/smp.h \
215 vppinfra/smp_fifo.h \
216 vppinfra/socket.h \
217 vppinfra/sparse_vec.h \
218 vppinfra/string.h \
219 vppinfra/time.h \
220 vppinfra/timing_wheel.h \
221 vppinfra/timer.h \
222 vppinfra/types.h \
223 vppinfra/unix.h \
224 vppinfra/vec.h \
225 vppinfra/vec_bootstrap.h \
226 vppinfra/vector.h \
227 vppinfra/vector_altivec.h \
228 vppinfra/vector_funcs.h \
229 vppinfra/vector_iwmmxt.h \
230 vppinfra/vector_sse2.h \
231 vppinfra/valgrind.h \
232 vppinfra/vm_unix.h \
233 vppinfra/xxhash.h \
234 vppinfra/xy.h \
235 vppinfra/zvec.h
236
237CLIB_CORE = \
238 vppinfra/asm_x86.c \
239 vppinfra/backtrace.c \
Damjan Marion522e4862016-03-04 12:44:14 +0100240 vppinfra/cpu.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700241 vppinfra/elf.c \
242 vppinfra/elog.c \
243 vppinfra/error.c \
244 vppinfra/fifo.c \
245 vppinfra/fheap.c \
246 vppinfra/format.c \
247 vppinfra/graph.c \
248 vppinfra/hash.c \
249 vppinfra/heap.c \
250 vppinfra/longjmp.S \
251 vppinfra/macros.c \
252 vppinfra/mhash.c \
253 vppinfra/mheap.c \
254 vppinfra/md5.c \
255 vppinfra/mem_mheap.c \
256 vppinfra/pfhash.c \
257 vppinfra/phash.c \
Dave Barachd6534602016-06-14 18:38:02 -0400258 vppinfra/ptclosure.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700259 vppinfra/qhash.c \
260 vppinfra/random.c \
261 vppinfra/random_buffer.c \
262 vppinfra/random_isaac.c \
263 vppinfra/serialize.c \
264 vppinfra/slist.c \
265 vppinfra/smp.c \
266 vppinfra/smp_fifo.c \
267 vppinfra/std-formats.c \
268 vppinfra/string.c \
269 vppinfra/time.c \
270 vppinfra/timing_wheel.c \
271 vppinfra/unformat.c \
272 vppinfra/vec.c \
273 vppinfra/vector.c \
274 vppinfra/zvec.c
275
276# Core plus Unix additions
277libvppinfra_la_SOURCES = \
278 $(CLIB_CORE) \
279 vppinfra/elf_clib.c \
280 vppinfra/socket.c \
281 vppinfra/timer.c \
282 vppinfra/unix-formats.c \
283 vppinfra/unix-misc.c
Damjan Marion29b6af92015-12-13 21:17:07 +0100284
285bin_PROGRAMS = elftool
286
287elftool_SOURCES = tools/elftool.c
288elftool_CPPFLAGS = -Wall
289elftool_LDADD = libvppinfra.la -lpthread -lrt -lm