mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
tools: lib: thermal: use pkg-config to locate libnl3
[ Upstream commit b31f7f725c ]
To make libthermal more cross compile friendly use pkg-config to locate
libnl3. Only if that fails fall back to hardcoded /usr/include/libnl3.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e5c5a7c0c3
commit
3cc8161f91
@@ -46,8 +46,12 @@ else
|
||||
CFLAGS := -g -Wall
|
||||
endif
|
||||
|
||||
NL3_CFLAGS = $(shell pkg-config --cflags libnl-3.0 2>/dev/null)
|
||||
ifeq ($(NL3_CFLAGS),)
|
||||
NL3_CFLAGS = -I/usr/include/libnl3
|
||||
endif
|
||||
|
||||
INCLUDES = \
|
||||
-I/usr/include/libnl3 \
|
||||
-I$(srctree)/tools/lib/thermal/include \
|
||||
-I$(srctree)/tools/lib/ \
|
||||
-I$(srctree)/tools/include \
|
||||
@@ -59,6 +63,7 @@ INCLUDES = \
|
||||
override CFLAGS += $(EXTRA_WARNINGS)
|
||||
override CFLAGS += -Werror -Wall
|
||||
override CFLAGS += -fPIC
|
||||
override CFLAGS += $(NL3_CFLAGS)
|
||||
override CFLAGS += $(INCLUDES)
|
||||
override CFLAGS += -fvisibility=hidden
|
||||
override CFGLAS += -Wl,-L.
|
||||
|
||||
Reference in New Issue
Block a user