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.
13 firmwaredir ?= /lib/firmware
15 # all directories listed here will be created using a generic rule below
16 INSTALL_DIRECTORIES := $(DESTDIR)$(firmwaredir)
19 INSTALL_DATA ?= $(INSTALL) -m 644
20 INSTALL_DIR ?= $(INSTALL) -d -m 755
22 # no recipes above this one (also no includes)
25 # out-of-tree build for our kernel-module, firmware and inmates
26 KDIR ?= /lib/modules/`uname -r`/build
29 $(MAKE) -C $(KDIR) M=$$PWD $@
35 hypervisor/jailhouse.bin: modules
37 # recursive build of tools
41 # clean up kernel and tools
46 # create all necessary install-directories
47 $(INSTALL_DIRECTORIES):
50 modules_install: modules
54 firmware_install: hypervisor/jailhouse.bin $(DESTDIR)$(firmwaredir)
55 $(INSTALL_DATA) $(filter-out $(lastword $^),$^) $(lastword $^)
57 install: modules_install firmware_install
60 .PHONY: modules_install install clean firmware_install modules tools