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