]> git.proxmox.com Git - ceph.git/blame - ceph/src/spdk/dpdk/examples/vm_power_manager/Makefile
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / dpdk / examples / vm_power_manager / Makefile
CommitLineData
11fdf7f2
TL
1# SPDX-License-Identifier: BSD-3-Clause
2# Copyright(c) 2010-2014 Intel Corporation
3
4ifneq ($(shell pkg-config --atleast-version=0.9.3 libvirt; echo $$?), 0)
5$(error vm_power_manager requires libvirt >= 0.9.3)
6else
7
8ifeq ($(RTE_SDK),)
9$(error "Please define RTE_SDK environment variable")
10endif
11
9f95a23c
TL
12# Default target, detect a build directory, by looking for a path with a .config
13RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config)))))
11fdf7f2
TL
14
15include $(RTE_SDK)/mk/rte.vars.mk
16
17# binary name
18APP = vm_power_mgr
19
20# all source are stored in SRCS-y
21SRCS-y := main.c vm_power_cli.c power_manager.c channel_manager.c
22SRCS-y += channel_monitor.c parse.c
23ifeq ($(CONFIG_RTE_ARCH_X86_64),y)
24SRCS-y += oob_monitor_x86.c
25else
26SRCS-y += oob_monitor_nop.c
27endif
28
29CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/
30CFLAGS += $(WERROR_FLAGS)
f67539c2 31CFLAGS += -DALLOW_EXPERIMENTAL_API
11fdf7f2
TL
32
33LDLIBS += -lvirt
34
9f95a23c
TL
35JANSSON := $(shell pkg-config --exists jansson; echo $$?)
36ifeq ($(JANSSON), 0)
37LDLIBS += $(shell pkg-config --libs jansson)
38CFLAGS += -DUSE_JANSSON
39endif
40
11fdf7f2
TL
41ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
42
43ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y)
44LDLIBS += -lrte_pmd_ixgbe
45endif
46
47ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
48LDLIBS += -lrte_pmd_i40e
49endif
50
51ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD),y)
52LDLIBS += -lrte_pmd_bnxt
53endif
54
55endif
56
57# workaround for a gcc bug with noreturn attribute
58# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
59ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
60CFLAGS_main.o += -Wno-return-type
61endif
62
63include $(RTE_SDK)/mk/rte.extapp.mk
64
65endif # libvirt check