]> rtime.felk.cvut.cz Git - jailhouse.git/blob - inmates/Makefile
inmates: Demonstrate shutdown rejection in apic-demo
[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 LINUXINCLUDE := -I$(src)
14 KBUILD_CFLAGS := -g -Os -Wall -Wstrict-prototypes -Wtype-limits \
15                  -Wmissing-declarations -Wmissing-prototypes \
16                  -fno-strict-aliasing -fomit-frame-pointer -fno-pic \
17                  -fno-common -fno-stack-protector -I. \
18                  -I$(src)/../hypervisor/arch/$(SRCARCH)/include \
19                  -I$(src)/../hypervisor/include
20 ifneq ($(wildcard $(src)/../hypervisor/include/jailhouse/config.h),)
21 KBUILD_CFLAGS += -include $(src)/../hypervisor/include/jailhouse/config.h
22 endif
23
24 OBJCOPYFLAGS := -O binary
25 LDFLAGS := -T
26
27 ifeq ($(SRCARCH), x86)
28 always := tiny-demo.bin apic-demo.bin
29 endif
30
31 tiny-demo-y := tiny-demo.o header.o printk.o pm-timer.o
32 targets += $(tiny-demo-y)
33
34 TINY_DEMO_OBJS = $(addprefix $(obj)/,$(tiny-demo-y))
35
36 target += tiny-demo-linked.o
37 $(obj)/tiny-demo-linked.o: $(src)/inmate.lds $(TINY_DEMO_OBJS)
38         $(call if_changed,ld)
39
40
41 apic-demo-y := apic-demo.o header.o printk.o pm-timer.o
42 targets += $(apic-demo-y)
43
44 APIC_DEMO_OBJS = $(addprefix $(obj)/,$(apic-demo-y))
45
46 target += apic-demo-linked.o
47 $(obj)/apic-demo-linked.o: $(src)/inmate.lds $(APIC_DEMO_OBJS)
48         $(call if_changed,ld)
49
50
51 targets += tiny-demo.bin apic-demo.bin
52 $(obj)/%.bin: $(obj)/%-linked.o
53         $(call if_changed,objcopy)