[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC XEN PATCH 12/23] Build guest_walk* in arch/x86/mm
Rewrite the rules to build the different level of guest page walk so the work and use Kbuild functions. Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> --- xen/arch/x86/mm/Makefile | 14 +++++++------- xen/arch/x86/mm/hap/Makefile | 14 +++++++------- xen/arch/x86/mm/shadow/Makefile | 14 +++++++------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/xen/arch/x86/mm/Makefile b/xen/arch/x86/mm/Makefile index d87dc0aa6eeb..9c6d14c2fabb 100644 --- a/xen/arch/x86/mm/Makefile +++ b/xen/arch/x86/mm/Makefile @@ -11,11 +11,11 @@ obj-y += p2m.o p2m-pt.o obj-$(CONFIG_HVM) += p2m-ept.o p2m-pod.o obj-y += paging.o -guest_walk_%.o: guest_walk.c Makefile - $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ +$(foreach sfx,o i s,$(obj)/guest_walk_%.$(sfx)): ccflags-y = -DGUEST_PAGING_LEVELS=$* -guest_walk_%.i: guest_walk.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ - -guest_walk_%.s: guest_walk.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -S $< -o $@ +$(obj)/guest_walk_%.o: $(src)/guest_walk.c FORCE + $(call if_changed_dep,cc_o_c) +$(obj)/guest_walk_%.i: $(src)/guest_walk.c FORCE + $(call if_changed_dep,cpp_i_c) +$(obj)/guest_walk_%.s: $(src)/guest_walk.c FORCE + $(call if_changed_dep,cc_s_c) diff --git a/xen/arch/x86/mm/hap/Makefile b/xen/arch/x86/mm/hap/Makefile index b14a9aff93d2..a0da2bfe77e6 100644 --- a/xen/arch/x86/mm/hap/Makefile +++ b/xen/arch/x86/mm/hap/Makefile @@ -5,11 +5,11 @@ obj-y += guest_walk_4level.o obj-y += nested_hap.o obj-y += nested_ept.o -guest_walk_%level.o: guest_walk.c Makefile - $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ +$(foreach sfx,o i s,$(obj)/guest_walk_%level.$(sfx)): ccflags-y = -DGUEST_PAGING_LEVELS=$* -guest_walk_%level.i: guest_walk.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ - -guest_walk_%level.s: guest_walk.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -S $< -o $@ +$(obj)/guest_walk_%level.o: $(src)/guest_walk.c FORCE + $(call if_changed_dep,cc_o_c) +$(obj)/guest_walk_%level.i: $(src)/guest_walk.c FORCE + $(call if_changed_dep,cpp_i_c) +$(obj)/guest_walk_%level.s: $(src)/guest_walk.c FORCE + $(call if_changed_dep,cc_s_c) diff --git a/xen/arch/x86/mm/shadow/Makefile b/xen/arch/x86/mm/shadow/Makefile index ff03a9937f9b..8c264fab7fda 100644 --- a/xen/arch/x86/mm/shadow/Makefile +++ b/xen/arch/x86/mm/shadow/Makefile @@ -6,11 +6,11 @@ else obj-y += none.o endif -guest_%.o: multi.c Makefile - $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ +$(foreach sfx,o i s,$(obj)/guest_%.$(sfx)): ccflags-y = -DGUEST_PAGING_LEVELS=$* -guest_%.i: multi.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ - -guest_%.s: multi.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(CFLAGS)) -DGUEST_PAGING_LEVELS=$* -S $< -o $@ +$(obj)/guest_%.o: $(src)/multi.c FORCE + $(call if_changed_dep,cc_o_c) +$(obj)/guest_%.i: $(src)/multi.c FORCE + $(call if_changed_dep,cpp_i_c) +$(obj)/guest_%.s: $(src)/multi.c FORCE + $(call if_changed_dep,cc_s_c) -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |