xref: /openbmc/linux/arch/powerpc/kvm/Makefile (revision 2223cbec)
1#
2# Makefile for Kernel-based Virtual Machine module
3#
4
5subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
6
7ccflags-y := -Ivirt/kvm -Iarch/powerpc/kvm
8
9common-objs-y = $(addprefix ../../../virt/kvm/, kvm_main.o coalesced_mmio.o)
10
11CFLAGS_44x_tlb.o  := -I.
12CFLAGS_e500_tlb.o := -I.
13CFLAGS_emulate.o  := -I.
14
15common-objs-y += powerpc.o emulate.o
16obj-$(CONFIG_KVM_EXIT_TIMING) += timing.o
17obj-$(CONFIG_KVM_BOOK3S_HANDLER) += book3s_exports.o
18
19AFLAGS_booke_interrupts.o := -I$(obj)
20
21kvm-440-objs := \
22	$(common-objs-y) \
23	booke.o \
24	booke_emulate.o \
25	booke_interrupts.o \
26	44x.o \
27	44x_tlb.o \
28	44x_emulate.o
29kvm-objs-$(CONFIG_KVM_440) := $(kvm-440-objs)
30
31kvm-e500-objs := \
32	$(common-objs-y) \
33	booke.o \
34	booke_emulate.o \
35	booke_interrupts.o \
36	e500.o \
37	e500_tlb.o \
38	e500_emulate.o
39kvm-objs-$(CONFIG_KVM_E500V2) := $(kvm-e500-objs)
40
41kvm-e500mc-objs := \
42	$(common-objs-y) \
43	booke.o \
44	booke_emulate.o \
45	bookehv_interrupts.o \
46	e500mc.o \
47	e500_tlb.o \
48	e500_emulate.o
49kvm-objs-$(CONFIG_KVM_E500MC) := $(kvm-e500mc-objs)
50
51kvm-book3s_64-objs-$(CONFIG_KVM_BOOK3S_64_PR) := \
52	../../../virt/kvm/coalesced_mmio.o \
53	fpu.o \
54	book3s_paired_singles.o \
55	book3s_pr.o \
56	book3s_pr_papr.o \
57	book3s_64_vio_hv.o \
58	book3s_emulate.o \
59	book3s_interrupts.o \
60	book3s_mmu_hpte.o \
61	book3s_64_mmu_host.o \
62	book3s_64_mmu.o \
63	book3s_32_mmu.o
64kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_PR) := \
65	book3s_rmhandlers.o
66
67kvm-book3s_64-objs-$(CONFIG_KVM_BOOK3S_64_HV) := \
68	book3s_hv.o \
69	book3s_hv_interrupts.o \
70	book3s_64_mmu_hv.o
71kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HV) := \
72	book3s_hv_rmhandlers.o \
73	book3s_hv_rm_mmu.o \
74	book3s_64_vio_hv.o \
75	book3s_hv_builtin.o
76
77kvm-book3s_64-module-objs := \
78	../../../virt/kvm/kvm_main.o \
79	powerpc.o \
80	emulate.o \
81	book3s.o \
82	book3s_64_vio.o \
83	$(kvm-book3s_64-objs-y)
84
85kvm-objs-$(CONFIG_KVM_BOOK3S_64) := $(kvm-book3s_64-module-objs)
86
87kvm-book3s_32-objs := \
88	$(common-objs-y) \
89	fpu.o \
90	book3s_paired_singles.o \
91	book3s.o \
92	book3s_pr.o \
93	book3s_emulate.o \
94	book3s_interrupts.o \
95	book3s_mmu_hpte.o \
96	book3s_32_mmu_host.o \
97	book3s_32_mmu.o
98kvm-objs-$(CONFIG_KVM_BOOK3S_32) := $(kvm-book3s_32-objs)
99
100kvm-objs := $(kvm-objs-m) $(kvm-objs-y)
101
102obj-$(CONFIG_KVM_440) += kvm.o
103obj-$(CONFIG_KVM_E500V2) += kvm.o
104obj-$(CONFIG_KVM_E500MC) += kvm.o
105obj-$(CONFIG_KVM_BOOK3S_64) += kvm.o
106obj-$(CONFIG_KVM_BOOK3S_32) += kvm.o
107
108obj-y += $(kvm-book3s_64-builtin-objs-y)
109