1 # 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:
6 # http://www.apache.org/licenses/LICENSE-2.0
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 AUTOMAKE_OPTIONS = foreign subdir-objects
15 AM_CPPFLAGS = -Wall @VEC64@ # -Werror
18 lib_LTLIBRARIES = libvppinfra.la
26 TESTS += test_bihash_template \
54 noinst_PROGRAMS = $(TESTS)
55 check_PROGRAMS = $(TESTS)
57 test_bihash_template_SOURCES = vppinfra/test_bihash_template.c
58 test_dlist_SOURCES = vppinfra/test_dlist.c
59 test_elog_SOURCES = vppinfra/test_elog.c
60 test_elf_SOURCES = vppinfra/test_elf.c
61 test_fifo_SOURCES = vppinfra/test_fifo.c
62 test_format_SOURCES = vppinfra/test_format.c
63 test_hash_SOURCES = vppinfra/test_hash.c
64 test_heap_SOURCES = vppinfra/test_heap.c
65 test_longjmp_SOURCES = vppinfra/test_longjmp.c
66 test_macros_SOURCES = vppinfra/test_macros.c
67 test_md5_SOURCES = vppinfra/test_md5.c
68 test_mheap_SOURCES = vppinfra/test_mheap.c
69 test_pfhash_SOURCES = vppinfra/test_pfhash.c
70 test_phash_SOURCES = vppinfra/test_phash.c
71 test_pool_iterate_SOURCES = vppinfra/test_pool_iterate.c
72 test_ptclosure_SOURCES = vppinfra/test_ptclosure.c
73 test_qhash_SOURCES = vppinfra/test_qhash.c
74 test_random_SOURCES = vppinfra/test_random.c
75 test_random_isaac_SOURCES = vppinfra/test_random_isaac.c
76 test_serialize_SOURCES = vppinfra/test_serialize.c
77 test_slist_SOURCES = vppinfra/test_slist.c
78 test_socket_SOURCES = vppinfra/test_socket.c
79 test_time_SOURCES = vppinfra/test_time.c
80 test_timing_wheel_SOURCES = vppinfra/test_timing_wheel.c
81 test_vec_SOURCES = vppinfra/test_vec.c
82 test_zvec_SOURCES = vppinfra/test_zvec.c
84 # All unit tests use ASSERT for failure
85 # So we'll need -DDEBUG to enable ASSERTs
86 test_bihash_template_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
87 test_dlist_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
88 test_elog_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
89 test_elf_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
90 test_fifo_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
91 test_format_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
92 test_hash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
93 test_heap_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
94 test_longjmp_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
95 test_macros_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
96 test_md5_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
97 test_mheap_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
98 test_pfhash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
99 test_phash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
100 test_pool_iterate_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
101 test_ptclosure_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
102 test_qhash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
103 test_random_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
104 test_random_isaac_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
105 test_socket_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
106 test_serialize_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
107 test_slist_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
108 test_time_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
109 test_timing_wheel_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
110 test_vec_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
111 test_zvec_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
113 test_bihash_template_LDADD = libvppinfra.la
114 test_dlist_LDADD = libvppinfra.la
115 test_elog_LDADD = libvppinfra.la
116 test_elf_LDADD = libvppinfra.la
117 test_fifo_LDADD = libvppinfra.la
118 test_format_LDADD = libvppinfra.la
119 test_hash_LDADD = libvppinfra.la
120 test_heap_LDADD = libvppinfra.la
121 test_longjmp_LDADD = libvppinfra.la
122 test_macros_LDADD = libvppinfra.la
123 test_md5_LDADD = libvppinfra.la
124 test_mheap_LDADD = libvppinfra.la
125 test_pfhash_LDADD = libvppinfra.la
126 test_phash_LDADD = libvppinfra.la
127 test_pool_iterate_LDADD = libvppinfra.la
128 test_ptclosure_LDADD = libvppinfra.la
129 test_qhash_LDADD = libvppinfra.la
130 test_random_LDADD = libvppinfra.la
131 test_random_isaac_LDADD = libvppinfra.la
132 test_serialize_LDADD = libvppinfra.la
133 test_slist_LDADD = libvppinfra.la
134 test_socket_LDADD = libvppinfra.la
135 test_time_LDADD = libvppinfra.la -lm
136 test_timing_wheel_LDADD = libvppinfra.la -lm
137 test_vec_LDADD = libvppinfra.la
138 test_zvec_LDADD = libvppinfra.la
140 test_bihash_template_LDFLAGS = -static
141 test_dlist_LDFLAGS = -static
142 test_elog_LDFLAGS = -static
143 test_elf_LDFLAGS = -static
144 test_fifo_LDFLAGS = -static
145 test_format_LDFLAGS = -static
146 test_hash_LDFLAGS = -static
147 test_heap_LDFLAGS = -static
148 test_longjmp_LDFLAGS = -static
149 test_macros_LDFLAGS = -static
150 test_md5_LDFLAGS = -static
151 test_mheap_LDFLAGS = -static
152 test_pfhash_LDFLAGS = -static
153 test_phash_LDFLAGS = -static
154 test_pool_iterate_LDFLAGS = -static
155 test_ptclosure_LDFLAGS = -static
156 test_qhash_LDFLAGS = -static
157 test_random_LDFLAGS = -static
158 test_random_isaac_LDFLAGS = -static
159 test_serialize_LDFLAGS = -static
160 test_slist_LDFLAGS = -static
161 test_socket_LDFLAGS = -static
162 test_time_LDFLAGS = -static
163 test_timing_wheel_LDFLAGS = -static
164 test_vec_LDFLAGS = -static
165 test_zvec_LDFLAGS = -static
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
173 nobase_include_HEADERS = \
174 vppinfra/asm_mips.h \
176 vppinfra/bihash_8_8.h \
177 vppinfra/bihash_24_8.h \
178 vppinfra/bihash_template.h \
179 vppinfra/bihash_template.c \
182 vppinfra/byte_order.h \
188 vppinfra/elf_clib.h \
192 vppinfra/error_bootstrap.h \
203 vppinfra/memcpy_sse3.h \
204 vppinfra/memcpy_avx.h \
207 vppinfra/mheap_bootstrap.h \
211 vppinfra/pipeline.h \
213 vppinfra/ptclosure.h \
216 vppinfra/random_buffer.h \
217 vppinfra/random_isaac.h \
218 vppinfra/serialize.h \
221 vppinfra/smp_fifo.h \
223 vppinfra/sparse_vec.h \
226 vppinfra/timing_wheel.h \
231 vppinfra/vec_bootstrap.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 \
245 vppinfra/backtrace.c \
261 vppinfra/mem_mheap.c \
264 vppinfra/ptclosure.c \
267 vppinfra/random_buffer.c \
268 vppinfra/random_isaac.c \
269 vppinfra/serialize.c \
272 vppinfra/smp_fifo.c \
273 vppinfra/std-formats.c \
276 vppinfra/timing_wheel.c \
277 vppinfra/unformat.c \
282 # Core plus Unix additions
283 libvppinfra_la_SOURCES = \
285 vppinfra/elf_clib.c \
288 vppinfra/unix-formats.c \
291 bin_PROGRAMS = elftool
293 elftool_SOURCES = tools/elftool.c
294 elftool_CPPFLAGS = -Wall
295 elftool_LDADD = libvppinfra.la -lpthread -lrt -lm