--- a/tools/Makefile
+++ b/tools/Makefile
@@ -19,9 +19,7 @@
 SUBDIRS-$(VTPM_TOOLS) += vtpm_manager
 SUBDIRS-$(VTPM_TOOLS) += vtpm
 SUBDIRS-y += xenstat
-SUBDIRS-$(CONFIG_Linux) += libaio
 SUBDIRS-$(CONFIG_Linux) += memshr 
-SUBDIRS-$(CONFIG_Linux) += blktap
 SUBDIRS-$(CONFIG_Linux) += blktap2
 SUBDIRS-$(CONFIG_NetBSD) += libaio
 SUBDIRS-$(CONFIG_NetBSD) += blktap2
@@ -31,8 +29,11 @@
 
 # do not recurse in to a dir we are about to delete
 ifneq "$(MAKECMDGOALS)" "distclean"
+CONFIG_QEMU = $(CURDIR)/../qemu
+ifneq ($(wildcard $(CONFIG_QEMU)),)
 SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir
 endif
+endif
 
 SUBDIRS-y += xenpmd
 SUBDIRS-y += libxl
