@@ -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)
@@ -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
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 <anthony.perard@citrix.com> --- xen/Rules.mk | 6 ++++++ xen/build.mk | 7 +++++++ 2 files changed, 13 insertions(+)