summaryrefslogtreecommitdiff
path: root/examples/vm_power_manager
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2017-10-09 14:13:16 +0100
committerBruce Richardson <bruce.richardson@intel.com>2018-01-30 21:58:59 +0100
commit22119c4591a008abe5de8e395a97fcc09c8dc14a (patch)
treed6e42fc5b35f7a68888aa03c7eca60c82752f449 /examples/vm_power_manager
parent0eba4ade654bae51877474fb64ab5e79df0f3442 (diff)
downloaddpdk-22119c4591a008abe5de8e395a97fcc09c8dc14a.zip
dpdk-22119c4591a008abe5de8e395a97fcc09c8dc14a.tar.gz
dpdk-22119c4591a008abe5de8e395a97fcc09c8dc14a.tar.xz
examples: use pkg-config in makefiles
Change the example app Makefiles to query if DPDK is installed and registered using pkg-config. If so, build directly using pkg-config info, otherwise fall back to using the original build system with RTE_SDK and RTE_TARGET This commit changes the makefiles for the basic examples, i.e. those which do not have multiple subdirectories underneath the main examples dir. Examples not covered are: * ethtool * multi_process * performance-thread * quota_watermark * netmap_compat * server_node_efd * vm_power_manager Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Luca Boccassi <bluca@debian.org>
Diffstat (limited to 'examples/vm_power_manager')
-rw-r--r--examples/vm_power_manager/Makefile14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile
index 700b119..ef2a9f9 100644
--- a/examples/vm_power_manager/Makefile
+++ b/examples/vm_power_manager/Makefile
@@ -1,13 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2010-2014 Intel Corporation
-# binary name
-APP = vm_power_mgr
-
-# all source are stored in SRCS-y
-SRCS-y := main.c vm_power_cli.c power_manager.c channel_manager.c
-SRCS-y += channel_monitor.c
-
ifneq ($(shell pkg-config --atleast-version=0.9.3 libvirt; echo $$?), 0)
$(error vm_power_manager requires libvirt >= 0.9.3)
else
@@ -21,6 +14,13 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
+# binary name
+APP = vm_power_mgr
+
+# all source are stored in SRCS-y
+SRCS-y := main.c vm_power_cli.c power_manager.c channel_manager.c
+SRCS-y += channel_monitor.c
+
CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/
CFLAGS += $(WERROR_FLAGS)