1 ################################################################################
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
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
23 ifeq ($(BR2_ENDIAN
),"LITTLE")
24 KVM_UNIT_TESTS_ENDIAN
= little
26 KVM_UNIT_TESTS_ENDIAN
= big
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
38 ifneq ($(BR2_x86_64
),y
)
39 KVM_UNIT_TESTS_CONF_OPTS
+= --cross-prefix
="$(TARGET_CROSS)"
42 define KVM_UNIT_TESTS_CONFIGURE_CMDS
43 cd
$(@D
) && .
/configure
$(KVM_UNIT_TESTS_CONF_OPTS
)
46 define KVM_UNIT_TESTS_BUILD_CMDS
47 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
) standalone
50 define KVM_UNIT_TESTS_INSTALL_TARGET_CMDS
51 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
) \
52 DESTDIR
=$(TARGET_DIR
)/usr
/share
/kvm-unit-tests
/ \
56 # Does use configure script but not an autotools one
57 $(eval
$(generic-package
))