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