2022-01-31 19:51:54 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# bpftool
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2023-01-10 02:56:58 +01:00
|
|
|
BPFTOOL_VERSION = v7.1.0
|
2022-01-31 19:51:54 +01:00
|
|
|
BPFTOOL_SITE = https://github.com/libbpf/bpftool
|
|
|
|
BPFTOOL_SITE_METHOD = git
|
|
|
|
BPFTOOL_GIT_SUBMODULES = YES
|
|
|
|
BPFTOOL_LICENSE = GPL-2.0, BSD-2-Clause
|
|
|
|
BPFTOOL_LICENSE_FILES = LICENSE LICENSE.BSD-2-Clause LICENSE.GPL-2.0
|
|
|
|
BPFTOOL_DEPENDENCIES = binutils elfutils
|
|
|
|
HOST_BPFTOOL_DEPENDENCIES = host-elfutils host-pkgconf host-zlib
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBCAP),y)
|
|
|
|
BPFTOOL_DEPENDENCIES += libcap
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
|
|
|
BPFTOOL_DEPENDENCIES += zlib
|
|
|
|
endif
|
|
|
|
|
|
|
|
define BPFTOOL_BUILD_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \
|
|
|
|
-C $(@D)/src
|
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_BPFTOOL_BUILD_CMDS
|
|
|
|
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
|
|
|
|
-C $(@D)/src
|
|
|
|
endef
|
|
|
|
|
|
|
|
define BPFTOOL_INSTALL_TARGET_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \
|
2023-01-10 02:56:58 +01:00
|
|
|
-C $(@D)/src install-bin DESTDIR="$(TARGET_DIR)" prefix=/usr
|
2022-01-31 19:51:54 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_BPFTOOL_INSTALL_CMDS
|
|
|
|
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
|
2023-01-10 02:56:58 +01:00
|
|
|
-C $(@D)/src install-bin DESTDIR="$(HOST_DIR)" prefix=
|
2022-01-31 19:51:54 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|
|
|
|
$(eval $(host-generic-package))
|