]> rtime.felk.cvut.cz Git - jailhouse.git/blob - inmates/Makefile
inmates: Build library archive and link it implicitly
[jailhouse.git] / inmates / 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 INMATES_LIB = $(src)/lib/$(SRCARCH)
14 export INMATES_LIB
15
16 INCLUDES := -I$(INMATES_LIB) \
17             -I$(src)/../hypervisor/arch/$(SRCARCH)/include \
18             -I$(src)/../hypervisor/include
19
20 LINUXINCLUDE  :=
21 KBUILD_AFLAGS += $(INCLUDES)
22 KBUILD_CFLAGS := -g -Os -Wall -Wstrict-prototypes -Wtype-limits \
23                  -Wmissing-declarations -Wmissing-prototypes \
24                  -fno-strict-aliasing -fomit-frame-pointer -fno-pic \
25                  -fno-common -fno-stack-protector $(INCLUDES)
26 ifneq ($(wildcard $(src)/../hypervisor/include/jailhouse/config.h),)
27 KBUILD_CFLAGS += -include $(src)/../hypervisor/include/jailhouse/config.h
28 endif
29
30 OBJCOPYFLAGS := -O binary
31 LDFLAGS += -T
32
33 subdir-y := lib/$(SRCARCH) demos/$(SRCARCH)
34
35 # demos depend on the library
36 $(obj)/demos/$(SRCARCH): $(obj)/lib/$(SRCARCH)