kumquat-buildroot/package/linux-tools/linux-tool-bpftool.mk.in

38 lines
956 B
Makefile
Raw Normal View History

################################################################################
#
# bpftool
#
################################################################################
LINUX_TOOLS += bpftool
BPFTOOL_DEPENDENCIES = binutils elfutils
ifeq ($(BR2_PACKAGE_LIBCAP),y)
BPFTOOL_DEPENDENCIES += libcap
endif
ifeq ($(BR2_PACKAGE_ZLIB),y)
BPFTOOL_DEPENDENCIES += zlib
endif
BPFTOOL_MAKE_OPTS = $(LINUX_MAKE_FLAGS)
define BPFTOOL_BUILD_CMDS
$(Q)if ! grep install $(LINUX_DIR)/tools/bpf/bpftool/Makefile >/dev/null 2>&1 ; then \
echo "Your kernel version is too old and does not have install section in the bpf tools." ; \
echo "At least kernel 4.15 must be used." ; \
exit 1 ; \
fi
$(TARGET_MAKE_ENV) $(MAKE1) -C $(LINUX_DIR)/tools/bpf/bpftool \
$(BPFTOOL_MAKE_OPTS)
endef
define BPFTOOL_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE1) -C $(LINUX_DIR)/tools/bpf/bpftool \
$(BPFTOOL_MAKE_OPTS) \
DESTDIR=$(TARGET_DIR) \
install
endef