Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 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: |
| 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 | |
Damjan Marion | 724f64c | 2017-01-11 11:11:00 +0100 | [diff] [blame] | 14 | lib_LTLIBRARIES += libvppinfra.la |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 15 | |
| 16 | TESTS = |
| 17 | |
| 18 | if ENABLE_TESTS |
| 19 | TESTS += test_bihash_template \ |
| 20 | test_dlist \ |
| 21 | test_elog \ |
| 22 | test_elf \ |
| 23 | test_fifo \ |
| 24 | test_format \ |
| 25 | test_hash \ |
| 26 | test_heap \ |
| 27 | test_longjmp \ |
| 28 | test_macros \ |
| 29 | test_md5 \ |
| 30 | test_mheap \ |
| 31 | test_pool_iterate \ |
| 32 | test_ptclosure \ |
| 33 | test_random \ |
| 34 | test_random_isaac \ |
| 35 | test_serialize \ |
| 36 | test_slist \ |
| 37 | test_socket \ |
| 38 | test_time \ |
| 39 | test_timing_wheel \ |
Dave Barach | 8e8f98c | 2017-02-03 11:58:53 -0500 | [diff] [blame] | 40 | test_tw_timer \ |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 41 | test_vec \ |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 42 | test_zvec |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 43 | endif |
| 44 | |
Dave Barach | 908a5ea | 2017-07-14 12:42:21 -0400 | [diff] [blame] | 45 | TESTS += test_bihash_template |
| 46 | |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 47 | noinst_PROGRAMS = $(TESTS) |
| 48 | check_PROGRAMS = $(TESTS) |
| 49 | |
| 50 | test_bihash_template_SOURCES = vppinfra/test_bihash_template.c |
| 51 | test_dlist_SOURCES = vppinfra/test_dlist.c |
| 52 | test_elog_SOURCES = vppinfra/test_elog.c |
| 53 | test_elf_SOURCES = vppinfra/test_elf.c |
| 54 | test_fifo_SOURCES = vppinfra/test_fifo.c |
| 55 | test_format_SOURCES = vppinfra/test_format.c |
| 56 | test_hash_SOURCES = vppinfra/test_hash.c |
| 57 | test_heap_SOURCES = vppinfra/test_heap.c |
| 58 | test_longjmp_SOURCES = vppinfra/test_longjmp.c |
| 59 | test_macros_SOURCES = vppinfra/test_macros.c |
| 60 | test_md5_SOURCES = vppinfra/test_md5.c |
| 61 | test_mheap_SOURCES = vppinfra/test_mheap.c |
| 62 | test_pool_iterate_SOURCES = vppinfra/test_pool_iterate.c |
| 63 | test_ptclosure_SOURCES = vppinfra/test_ptclosure.c |
| 64 | test_random_SOURCES = vppinfra/test_random.c |
| 65 | test_random_isaac_SOURCES = vppinfra/test_random_isaac.c |
| 66 | test_serialize_SOURCES = vppinfra/test_serialize.c |
| 67 | test_slist_SOURCES = vppinfra/test_slist.c |
| 68 | test_socket_SOURCES = vppinfra/test_socket.c |
| 69 | test_time_SOURCES = vppinfra/test_time.c |
| 70 | test_timing_wheel_SOURCES = vppinfra/test_timing_wheel.c |
Dave Barach | 8e8f98c | 2017-02-03 11:58:53 -0500 | [diff] [blame] | 71 | test_tw_timer_SOURCES = vppinfra/test_tw_timer.c |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 72 | test_vec_SOURCES = vppinfra/test_vec.c |
| 73 | test_zvec_SOURCES = vppinfra/test_zvec.c |
| 74 | |
| 75 | # All unit tests use ASSERT for failure |
| 76 | # So we'll need -DDEBUG to enable ASSERTs |
| 77 | test_bihash_template_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 78 | test_dlist_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 79 | test_elog_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 80 | test_elf_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 81 | test_fifo_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 82 | test_format_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 83 | test_hash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 84 | test_heap_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 85 | test_longjmp_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 86 | test_macros_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 87 | test_md5_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 88 | test_mheap_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 89 | test_pool_iterate_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 90 | test_ptclosure_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 91 | test_random_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 92 | test_random_isaac_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 93 | test_socket_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 94 | test_serialize_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 95 | test_slist_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 96 | test_time_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 97 | test_timing_wheel_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
Dave Barach | 8e8f98c | 2017-02-03 11:58:53 -0500 | [diff] [blame] | 98 | test_tw_timer_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 99 | test_vec_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 100 | test_zvec_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 101 | |
| 102 | test_bihash_template_LDADD = libvppinfra.la |
| 103 | test_dlist_LDADD = libvppinfra.la |
| 104 | test_elog_LDADD = libvppinfra.la |
| 105 | test_elf_LDADD = libvppinfra.la |
| 106 | test_fifo_LDADD = libvppinfra.la |
| 107 | test_format_LDADD = libvppinfra.la |
| 108 | test_hash_LDADD = libvppinfra.la |
| 109 | test_heap_LDADD = libvppinfra.la |
| 110 | test_longjmp_LDADD = libvppinfra.la |
| 111 | test_macros_LDADD = libvppinfra.la |
| 112 | test_md5_LDADD = libvppinfra.la |
| 113 | test_mheap_LDADD = libvppinfra.la |
| 114 | test_pool_iterate_LDADD = libvppinfra.la |
| 115 | test_ptclosure_LDADD = libvppinfra.la |
| 116 | test_random_LDADD = libvppinfra.la |
| 117 | test_random_isaac_LDADD = libvppinfra.la |
| 118 | test_serialize_LDADD = libvppinfra.la |
| 119 | test_slist_LDADD = libvppinfra.la |
| 120 | test_socket_LDADD = libvppinfra.la |
| 121 | test_time_LDADD = libvppinfra.la -lm |
| 122 | test_timing_wheel_LDADD = libvppinfra.la -lm |
Dave Barach | 8e8f98c | 2017-02-03 11:58:53 -0500 | [diff] [blame] | 123 | test_tw_timer_LDADD = libvppinfra.la |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 124 | test_vec_LDADD = libvppinfra.la |
| 125 | test_zvec_LDADD = libvppinfra.la |
| 126 | |
| 127 | test_bihash_template_LDFLAGS = -static |
| 128 | test_dlist_LDFLAGS = -static |
| 129 | test_elog_LDFLAGS = -static |
| 130 | test_elf_LDFLAGS = -static |
| 131 | test_fifo_LDFLAGS = -static |
| 132 | test_format_LDFLAGS = -static |
| 133 | test_hash_LDFLAGS = -static |
| 134 | test_heap_LDFLAGS = -static |
| 135 | test_longjmp_LDFLAGS = -static |
| 136 | test_macros_LDFLAGS = -static |
| 137 | test_md5_LDFLAGS = -static |
| 138 | test_mheap_LDFLAGS = -static |
| 139 | test_pool_iterate_LDFLAGS = -static |
| 140 | test_ptclosure_LDFLAGS = -static |
| 141 | test_random_LDFLAGS = -static |
| 142 | test_random_isaac_LDFLAGS = -static |
| 143 | test_serialize_LDFLAGS = -static |
| 144 | test_slist_LDFLAGS = -static |
| 145 | test_socket_LDFLAGS = -static |
| 146 | test_time_LDFLAGS = -static |
| 147 | test_timing_wheel_LDFLAGS = -static |
Dave Barach | 8e8f98c | 2017-02-03 11:58:53 -0500 | [diff] [blame] | 148 | test_tw_timer_LDFLAGS = -static |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 149 | test_vec_LDFLAGS = -static |
| 150 | test_zvec_LDFLAGS = -static |
| 151 | |
| 152 | # noinst_PROGRAMS += test_vhash |
| 153 | # test_vhash_SOURCES = vppinfra/test_vhash.c vppinfra/vhash.c |
| 154 | # test_vhash_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG |
| 155 | # test_vhash_LDADD = libvppinfra.la |
| 156 | # test_vhash_LDFLAGS = -static |
| 157 | |
| 158 | nobase_include_HEADERS = \ |
| 159 | vppinfra/asm_mips.h \ |
| 160 | vppinfra/asm_x86.h \ |
| 161 | vppinfra/bihash_8_8.h \ |
Dave Barach | 68b0fb0 | 2017-02-28 15:15:56 -0500 | [diff] [blame] | 162 | vppinfra/bihash_16_8.h \ |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 163 | vppinfra/bihash_24_8.h \ |
Dave Barach | 68b0fb0 | 2017-02-28 15:15:56 -0500 | [diff] [blame] | 164 | vppinfra/bihash_48_8.h \ |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 165 | vppinfra/bihash_template.h \ |
| 166 | vppinfra/bihash_template.c \ |
| 167 | vppinfra/bitmap.h \ |
| 168 | vppinfra/bitops.h \ |
| 169 | vppinfra/byte_order.h \ |
| 170 | vppinfra/cache.h \ |
| 171 | vppinfra/clib.h \ |
Klement Sekera | 58eb866 | 2017-06-09 06:06:49 +0200 | [diff] [blame] | 172 | vppinfra/clib_error.h \ |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 173 | vppinfra/cpu.h \ |
Damjan Marion | 0f68c79 | 2017-04-26 13:05:05 +0200 | [diff] [blame] | 174 | vppinfra/crc32.h \ |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 175 | vppinfra/dlist.h \ |
| 176 | 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 \ |
Damjan Marion | 1927da2 | 2017-03-27 17:08:20 +0200 | [diff] [blame] | 187 | vppinfra/lock.h \ |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 188 | vppinfra/longjmp.h \ |
| 189 | vppinfra/macros.h \ |
| 190 | vppinfra/math.h \ |
| 191 | vppinfra/md5.h \ |
| 192 | vppinfra/mem.h \ |
| 193 | vppinfra/memcpy_sse3.h \ |
| 194 | vppinfra/memcpy_avx.h \ |
| 195 | vppinfra/mhash.h \ |
| 196 | vppinfra/mheap.h \ |
| 197 | vppinfra/mheap_bootstrap.h \ |
| 198 | vppinfra/os.h \ |
| 199 | vppinfra/pipeline.h \ |
| 200 | vppinfra/pool.h \ |
| 201 | vppinfra/ptclosure.h \ |
| 202 | vppinfra/random.h \ |
| 203 | vppinfra/random_buffer.h \ |
| 204 | vppinfra/random_isaac.h \ |
| 205 | vppinfra/serialize.h \ |
| 206 | vppinfra/slist.h \ |
| 207 | vppinfra/smp.h \ |
| 208 | vppinfra/socket.h \ |
| 209 | vppinfra/sparse_vec.h \ |
| 210 | vppinfra/string.h \ |
| 211 | vppinfra/time.h \ |
| 212 | vppinfra/timing_wheel.h \ |
| 213 | vppinfra/timer.h \ |
Dave Barach | 8e8f98c | 2017-02-03 11:58:53 -0500 | [diff] [blame] | 214 | vppinfra/tw_timer_2t_1w_2048sl.h \ |
| 215 | vppinfra/tw_timer_16t_2w_512sl.h \ |
Dave Barach | 68b0fb0 | 2017-02-28 15:15:56 -0500 | [diff] [blame] | 216 | vppinfra/tw_timer_16t_1w_2048sl.h \ |
Dave Barach | 4af9ba1 | 2017-06-07 15:18:23 -0400 | [diff] [blame] | 217 | vppinfra/tw_timer_4t_3w_256sl.h \ |
| 218 | vppinfra/tw_timer_1t_3w_1024sl_ov.h \ |
Dave Barach | 8e8f98c | 2017-02-03 11:58:53 -0500 | [diff] [blame] | 219 | vppinfra/tw_timer_template.h \ |
Gabriel Ganne | 613c79f | 2017-02-15 11:37:53 +0100 | [diff] [blame] | 220 | vppinfra/tw_timer_template.c \ |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 221 | vppinfra/types.h \ |
| 222 | vppinfra/unix.h \ |
| 223 | vppinfra/vec.h \ |
| 224 | vppinfra/vec_bootstrap.h \ |
| 225 | vppinfra/vector.h \ |
| 226 | vppinfra/vector_altivec.h \ |
| 227 | vppinfra/vector_funcs.h \ |
| 228 | vppinfra/vector_iwmmxt.h \ |
| 229 | vppinfra/vector_neon.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 | |
| 237 | CLIB_CORE = \ |
| 238 | vppinfra/asm_x86.c \ |
| 239 | vppinfra/backtrace.c \ |
| 240 | vppinfra/bihash_8_8.h \ |
| 241 | vppinfra/bihash_24_8.h \ |
| 242 | vppinfra/bihash_template.h \ |
| 243 | vppinfra/cpu.c \ |
| 244 | vppinfra/elf.c \ |
| 245 | vppinfra/elog.c \ |
| 246 | vppinfra/error.c \ |
| 247 | vppinfra/fifo.c \ |
| 248 | vppinfra/fheap.c \ |
| 249 | vppinfra/format.c \ |
| 250 | vppinfra/graph.c \ |
| 251 | vppinfra/hash.c \ |
| 252 | vppinfra/heap.c \ |
| 253 | vppinfra/longjmp.S \ |
| 254 | vppinfra/macros.c \ |
| 255 | vppinfra/mhash.c \ |
| 256 | vppinfra/mheap.c \ |
| 257 | vppinfra/md5.c \ |
| 258 | vppinfra/mem_mheap.c \ |
| 259 | vppinfra/ptclosure.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/std-formats.c \ |
| 266 | vppinfra/string.c \ |
| 267 | vppinfra/time.c \ |
| 268 | vppinfra/timing_wheel.c \ |
Dave Barach | 8e8f98c | 2017-02-03 11:58:53 -0500 | [diff] [blame] | 269 | vppinfra/tw_timer_template.h \ |
| 270 | vppinfra/tw_timer_2t_1w_2048sl.h \ |
| 271 | vppinfra/tw_timer_2t_1w_2048sl.c \ |
| 272 | vppinfra/tw_timer_16t_2w_512sl.h \ |
| 273 | vppinfra/tw_timer_16t_2w_512sl.c \ |
Dave Barach | 68b0fb0 | 2017-02-28 15:15:56 -0500 | [diff] [blame] | 274 | vppinfra/tw_timer_16t_1w_2048sl.h \ |
| 275 | vppinfra/tw_timer_16t_1w_2048sl.c \ |
Dave Barach | 4af9ba1 | 2017-06-07 15:18:23 -0400 | [diff] [blame] | 276 | vppinfra/tw_timer_4t_3w_256sl.h \ |
| 277 | vppinfra/tw_timer_4t_3w_256sl.c \ |
| 278 | vppinfra/tw_timer_1t_3w_1024sl_ov.h \ |
| 279 | vppinfra/tw_timer_1t_3w_1024sl_ov.c \ |
Damjan Marion | 7cd468a | 2016-12-19 23:05:39 +0100 | [diff] [blame] | 280 | vppinfra/unformat.c \ |
| 281 | vppinfra/vec.c \ |
| 282 | vppinfra/vector.c \ |
| 283 | vppinfra/zvec.c |
| 284 | |
| 285 | # Core plus Unix additions |
| 286 | libvppinfra_la_SOURCES = \ |
| 287 | $(CLIB_CORE) \ |
| 288 | vppinfra/elf_clib.c \ |
| 289 | vppinfra/socket.c \ |
| 290 | vppinfra/timer.c \ |
| 291 | vppinfra/unix-formats.c \ |
| 292 | vppinfra/unix-misc.c |
| 293 | |
| 294 | bin_PROGRAMS = elftool |
| 295 | |
| 296 | elftool_SOURCES = tools/elftool/elftool.c |
| 297 | elftool_CPPFLAGS = $(AM_CPPFLAGS) |
| 298 | elftool_LDADD = libvppinfra.la -lpthread -lrt -lm |
| 299 | |
| 300 | # vi:syntax=automake |