aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Mayer <mmayer@broadcom.com>2017-09-27 19:02:37 -0400
committerZhang Rui <rui.zhang@intel.com>2017-10-17 21:59:31 -0400
commit501a5c71d1f754e44142af6cae59042a8c3b2a11 (patch)
tree5fa5e340e8ba53c495c70eaaf49215beaf600373
parentc21568ffabed918882c61eada79146706bd94684 (diff)
tools/thermal: tmon: use $(PKG_CONFIG) instead of hard-coding pkg-config
To ease cross-compiling, make use of the $(PKG_CONFIG) variable rather than hard-coding calls to pkg-config. Signed-off-by: Markus Mayer <mmayer@broadcom.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-rw-r--r--tools/thermal/tmon/Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile
index 581da716ea1c..1e11bd38a6b4 100644
--- a/tools/thermal/tmon/Makefile
+++ b/tools/thermal/tmon/Makefile
@@ -9,6 +9,7 @@ CFLAGS+= -O1 ${WARNFLAGS}
9# Add "-fstack-protector" only if toolchain supports it. 9# Add "-fstack-protector" only if toolchain supports it.
10CFLAGS+= $(call cc-option,-fstack-protector) 10CFLAGS+= $(call cc-option,-fstack-protector)
11CC?= $(CROSS_COMPILE)gcc 11CC?= $(CROSS_COMPILE)gcc
12PKG_CONFIG?= pkg-config
12 13
13CFLAGS+=-D VERSION=\"$(VERSION)\" 14CFLAGS+=-D VERSION=\"$(VERSION)\"
14LDFLAGS+= 15LDFLAGS+=
@@ -23,12 +24,12 @@ STATIC := --static
23endif 24endif
24 25
25TMON_LIBS=-lm -lpthread 26TMON_LIBS=-lm -lpthread
26TMON_LIBS += $(shell pkg-config --libs $(STATIC) panelw ncursesw 2> /dev/null || \ 27TMON_LIBS += $(shell $(PKG_CONFIG) --libs $(STATIC) panelw ncursesw 2> /dev/null || \
27 pkg-config --libs $(STATIC) panel ncurses 2> /dev/null || \ 28 $(PKG_CONFIG) --libs $(STATIC) panel ncurses 2> /dev/null || \
28 echo -lpanel -lncurses) 29 echo -lpanel -lncurses)
29 30
30CFLAGS += $(shell pkg-config --cflags $(STATIC) panelw ncursesw 2> /dev/null || \ 31CFLAGS += $(shell $(PKG_CONFIG) --cflags $(STATIC) panelw ncursesw 2> /dev/null || \
31 pkg-config --cflags $(STATIC) panel ncurses 2> /dev/null) 32 $(PKG_CONFIG) --cflags $(STATIC) panel ncurses 2> /dev/null)
32 33
33OBJS = tmon.o tui.o sysfs.o pid.o 34OBJS = tmon.o tui.o sysfs.o pid.o
34OBJS += 35OBJS +=