]> rtime.felk.cvut.cz Git - jailhouse.git/blob - Makefile
core/driver: Add version information
[jailhouse.git] / Makefile
1 #
2 # Jailhouse, a Linux-based partitioning hypervisor
3 #
4 # Copyright (c) Siemens AG, 2013
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 subdir-y := hypervisor configs inmates
14
15 obj-m := jailhouse.o
16
17 ccflags-y := -I$(src)/hypervisor/arch/$(SRCARCH)/include \
18              -I$(src)/hypervisor/include
19
20 jailhouse-y := driver.o
21
22 define filechk_version
23         $(src)/scripts/gen_version_h $(src)
24 endef
25
26 clean-files := jailhouse-version.h
27
28 # out-of-tree build
29
30 KERNELDIR = /lib/modules/`uname -r`/build
31
32 modules modules_install clean:
33         $(MAKE) -C $(KERNELDIR) SUBDIRS=`pwd` $@
34
35 $(obj)/jailhouse-version.h: $(src)/Makefile FORCE
36         $(call filechk,version)
37
38 $(obj)/driver.o: $(obj)/jailhouse-version.h
39
40 firmware_install:
41         cp hypervisor/jailhouse.bin /lib/firmware/
42
43 install: modules_install firmware_install
44         depmod -aq
45
46 .PHONY: modules_install install clean firmware_install