Makefile 1.8 KB

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