]> rtime.felk.cvut.cz Git - jailhouse.git/blob - Makefile
jailhouse: inmates: bench: Add -R option -- repeats count.
[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 # Check make version
14 need := 3.82
15 ifneq ($(need),$(firstword $(sort $(MAKE_VERSION) $(need))))
16 $(error Too old make version $(MAKE_VERSION), at least $(need) required)
17 endif
18
19 # no recipes above this one (also no includes)
20 all: modules tools
21
22 # includes installation-related variables and definitions
23 include scripts/include.mk
24
25 # out-of-tree build for our kernel-module, firmware and inmates
26 KDIR ?= /lib/modules/`uname -r`/build
27
28 INSTALL_MOD_PATH ?= $(DESTDIR)
29 export INSTALL_MOD_PATH
30
31 DOXYGEN ?= doxygen
32
33 kbuild = -C $(KDIR) M=$$PWD $@
34
35 modules:
36         $(Q)$(MAKE) $(kbuild)
37
38 # recursive build of tools
39 tools:
40         $(Q)$(MAKE) -C tools
41
42 # documentation, build needs to be triggered explicitly
43 docs:
44         $(DOXYGEN) Documentation/Doxyfile
45
46 # remove generated docs
47 docs_clean:
48         rm -rf Documentation/generated
49
50 # clean up kernel, tools and generated docs
51 clean:  docs_clean
52         $(Q)$(MAKE) $(kbuild)
53         $(Q)$(MAKE) -C tools $@
54
55 modules_install: modules
56         $(Q)$(MAKE) $(kbuild)
57
58 firmware_install: $(DESTDIR)$(firmwaredir) modules
59         $(INSTALL_DATA) hypervisor/jailhouse*.bin $<
60
61 ifeq ($(ARCH),x86)
62 TOOL_INMATES_INSTALL := tool_inmates_install
63 tool_inmates_install: $(DESTDIR)$(libexecdir)/jailhouse
64         $(INSTALL_DATA) inmates/tools/$(ARCH)/*.bin $<
65 endif
66
67 install: modules_install firmware_install $(TOOL_INMATES_INSTALL)
68         $(Q)$(MAKE) -C tools $@
69
70 .PHONY: modules_install install clean firmware_install modules tools docs \
71         docs_clean