18db653ffSAlan Carew# BSD LICENSE 28db653ffSAlan Carew# 38db653ffSAlan Carew# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. 48db653ffSAlan Carew# All rights reserved. 58db653ffSAlan Carew# 68db653ffSAlan Carew# Redistribution and use in source and binary forms, with or without 78db653ffSAlan Carew# modification, are permitted provided that the following conditions 88db653ffSAlan Carew# are met: 98db653ffSAlan Carew# 108db653ffSAlan Carew# * Redistributions of source code must retain the above copyright 118db653ffSAlan Carew# notice, this list of conditions and the following disclaimer. 128db653ffSAlan Carew# * Redistributions in binary form must reproduce the above copyright 138db653ffSAlan Carew# notice, this list of conditions and the following disclaimer in 148db653ffSAlan Carew# the documentation and/or other materials provided with the 158db653ffSAlan Carew# distribution. 168db653ffSAlan Carew# * Neither the name of Intel Corporation nor the names of its 178db653ffSAlan Carew# contributors may be used to endorse or promote products derived 188db653ffSAlan Carew# from this software without specific prior written permission. 198db653ffSAlan Carew# 208db653ffSAlan Carew# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 218db653ffSAlan Carew# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 228db653ffSAlan Carew# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 238db653ffSAlan Carew# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 248db653ffSAlan Carew# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 258db653ffSAlan Carew# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 268db653ffSAlan Carew# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 278db653ffSAlan Carew# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 288db653ffSAlan Carew# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 298db653ffSAlan Carew# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 308db653ffSAlan Carew# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 318db653ffSAlan Carew 32*e5140f52SMarvin Liuifneq ($(shell pkg-config --atleast-version=0.9.3 libvirt; echo $$?), 0) 33*e5140f52SMarvin Liu$(error vm_power_manager requires libvirt >= 0.9.3) 34*e5140f52SMarvin Liuelse 35*e5140f52SMarvin Liu 368db653ffSAlan Carewifeq ($(RTE_SDK),) 378db653ffSAlan Carew$(error "Please define RTE_SDK environment variable") 388db653ffSAlan Carewendif 398db653ffSAlan Carew 408db653ffSAlan Carew# Default target, can be overridden by command line or environment 418db653ffSAlan CarewRTE_TARGET ?= x86_64-native-linuxapp-gcc 428db653ffSAlan Carew 438db653ffSAlan Carewinclude $(RTE_SDK)/mk/rte.vars.mk 448db653ffSAlan Carew 458db653ffSAlan Carew# binary name 468db653ffSAlan CarewAPP = vm_power_mgr 478db653ffSAlan Carew 488db653ffSAlan Carew# all source are stored in SRCS-y 498db653ffSAlan CarewSRCS-y := main.c vm_power_cli.c power_manager.c channel_manager.c 508db653ffSAlan CarewSRCS-y += channel_monitor.c 518db653ffSAlan Carew 522e099bc5SOlivier MatzCFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/ 538db653ffSAlan CarewCFLAGS += $(WERROR_FLAGS) 548db653ffSAlan Carew 552e099bc5SOlivier MatzLDLIBS += -lvirt 562e099bc5SOlivier Matz 578db653ffSAlan Carew# workaround for a gcc bug with noreturn attribute 588db653ffSAlan Carew# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 598db653ffSAlan Carewifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) 608db653ffSAlan CarewCFLAGS_main.o += -Wno-return-type 618db653ffSAlan Carewendif 628db653ffSAlan Carew 638db653ffSAlan Carewinclude $(RTE_SDK)/mk/rte.extapp.mk 64*e5140f52SMarvin Liu 65*e5140f52SMarvin Liuendif # libvirt check 66