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