]> rtime.felk.cvut.cz Git - jailhouse.git/blob - Makefile
make: introduce make target docs_clean
[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 hypervisor/jailhouse.bin: modules
33
34 # recursive build of tools
35 tools:
36         $(Q)$(MAKE) -C tools
37
38 # documentation, build needs to be triggered explicitly
39 docs:
40         $(DOXYGEN) Documentation/Doxyfile
41
42 # remove generated docs
43 docs_clean:
44         rm -rf Documentation/generated
45
46 # clean up kernel, tools and generated docs
47 clean:  docs_clean
48         $(Q)$(MAKE) $(kbuild)
49         $(Q)$(MAKE) -C tools $@
50
51 modules_install: modules
52         $(Q)$(MAKE) $(kbuild)
53
54 firmware_install: hypervisor/jailhouse.bin $(DESTDIR)$(firmwaredir)
55         $(INSTALL_DATA) $^
56
57 install: modules_install firmware_install
58         $(Q)$(MAKE) -C tools $@
59
60 .PHONY: modules_install install clean firmware_install modules tools docs \
61         docs_clean