XEN_DISTDIR = xen/dist/install
XEN_MINOR = $(shell cat xen/xen/Makefile | grep XEN_SUBVERSION | head -1 |sed 's/.*= //g')
+XEN_VERSION = $(shell cat xen/xen/Makefile |grep XEN_SUBVERSION | head -1 | sed s/.*=// | sed s/\ //)
xen-DISTRIB_TARGET = dist/common/xen.gz
-.PHONY: xen-dist-nodep
-xen-dist-nodep:
+.PHONY: xen-config
+xen-config:
if [ -e xen/tools/configure ]; then \
if ! [ -e xen/tools/config.h ]; \
then (cd xen;./configure --prefix=/usr --disable-blktap2); \
fi; \
fi
+ if [ -e xen/tools/firmware/seabios-dir ]; then \
+ $(MAKE) -C xen/tools/firmware/seabios-dir defconfig; \
+ fi
+ if [ $(XEN_VERSION) -gt 6 ]; then \
+ $(MAKE) xen/xen/.config; \
+ fi
+
+XEN_DEF_CONFIG = xen/xen/arch/x86/configs/$(ARCH)_defconfig
+
+xen/xen/.config: xen.config
+ ./linux_cfg.pl $(DEF_CONFIG) xen.config >$@
+ yes "" | $(MAKE) -C xen/xen $(XEN_OPTS) oldconfig
+
+.PHONY: xen-hypervisor
+xen-hypervisor: xen-config
ifeq ($(ARCH),i386)
touch xen/xen/xen.gz
else