#!/usr/bin/make -f

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

#echo $(HOME)

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

tools-config:
	echo "$(HOME)"
	echo "tools-cfg: starting configure from build"
	WGET=/bin/false \
	PYTHON=/usr/bin/python3 ./configure APPEND_INCLUDES=-Wno-error \
	$(CMNVAR) \
	--with-rundir=/run \
	--enable-ocamltools --enable-xsmpolicy --enable-efi \
	--enable-systemd --disable-stubdom --enable-c-stubdom --enable-pv-grub --disable-debug \
	--enable-qemu-traditional --enable-rombios \
	--enable-pvshim \
	--with-linux-backend-modules=$(backend_modules) \
	--with-system-qemu=/usr/bin/qemu-system-i386 \
	--with-extra-qemuu-configure-args="--enable-linux-io-uring --enable-modules --mandir=/usr/share/man --enable-docs --enable-kvm --enable-tcg $(XTRACT_CFGS) --enable-system --enable-blkio --disable-smartcard --extra-cflags=\" -I$(XEN_ROOT)/tools/include \"" \
 	--enable-ovmf --with-system-ovmf=/usr/share/qemu-xen/qemu/ovmf.bin --disable-ioemu-stubdom;


#	--with-system-seabios=/usr/share/seabios/bios-256k.bin

