logrotate: enable selinux support
[buildroot-gz.git] / package / kvm-unit-tests / kvm-unit-tests.mk
blob0ddb017802be9749ba7e98093b5e3d8789722a40
1 ################################################################################
3 # kvm-unit-tests
5 ################################################################################
7 KVM_UNIT_TESTS_VERSION = 5731572b2ac23eb410732110b93425b5bb7f27dd
8 KVM_UNIT_TESTS_SITE = $(BR2_KERNEL_MIRROR)/scm/virt/kvm/kvm-unit-tests.git
9 KVM_UNIT_TESTS_SITE_METHOD = git
10 KVM_UNIT_TESTS_LICENSE = LGPLv2
11 KVM_UNIT_TESTS_LICENSE_FILES = COPYRIGHT
13 ifeq ($(BR2_arm),y)
14 KVM_UNIT_TESTS_ARCH = arm
15 else ifeq ($(BR2_i386),y)
16 KVM_UNIT_TESTS_ARCH = i386
17 else ifeq ($(BR2_powerpc64)$(BR2_powerpc64le),y)
18 KVM_UNIT_TESTS_ARCH = ppc64
19 else ifeq ($(BR2_x86_64),y)
20 KVM_UNIT_TESTS_ARCH = x86_64
21 endif
23 ifeq ($(BR2_ENDIAN),"LITTLE")
24 KVM_UNIT_TESTS_ENDIAN = little
25 else
26 KVM_UNIT_TESTS_ENDIAN = big
27 endif
29 KVM_UNIT_TESTS_CONF_OPTS =\
30 --arch="$(KVM_UNIT_TESTS_ARCH)" \
31 --processor="$(call qstrip,$(BR2_GCC_TARGET_CPU))" \
32 --endian="$(KVM_UNIT_TESTS_ENDIAN)"
34 # For all architectures but x86-64, we use the target
35 # compiler. However, for x86-64, we use the host compiler, as
36 # kvm-unit-tests builds 32 bit code, which Buildroot toolchains for
37 # x86-64 cannot do.
38 ifneq ($(BR2_x86_64),y)
39 KVM_UNIT_TESTS_CONF_OPTS += --cross-prefix="$(TARGET_CROSS)"
40 endif
42 define KVM_UNIT_TESTS_CONFIGURE_CMDS
43 cd $(@D) && ./configure $(KVM_UNIT_TESTS_CONF_OPTS)
44 endef
46 define KVM_UNIT_TESTS_BUILD_CMDS
47 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) standalone
48 endef
50 define KVM_UNIT_TESTS_INSTALL_TARGET_CMDS
51 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
52 DESTDIR=$(TARGET_DIR)/usr/share/kvm-unit-tests/ \
53 install
54 endef
56 # Does use configure script but not an autotools one
57 $(eval $(generic-package))