fix ethdev port id validation
[dpdk.git] / examples / vm_power_manager / Makefile
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2014 Intel Corporation
3
4 ifneq ($(shell pkg-config --atleast-version=0.9.3 libvirt; echo $$?), 0)
5 $(error vm_power_manager requires libvirt >= 0.9.3)
6 else
7
8 ifeq ($(RTE_SDK),)
9 $(error "Please define RTE_SDK environment variable")
10 endif
11
12 # Default target, can be overridden by command line or environment
13 RTE_TARGET ?= x86_64-native-linuxapp-gcc
14
15 include $(RTE_SDK)/mk/rte.vars.mk
16
17 # binary name
18 APP = vm_power_mgr
19
20 # all source are stored in SRCS-y
21 SRCS-y := main.c vm_power_cli.c power_manager.c channel_manager.c
22 SRCS-y += channel_monitor.c
23
24 CFLAGS += -DALLOW_EXPERIMENTAL_API
25 CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/
26 CFLAGS += $(WERROR_FLAGS)
27
28 LDLIBS += -lvirt
29
30 ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
31
32 ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y)
33 LDLIBS += -lrte_pmd_ixgbe
34 endif
35
36 ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
37 LDLIBS += -lrte_pmd_i40e
38 endif
39
40 ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD),y)
41 LDLIBS += -lrte_pmd_bnxt
42 endif
43
44 endif
45
46 # workaround for a gcc bug with noreturn attribute
47 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
48 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
49 CFLAGS_main.o += -Wno-return-type
50 endif
51
52 include $(RTE_SDK)/mk/rte.extapp.mk
53
54 endif # libvirt check