.PHONY: FORCE
FORCE:
+D=xen-root
+
+# Copy enough of the tree to build the shim hypervisor
+$(D):
+ mkdir -p $D
+ cp -rs $(XEN_ROOT)/xen $(D)
+ cp -s $(XEN_ROOT)/Config.mk $(D)
+ cp -rs $(XEN_ROOT)/config $(D)
+ $(MAKE) -C $(D)/xen distclean
+
.PHONY: shim-%config
-shim-%config: FORCE
- $(MAKE) -C $(XEN_ROOT)/xen $*config \
+shim-%config: $(D) FORCE
+ $(MAKE) -C $(D)/xen $*config \
XEN_CONFIG_EXPERT=y \
KCONFIG_CONFIG=$(CURDIR)/shim.config
-xen-shim: shim-olddefconfig
- $(MAKE) -C $(XEN_ROOT)/xen install-shim \
+xen-shim: $(D) shim-olddefconfig
+ $(MAKE) -C $(D)/xen install-shim \
XEN_CONFIG_EXPERT=y \
KCONFIG_CONFIG=$(CURDIR)/shim.config \
DESTDIR=$(CURDIR)
.PHONY: distclean clean
distclean clean:
rm -f xen-shim *.old
+ rm -rf $(D)