]> rtime.felk.cvut.cz Git - jailhouse.git/blob - Makefile
makefiles: Build jailhouse-{amd,intel} together
[jailhouse.git] / Makefile
1 #
2 # Jailhouse, a Linux-based partitioning hypervisor
3 #
4 # Copyright (c) Siemens AG, 2013, 2014
5 #
6 # Authors:
7 #  Jan Kiszka <jan.kiszka@siemens.com>
8 #
9 # This work is licensed under the terms of the GNU GPL, version 2.  See
10 # the COPYING file in the top-level directory.
11 #
12
13 # no recipes above this one (also no includes)
14 all: modules tools
15
16 # includes installation-related variables and definitions
17 include scripts/include.mk
18
19 # out-of-tree build for our kernel-module, firmware and inmates
20 KDIR ?= /lib/modules/`uname -r`/build
21
22 INSTALL_MOD_PATH ?= $(DESTDIR)
23 export INSTALL_MOD_PATH
24
25 DOXYGEN ?= doxygen
26
27 kbuild = -C $(KDIR) M=$$PWD $@
28
29 modules:
30         $(Q)$(MAKE) $(kbuild)
31
32 # recursive build of tools
33 tools:
34         $(Q)$(MAKE) -C tools
35
36 # documentation, build needs to be triggered explicitly
37 docs:
38         $(DOXYGEN) Documentation/Doxyfile
39
40 # remove generated docs
41 docs_clean:
42         rm -rf Documentation/generated
43
44 # clean up kernel, tools and generated docs
45 clean:  docs_clean
46         $(Q)$(MAKE) $(kbuild)
47         $(Q)$(MAKE) -C tools $@
48
49 modules_install: modules
50         $(Q)$(MAKE) $(kbuild)
51
52 firmware_install: $(DESTDIR)$(firmwaredir) modules
53         $(INSTALL_DATA) hypervisor/jailhouse*.bin $<
54
55 install: modules_install firmware_install
56         $(Q)$(MAKE) -C tools $@
57
58 .PHONY: modules_install install clean firmware_install modules tools docs \
59         docs_clean