janus-gateway: make echo test plugin optional
[buildroot-gz.git] / package / kvmtool / kvmtool.mk
blob12454e1bfdbed210fc4e35fb4ac2259b003b5cf7
1 ################################################################################
3 # kvmtool
5 ################################################################################
7 KVMTOOL_VERSION = bed2bd9e1fbef5819090feeada7b86eed97ca5e2
8 KVMTOOL_SITE = $(BR2_KERNEL_MIRROR)/scm/linux/kernel/git/will/kvmtool.git
9 KVMTOOL_SITE_METHOD = git
10 KVMTOOL_DEPENDENCIES = \
11 $(if $(BR2_PACKAGE_BINUTILS),binutils) \
12 $(if $(BR2_PACKAGE_DTC),dtc) \
13 $(if $(BR2_PACKAGE_LIBAIO),libaio) \
14 $(if $(BR2_PACKAGE_LIBGTK3),libgtk3) \
15 $(if $(BR2_PACKAGE_LIBVNCSERVER),libvncserver) \
16 $(if $(BR2_PACKAGE_SDL),sdl) \
17 $(if $(BR2_PACKAGE_ZLIB),zlib)
18 KVMTOOL_LICENSE = GPLv2
19 KVMTOOL_LICENSE_FILES = COPYING
21 # This is required to convert a static binary (init helper) back into
22 # object-file format, and in multilib toolchains like CS 2012.09 for x86
23 # the default is i386, hence when building for x86_64 things break since
24 # LD doesn't autodetect the input file format.
25 # GCC-as-linker can't accomplish this feat easily either since it's mixing
26 # static content (guest_init.o) with dynamic one (lkvm) making
27 # a relocatable output file.
28 # The purpose of this trick is to embed the init helper into the main
29 # binary to help users in guest system startup, which would otherwise
30 # require more complex guest images.
31 # This needs revisiting if/when X32 ABI support is added.
33 # If more packages need this (unlikely) an ld wrapper might be a better
34 # solution, using gcc -dumpspecs information.
35 KVMTOOL_EXTRA_LDFLAGS = \
36 $(if $(BR2_x86_64),-m elf_x86_64)
38 # Disable -Werror, otherwise musl is not happy
39 KVMTOOL_MAKE_OPTS = \
40 CROSS_COMPILE="$(TARGET_CROSS)" \
41 LDFLAGS="$(TARGET_LDFLAGS) $(KVMTOOL_EXTRA_LDFLAGS)" \
42 WERROR=0
44 define KVMTOOL_BUILD_CMDS
45 $(TARGET_MAKE_ENV) ARCH=$(KERNEL_ARCH) $(MAKE) -C $(@D) $(KVMTOOL_MAKE_OPTS)
46 endef
48 define KVMTOOL_INSTALL_TARGET_CMDS
49 $(TARGET_MAKE_ENV) ARCH=$(KERNEL_ARCH) $(MAKE) -C $(@D) \
50 $(KVMTOOL_MAKE_OPTS) install DESTDIR=$(TARGET_DIR) prefix=/usr
51 endef
53 $(eval $(generic-package))