]> rtime.felk.cvut.cz Git - jailhouse.git/blobdiff - Makefile
jailhouse: inmates: bench: Add -R option -- repeats count.
[jailhouse.git] / Makefile
index ec7deb212a69f8778eb28d5badc13c4d3423ed86..6d597af281d4a74c91e59cb38aa9ebe63464f382 100644 (file)
--- a/Makefile
+++ b/Makefile
 # the COPYING file in the top-level directory.
 #
 
+# Check make version
+need := 3.82
+ifneq ($(need),$(firstword $(sort $(MAKE_VERSION) $(need))))
+$(error Too old make version $(MAKE_VERSION), at least $(need) required)
+endif
+
 # no recipes above this one (also no includes)
 all: modules tools
 
@@ -29,8 +35,6 @@ kbuild = -C $(KDIR) M=$$PWD $@
 modules:
        $(Q)$(MAKE) $(kbuild)
 
-hypervisor/jailhouse.bin: modules
-
 # recursive build of tools
 tools:
        $(Q)$(MAKE) -C tools
@@ -51,10 +55,16 @@ clean:      docs_clean
 modules_install: modules
        $(Q)$(MAKE) $(kbuild)
 
-firmware_install: hypervisor/jailhouse.bin $(DESTDIR)$(firmwaredir)
-       $(INSTALL_DATA) $^
+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
+install: modules_install firmware_install $(TOOL_INMATES_INSTALL)
        $(Q)$(MAKE) -C tools $@
 
 .PHONY: modules_install install clean firmware_install modules tools docs \