xref: /dpdk/examples/vm_power_manager/Makefile (revision 99a968fa)
13998e2a0SBruce Richardson# SPDX-License-Identifier: BSD-3-Clause
23998e2a0SBruce Richardson# Copyright(c) 2010-2014 Intel Corporation
38db653ffSAlan Carew
4e5140f52SMarvin Liuifneq ($(shell pkg-config --atleast-version=0.9.3 libvirt; echo $$?), 0)
5e5140f52SMarvin Liu$(error vm_power_manager requires libvirt >= 0.9.3)
6e5140f52SMarvin Liuelse
7e5140f52SMarvin Liu
88db653ffSAlan Carewifeq ($(RTE_SDK),)
98db653ffSAlan Carew$(error "Please define RTE_SDK environment variable")
108db653ffSAlan Carewendif
118db653ffSAlan Carew
128db653ffSAlan Carew# Default target, can be overridden by command line or environment
138db653ffSAlan CarewRTE_TARGET ?= x86_64-native-linuxapp-gcc
148db653ffSAlan Carew
158db653ffSAlan Carewinclude $(RTE_SDK)/mk/rte.vars.mk
168db653ffSAlan Carew
1722119c45SBruce Richardson# binary name
1822119c45SBruce RichardsonAPP = vm_power_mgr
1922119c45SBruce Richardson
2022119c45SBruce Richardson# all source are stored in SRCS-y
2122119c45SBruce RichardsonSRCS-y := main.c vm_power_cli.c power_manager.c channel_manager.c
22*99a968faSDavid HuntSRCS-y += channel_monitor.c parse.c
2322119c45SBruce Richardson
242e099bc5SOlivier MatzCFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/
258db653ffSAlan CarewCFLAGS += $(WERROR_FLAGS)
268db653ffSAlan Carew
272e099bc5SOlivier MatzLDLIBS += -lvirt
282e099bc5SOlivier Matz
29f14791a8SRory Sextonifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
30f14791a8SRory Sexton
31f14791a8SRory Sextonifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y)
32f14791a8SRory SextonLDLIBS += -lrte_pmd_ixgbe
33f14791a8SRory Sextonendif
34f14791a8SRory Sexton
35f14791a8SRory Sextonifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
36f14791a8SRory SextonLDLIBS += -lrte_pmd_i40e
37f14791a8SRory Sextonendif
38f14791a8SRory Sexton
39f14791a8SRory Sextonifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD),y)
40f14791a8SRory SextonLDLIBS += -lrte_pmd_bnxt
41f14791a8SRory Sextonendif
42f14791a8SRory Sexton
43f14791a8SRory Sextonendif
44f14791a8SRory Sexton
458db653ffSAlan Carew# workaround for a gcc bug with noreturn attribute
468db653ffSAlan Carew# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
478db653ffSAlan Carewifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
488db653ffSAlan CarewCFLAGS_main.o += -Wno-return-type
498db653ffSAlan Carewendif
508db653ffSAlan Carew
518db653ffSAlan Carewinclude $(RTE_SDK)/mk/rte.extapp.mk
52e5140f52SMarvin Liu
53e5140f52SMarvin Liuendif # libvirt check
54