fontconfig: needs host-gperf
[buildroot-gz.git] / package / linux-tools / linux-tool-selftests.mk
blobc4e5bf0feaf8d47f996f828f326cf7b85b1c31b1
1 ################################################################################
3 # selftests
5 ################################################################################
7 LINUX_TOOLS += selftests
9 ifeq ($(KERNEL_ARCH),x86_64)
10 SELFTESTS_ARCH=x86
11 else
12 ifeq ($(KERNEL_ARCH),i386)
13 SELFTESTS_ARCH=x86
14 else
15 SELFTESTS_ARCH=$(KERNEL_ARCH)
16 endif
17 endif
19 SELFTESTS_DEPENDENCIES = libcap-ng popt
21 SELFTESTS_MAKE_FLAGS = \
22 $(LINUX_MAKE_FLAGS) \
23 ARCH=$(SELFTESTS_ARCH)
25 # O must be redefined here to overwrite the one used by Buildroot for
26 # out of tree build. We build the selftests in $(LINUX_DIR)/tools/selftests and
27 # not just $(LINUX_DIR) so that it isn't built in the root directory of the kernel
28 # sources.
30 # The headers_install step here is important as some kernel selftests use a
31 # hardcoded CFLAGS to find kernel headers e.g:
32 # CFLAGS += -I../../../../usr/include/
33 # The headers_install target will install the kernel headers locally inside
34 # the Linux build dir
35 define SELFTESTS_BUILD_CMDS
36 $(TARGET_MAKE_ENV) $(MAKE1) -C $(LINUX_DIR) $(SELFTESTS_MAKE_FLAGS) \
37 headers_install
38 $(TARGET_MAKE_ENV) $(MAKE1) -C $(LINUX_DIR)/tools/testing/selftests \
39 $(SELFTESTS_MAKE_FLAGS) O=$(LINUX_DIR)/tools/testing/selftests
40 endef
42 define SELFTESTS_INSTALL_TARGET_CMDS
43 $(TARGET_MAKE_ENV) $(MAKE1) -C $(LINUX_DIR)/tools/testing/selftests \
44 $(SELFTESTS_MAKE_FLAGS) O=$(LINUX_DIR)/tools/testing/selftests \
45 INSTALL_PATH=$(TARGET_DIR)/usr/lib/kselftests install
46 endef