2 # Jailhouse, a Linux-based partitioning hypervisor
4 # Copyright (c) Siemens AG, 2013, 2014
7 # Jan Kiszka <jan.kiszka@siemens.com>
9 # This work is licensed under the terms of the GNU GPL, version 2. See
10 # the COPYING file in the top-level directory.
15 ifneq ($(need),$(firstword $(sort $(MAKE_VERSION) $(need))))
16 $(error Too old make version $(MAKE_VERSION), at least $(need) required)
19 # no recipes above this one (also no includes)
22 # includes installation-related variables and definitions
23 include scripts/include.mk
25 # out-of-tree build for our kernel-module, firmware and inmates
26 KDIR ?= /lib/modules/`uname -r`/build
28 INSTALL_MOD_PATH ?= $(DESTDIR)
29 export INSTALL_MOD_PATH
33 kbuild = -C $(KDIR) M=$$PWD $@
38 # recursive build of tools
42 # documentation, build needs to be triggered explicitly
44 $(DOXYGEN) Documentation/Doxyfile
46 # remove generated docs
48 rm -rf Documentation/generated
50 # clean up kernel, tools and generated docs
53 $(Q)$(MAKE) -C tools $@
55 modules_install: modules
58 firmware_install: $(DESTDIR)$(firmwaredir) modules
59 $(INSTALL_DATA) hypervisor/jailhouse*.bin $<
62 TOOL_INMATES_INSTALL := tool_inmates_install
63 tool_inmates_install: $(DESTDIR)$(libexecdir)/jailhouse
64 $(INSTALL_DATA) inmates/tools/$(ARCH)/*.bin $<
67 install: modules_install firmware_install $(TOOL_INMATES_INSTALL)
68 $(Q)$(MAKE) -C tools $@
70 .PHONY: modules_install install clean firmware_install modules tools docs \