1# SPDX-License-Identifier: BSD-3-Clause 2# Copyright(c) 2017-2019 Intel Corporation 3 4if is_windows 5 subdir_done() 6endif 7 8apps = [ 9 'pdump', 10 'proc-info', 11 'test-acl', 12 'test-bbdev', 13 'test-cmdline', 14 'test-compress-perf', 15 'test-crypto-perf', 16 'test-eventdev', 17 'test-fib', 18 'test-flow-perf', 19 'test-pipeline', 20 'test-pmd', 21 'test-regex', 22 'test-sad'] 23 24# for BSD only 25lib_execinfo = cc.find_library('execinfo', required: false) 26 27default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API'] 28default_ldflags = [] 29if get_option('default_library') == 'static' and not is_windows 30 default_ldflags += ['-Wl,--export-dynamic'] 31endif 32 33foreach app:apps 34 build = true 35 name = app 36 sources = [] 37 includes = [] 38 cflags = default_cflags 39 ldflags = default_ldflags 40 objs = [] # other object files to link against, used e.g. for 41 # instruction-set optimized versions of code 42 43 # use "deps" for internal DPDK dependencies, and "ext_deps" for 44 # external package/library requirements 45 ext_deps = [] 46 deps = [] 47 48 subdir(name) 49 50 if build 51 dep_objs = [] 52 foreach d:deps 53 dep_objs += get_variable(get_option('default_library') 54 + '_rte_' + d) 55 endforeach 56 dep_objs += lib_execinfo 57 58 link_libs = [] 59 if get_option('default_library') == 'static' 60 link_libs = dpdk_static_libraries + dpdk_drivers 61 endif 62 63 executable('dpdk-' + name, 64 sources, 65 c_args: cflags, 66 link_args: ldflags, 67 link_whole: link_libs, 68 dependencies: dep_objs, 69 install_rpath: join_paths(get_option('prefix'), 70 driver_install_path), 71 install: true) 72 endif 73endforeach 74 75# special case the autotests 76subdir('test') 77