diff options
author | Heiko Thiery <heiko.thiery@gmail.com> | 2022-07-20 12:31:35 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-08-04 15:32:20 -0400 |
commit | 124b21e7bd3d0ad5258c7cf84540301bff27012a (patch) | |
tree | cd9944c3deee8ba931455786c291287d0f8e51e3 | |
parent | 31a7688cbe0ed5edf4108a1f7ef4653659610d4b (diff) | |
download | u-boot-124b21e7bd3d0ad5258c7cf84540301bff27012a.zip u-boot-124b21e7bd3d0ad5258c7cf84540301bff27012a.tar.gz u-boot-124b21e7bd3d0ad5258c7cf84540301bff27012a.tar.bz2 |
tools: kwboot: use pkg-config to get -ltinfo
Instead of hardcoding -ltinfo as the flags needed to build
kwboot, use pkg-config when available.
We gracefully fallback on the previous behavior of hardcoding -ltinfo
if pkg-config is not available or fails with an error.
Reviewed-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
-rw-r--r-- | tools/Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/Makefile b/tools/Makefile index aab06ae..005e736 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -198,7 +198,9 @@ hostprogs-$(CONFIG_EXYNOS5420) += mkexynosspl HOSTCFLAGS_mkexynosspl.o := -pedantic HOSTCFLAGS_kwboot.o += -pthread -HOSTLDLIBS_kwboot += -pthread -ltinfo +HOSTLDLIBS_kwboot += -pthread +HOSTLDLIBS_kwboot += \ + $(shell pkg-config --libs tinfo 2> /dev/null || echo "-ltinfo") ifdtool-objs := $(LIBFDT_OBJS) ifdtool.o hostprogs-$(CONFIG_X86) += ifdtool |