#!/usr/bin/make -f

# pryorm09@gmail.com
# Feb 2017, makefile to drive configure

export XTRACT_CFGS := $(shell sh ~/build/SOURCES/extract-config-opts \
        linux-amd64 ~/build/SOURCES/qemu-config.br)
export backend_modules="xen-evtchn xen-gntdev xen-gntalloc xen-blkback xen-netback xen-pciback xen-privcmd"

tools-config:
	echo "tools-cfg: starting configure from build"
	WGET=/bin/false \
	PYTHON=/usr/bin/python3 ./configure APPEND_INCLUDES=-Wno-error \
	$(CMNVAR) \
	--enable-blktap2 \
	--enable-ocamltools --enable-xsmpolicy --enable-efi \
	--enable-systemd --disable-stubdom --disable-pvshim \
	--disable-qemu-traditional --disable-rombios \
	--with-linux-backend-modules=$(backend_modules) \
	--with-system-qemu=/usr/bin/qemu-system-i386 \
	--with-extra-qemuu-configure-args="--mandir=/usr/share/man --python=/usr/bin/python3 --enable-docs $(XTRACT_CFGS) --enable-system --enable-modules --disable-bluez --disable-smartcard" \
 	--enable-ovmf --with-system-ovmf=/usr/share/qemu-xen/qemu/ovmf.bin --disable-ioemu-stubdom;

