]> git.baikalelectronics.ru Git - kernel.git/commit
tools/thermal: tmon: use pkg-config to determine library dependencies
authorBrian Norris <computersforpeace@gmail.com>
Wed, 18 Feb 2015 02:18:35 +0000 (18:18 -0800)
committerZhang Rui <rui.zhang@intel.com>
Sat, 28 Feb 2015 05:52:48 +0000 (13:52 +0800)
commit30666a1db160b3497c41b60069d998543c21c0ab
treebd37b442b83cb25e611c4f4da8b5c85cf0bca09b
parent01c3dd3dcf5bc474f3500661dc54a7e9e02efdc5
tools/thermal: tmon: use pkg-config to determine library dependencies

Some distros (e.g., Arch Linux) don't package the tinfo library
separately from ncurses, so don't unconditionally include it. Instead,
use pkg-config.

The $(STATIC) ugliness is to handle the reported build case from commit
2d73e0428ee4 ("tools/thermal: tmon: fix compilation errors when building
statically"), where a developer wants to be able to build with:

  make LDFLAGS=-static

which requires an additional pkg-config flag.

Finally, support a lowest common denominator fallback (-lpanel
-lncurses) for build systems that don't have pkg-config entries for
ncurses.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
tools/thermal/tmon/Makefile