e1779ef23c
Signed-off-by: Markus Mayer <mmayer@broadcom.com> [Thomas: - tweak Config.in help text as provided by Markus - adjust commit log - add missing select BR2_PACKAGE_NCURSES - add missing dependency on host-pkgconf, used by the tmon Makefile to find ncurses - add logic to disable -fstack-protector when the toolchain doesn't have SSP support.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
38 lines
1.0 KiB
Makefile
38 lines
1.0 KiB
Makefile
################################################################################
|
|
#
|
|
# tmon
|
|
#
|
|
################################################################################
|
|
|
|
LINUX_TOOLS += tmon
|
|
|
|
TMON_DEPENDENCIES = host-pkgconf ncurses
|
|
TMON_MAKE_OPTS = $(LINUX_MAKE_FLAGS) \
|
|
CC=$(TARGET_CC) \
|
|
PKG_CONFIG_PATH=$(STAGING_DIR)/usr/lib/pkgconfig
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_SSP),)
|
|
define TMON_DISABLE_STACK_PROTECTOR
|
|
$(SED) 's%-fstack-protector%%' $(LINUX_DIR)/tools/thermal/tmon/Makefile
|
|
endef
|
|
endif
|
|
|
|
define TMON_BUILD_CMDS
|
|
$(Q)if ! grep install $(LINUX_DIR)/tools/thermal/tmon/Makefile >/dev/null 2>&1 ; then \
|
|
echo "Your kernel version is too old and does not have the tmon tool." ; \
|
|
echo "At least kernel 3.13 must be used." ; \
|
|
exit 1 ; \
|
|
fi
|
|
$(TMON_DISABLE_STACK_PROTECTOR)
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \
|
|
$(TMON_MAKE_OPTS) \
|
|
tmon
|
|
endef
|
|
|
|
define TMON_INSTALL_TARGET_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools \
|
|
$(TMON_MAKE_OPTS) \
|
|
INSTALL_ROOT=$(TARGET_DIR) \
|
|
tmon_install
|
|
endef
|