Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752483AbdI0XDV (ORCPT ); Wed, 27 Sep 2017 19:03:21 -0400 Received: from smtp-out-no.shaw.ca ([64.59.134.9]:57243 "EHLO smtp-out-no.shaw.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752192AbdI0XDT (ORCPT ); Wed, 27 Sep 2017 19:03:19 -0400 X-Authority-Analysis: v=2.2 cv=a+JAzQaF c=1 sm=1 tr=0 a=k5HOQ6ZN7M0zyjl8M7O1NA==:117 a=k5HOQ6ZN7M0zyjl8M7O1NA==:17 a=2JCJgTwv5E4A:10 a=Q-fNiiVtAAAA:8 a=Uy65zSobSqMlVjN8NyEA:9 a=Fp8MccfUoT0GBdDC_Lng:22 From: Markus Mayer To: Zhang Rui Cc: Markus Mayer , Broadcom Kernel List , Power Management List , Linux Kernel Mailing List Subject: [PATCH 3/3] tools/thermal: tmon: use $(PKG_CONFIG) instead of hard-coding pkg-config Date: Wed, 27 Sep 2017 16:02:37 -0700 Message-Id: <20170927230237.62199-4-code@mmayer.net> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170927230237.62199-1-code@mmayer.net> References: <20170927230237.62199-1-code@mmayer.net> X-CMAE-Envelope: MS4wfIzgaUYBT7EthUl3+NpPGMydvawmX2iZohXxAlfXztrNErBRJ2kFPntCEcRxYecz+6g0jrr9hfptx6w/BmwTr00L+XX0hPt2W1wleU+v8XsDp12AHKSg iv9DryII6fuJ59OUKwaU90Ca/CvxMl+ZZ9qpSNNS8M2ZhVkYznjv0Qscigv/TGQcOVydoydHCOTJDtvhTpO26ZXmXD558nkhw/9qopWIaDlGfP2RYi4+oStu BUzK2ap18VH8rR4mzhhahUDVleedhbEttiP7S4C7hTbRO/m3IPE3pDhQ1QfG8wi6cwR6gAiuw3Z9KL3x3xHPeedaspZyLM+DKo3nLv6VOyY= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1496 Lines: 41 From: Markus Mayer To ease cross-compiling, make use of the $(PKG_CONFIG) variable rather than hard-coding calls to pkg-config. Signed-off-by: Markus Mayer --- tools/thermal/tmon/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile index 581da71..1e11bd3 100644 --- a/tools/thermal/tmon/Makefile +++ b/tools/thermal/tmon/Makefile @@ -9,6 +9,7 @@ CFLAGS+= -O1 ${WARNFLAGS} # Add "-fstack-protector" only if toolchain supports it. CFLAGS+= $(call cc-option,-fstack-protector) CC?= $(CROSS_COMPILE)gcc +PKG_CONFIG?= pkg-config CFLAGS+=-D VERSION=\"$(VERSION)\" LDFLAGS+= @@ -23,12 +24,12 @@ STATIC := --static endif TMON_LIBS=-lm -lpthread -TMON_LIBS += $(shell pkg-config --libs $(STATIC) panelw ncursesw 2> /dev/null || \ - pkg-config --libs $(STATIC) panel ncurses 2> /dev/null || \ +TMON_LIBS += $(shell $(PKG_CONFIG) --libs $(STATIC) panelw ncursesw 2> /dev/null || \ + $(PKG_CONFIG) --libs $(STATIC) panel ncurses 2> /dev/null || \ echo -lpanel -lncurses) -CFLAGS += $(shell pkg-config --cflags $(STATIC) panelw ncursesw 2> /dev/null || \ - pkg-config --cflags $(STATIC) panel ncurses 2> /dev/null) +CFLAGS += $(shell $(PKG_CONFIG) --cflags $(STATIC) panelw ncursesw 2> /dev/null || \ + $(PKG_CONFIG) --cflags $(STATIC) panel ncurses 2> /dev/null) OBJS = tmon.o tui.o sysfs.o pid.o OBJS += -- 2.7.4