From patchwork Wed Sep 27 23:02:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Mayer X-Patchwork-Id: 9975021 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2ECE260375 for ; Wed, 27 Sep 2017 23:03:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2246528ABF for ; Wed, 27 Sep 2017 23:03:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 167BE29377; Wed, 27 Sep 2017 23:03:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9945C28ABF for ; Wed, 27 Sep 2017 23:03:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752453AbdI0XDU (ORCPT ); Wed, 27 Sep 2017 19:03:20 -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 Received: from triton.mmayer.net ([96.48.165.49]) by shaw.ca with SMTP id xLMLdoF3MM9gtxLMMdofhZ; Wed, 27 Sep 2017 17:03:18 -0600 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 Received: by triton.mmayer.net (Postfix, from userid 501) id 6FABC2004ED52A; Wed, 27 Sep 2017 16:03:17 -0700 (PDT) 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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 +=