+# recursive build of tools
+tools:
+ $(Q)$(MAKE) -C tools
+
+# documentation, build needs to be triggered explicitly
+docs:
+ $(DOXYGEN) Documentation/Doxyfile
+
+# remove generated docs
+docs_clean:
+ rm -rf Documentation/generated
+
+# clean up kernel, tools and generated docs
+clean: docs_clean
+ $(Q)$(MAKE) $(kbuild)
+ $(Q)$(MAKE) -C tools $@
+
+modules_install: modules
+ $(Q)$(MAKE) $(kbuild)
+
+firmware_install: $(DESTDIR)$(firmwaredir) modules
+ $(INSTALL_DATA) hypervisor/jailhouse*.bin $<
+
+ifeq ($(ARCH),x86)
+TOOL_INMATES_INSTALL := tool_inmates_install
+tool_inmates_install: $(DESTDIR)$(libexecdir)/jailhouse
+ $(INSTALL_DATA) inmates/tools/$(ARCH)/*.bin $<
+endif
+
+install: modules_install firmware_install $(TOOL_INMATES_INSTALL)
+ $(Q)$(MAKE) -C tools $@
+
+.PHONY: modules_install install clean firmware_install modules tools docs \
+ docs_clean