1# SPDX-License-Identifier: BSD-3-Clause 2# Copyright(c) 2018 Intel Corporation 3 4# meson file, for building this example as part of a main DPDK build. 5# 6# To build this example as a standalone application with an already-installed 7# DPDK instance, use 'make' 8 9deps += ['power'] 10 11if dpdk_conf.has('RTE_NET_BNXT') 12 deps += ['net_bnxt'] 13endif 14 15if dpdk_conf.has('RTE_NET_I40E') 16 deps += ['net_i40e'] 17endif 18 19if dpdk_conf.has('RTE_NET_IXGBE') 20 deps += ['net_ixgbe'] 21endif 22 23allow_experimental_apis = true 24sources = files( 25 'channel_manager.c', 26 'channel_monitor.c', 27 'main.c', 28 'parse.c', 29 'power_manager.c', 30 'vm_power_cli.c', 31) 32 33# If we're on X86, pull in the x86 code for the branch monitor algo. 34if dpdk_conf.has('RTE_ARCH_X86_64') 35 sources += files('oob_monitor_x86.c') 36else 37 sources += files('oob_monitor_nop.c') 38endif 39 40opt_dep = cc.find_library('virt', required : false) 41build = opt_dep.found() 42ext_deps += opt_dep 43 44opt_dep = dependency('jansson', required : false, method: 'pkg-config') 45if opt_dep.found() 46 ext_deps += opt_dep 47 cflags += '-DUSE_JANSSON' 48endif 49