• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#This Make file is to generate asm-offsets.h and build source.
2#
3
4#Generate asm-offsets.h for vmm module build
5offsets-file := asm-offsets.h
6
7always  := $(offsets-file)
8targets := $(offsets-file)
9targets += arch/ia64/kvm/asm-offsets.s
10
11# Default sed regexp - multiline due to syntax constraints
12define sed-y
13	"/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"
14endef
15
16quiet_cmd_offsets = GEN     $@
17define cmd_offsets
18	(set -e; \
19	 echo "#ifndef __ASM_KVM_OFFSETS_H__"; \
20	 echo "#define __ASM_KVM_OFFSETS_H__"; \
21	 echo "/*"; \
22	 echo " * DO NOT MODIFY."; \
23	 echo " *"; \
24	 echo " * This file was generated by Makefile"; \
25	 echo " *"; \
26	 echo " */"; \
27	 echo ""; \
28	 sed -ne $(sed-y) $<; \
29	 echo ""; \
30	 echo "#endif" ) > $@
31endef
32
33# We use internal rules to avoid the "is up to date" message from make
34arch/ia64/kvm/asm-offsets.s: arch/ia64/kvm/asm-offsets.c \
35			$(wildcard $(srctree)/arch/ia64/include/asm/*.h)\
36			$(wildcard $(srctree)/include/linux/*.h)
37	$(call if_changed_dep,cc_s_c)
38
39$(obj)/$(offsets-file): arch/ia64/kvm/asm-offsets.s
40	$(call cmd,offsets)
41
42FORCE : $(obj)/$(offsets-file)
43
44#
45# Makefile for Kernel-based Virtual Machine module
46#
47
48ccflags-y := -Ivirt/kvm -Iarch/ia64/kvm/
49asflags-y := -Ivirt/kvm -Iarch/ia64/kvm/
50
51common-objs = $(addprefix ../../../virt/kvm/, kvm_main.o ioapic.o \
52		coalesced_mmio.o irq_comm.o assigned-dev.o)
53
54ifeq ($(CONFIG_IOMMU_API),y)
55common-objs += $(addprefix ../../../virt/kvm/, iommu.o)
56endif
57
58kvm-objs := $(common-objs) kvm-ia64.o kvm_fw.o
59obj-$(CONFIG_KVM) += kvm.o
60
61CFLAGS_vcpu.o += -mfixed-range=f2-f5,f12-f127
62kvm-intel-objs = vmm.o vmm_ivt.o trampoline.o vcpu.o optvfault.o mmio.o \
63	vtlb.o process.o kvm_lib.o
64#Add link memcpy and memset to avoid possible structure assignment error
65kvm-intel-objs += memcpy.o memset.o
66obj-$(CONFIG_KVM_INTEL) += kvm-intel.o
67