aboutsummaryrefslogtreecommitdiff
path: root/package/ktap/ktap.mk
blob: 4a0e51cf96c0266edfb1b17b7b176870d9dbcb50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
################################################################################
#
# ktap
#
################################################################################

KTAP_VERSION = eb66d40310c93dc82bc8eac889744c1ed1f01f7b
KTAP_SITE = $(call github,ktap,ktap,$(KTAP_VERSION))
KTAP_LICENSE = GPLv2
KTAP_LICENSE_FILES = LICENSE-GPL

KTAP_DEPENDENCIES = linux

ifeq ($(BR2_PACKAGE_ELFUTILS),y)
KTAP_DEPENDENCIES += elfutils
else
KTAP_FLAGS += NO_LIBELF=1
endif

define KTAP_BUILD_CMDS
	$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) $(KTAP_FLAGS) ktap
	$(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KERNEL_SRC=$(LINUX_DIR) KVERSION=$(LINUX_VERSION_PROBED) mod
endef

define KTAP_INSTALL_TARGET_CMDS
	$(INSTALL) -D -m755 $(@D)/ktap  $(TARGET_DIR)/usr/bin/ktap
	$(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KERNEL_SRC=$(LINUX_DIR) KVERSION=$(LINUX_VERSION_PROBED) modules_install
endef

$(eval $(generic-package))