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