2 # Jailhouse, a Linux-based partitioning hypervisor
4 # Copyright (c) Siemens AG, 2013
7 # Jan Kiszka <jan.kiszka@siemens.com>
9 # This work is licensed under the terms of the GNU GPL, version 2. See
10 # the COPYING file in the top-level directory.
13 INMATES_LIB = $(src)/lib/$(SRCARCH)
16 INCLUDES := -I$(INMATES_LIB) \
17 -I$(src)/../hypervisor/arch/$(SRCARCH)/include \
18 -I$(src)/../hypervisor/include
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
30 OBJCOPYFLAGS := -O binary
31 LDFLAGS += --gc-sections -T
33 subdir-y := lib/$(SRCARCH) demos/$(SRCARCH) tools/$(SRCARCH)
35 # demos and tools depend on the library
36 $(obj)/demos/$(SRCARCH) $(obj)/tools/$(SRCARCH): $(obj)/lib/$(SRCARCH)