gen-objs-c and gen-objs-S can't have the list of targets. Alternative, merge both list and use $(filter ).
Signed-off-by: Anthony PERARD <[email protected]> --- xen/Rules.mk | 6 ++++++ xen/build.mk | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/xen/Rules.mk b/xen/Rules.mk index 44af005fd57e..2d8d32f5fd72 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -26,6 +26,7 @@ lib-y := targets := ## targets made from generated sources gen-objs-c := +gen-objs-S := subdir-y := CFLAGS-y := AFLAGS-y := @@ -99,6 +100,7 @@ lib-y := $(addprefix $(obj)/,$(lib-y)) obj-y := $(addprefix $(obj)/,$(obj-y)) obj-bin-y := $(addprefix $(obj)/,$(obj-bin-y)) gen-objs-c := $(addprefix $(obj)/,$(gen-objs-c)) +gen-objs-S := $(addprefix $(obj)/,$(gen-objs-S)) subdir-y := $(addprefix $(obj)/,$(subdir-y)) nocov-y := $(addprefix $(obj)/,$(nocov-y)) noubsan-y := $(addprefix $(obj)/,$(noubsan-y)) @@ -255,6 +257,10 @@ $(obj)/%.o: $(srctree)/$(src)/%.c FORCE quiet_cmd_cc_o_S = CC $@ cmd_cc_o_S = $(CC) $(a_flags) -c $< -o $@ +ifdef building_out_of_srctree +$(gen-objs-S): $(obj)/%.o: $(obj)/%.S FORCE + $(call if_changed_dep,cc_o_S) +endif $(obj)/%.o: $(src)/%.S FORCE $(call if_changed_dep,cc_o_S) diff --git a/xen/build.mk b/xen/build.mk index 7b48b7eb1404..2f2cbbbeabf8 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -83,6 +83,13 @@ prelink.o: $(ALL_OBJS) $(ALL_LIBS) FORCE $(call if_changed,ld) endif +# Source generated in arch/*/Makefile to build $(TARGET)-syms +gen-objs-S += .$(TARGET)-syms.0.o +gen-objs-S += .$(TARGET)-syms.1.o +# Source generated in arch/*/Makefile to build $(TARGET).efi +gen-objs-S += .$(TARGET).efi.0r.o .$(TARGET).efi.0s.o +gen-objs-S += .$(TARGET).efi.1r.o .$(TARGET).efi.1s.o + targets += prelink.o $(TARGET): prelink.o FORCE -- Anthony PERARD
