]> rtime.felk.cvut.cz Git - jailhouse.git/blob - tools/Makefile
tools: config-create: Initial support for non-Intel boards
[jailhouse.git] / tools / 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 CC = $(CROSS_COMPILE)gcc
14
15 CFLAGS = -g -O3 -I.. -I../hypervisor/include \
16         -Wall -Wmissing-declarations -Wmissing-prototypes
17
18 TARGETS := jailhouse
19
20 HAS_PYTHON_MAKO := \
21         $(shell python -c "from mako.template import Template" 2>/dev/null \
22         && echo yes)
23
24 ifeq ($(strip $(HAS_PYTHON_MAKO)), yes)
25         TARGETS += jailhouse-config-collect
26 else
27         TARGETS += no_python_mako
28 endif
29
30 all: $(TARGETS)
31
32 jailhouse: jailhouse.c ../jailhouse.h ../hypervisor/include/jailhouse/cell-config.h
33         $(CC) $(CFLAGS) -o $@ $<
34
35 jailhouse-config-collect: jailhouse-config-create jailhouse-config-collect.tmpl
36         ./$< -g $@
37         chmod +x $@
38
39 .PHONY: clean no_python_mako
40
41 clean:
42         rm -f $(TARGETS)
43
44 no_python_mako:
45         @echo -ne "WARNING: Could not create the helper script to generate" \
46                   "configurations on remote machines" \
47                   "(\"jailhouse-conf-collect\"). You need Python and the" \
48                   "Mako library for it.\n"