%.s: %.S FORCE
$(call if_changed,cpp_s_S)
+# Linker scripts, .lds.S -> .lds
+quiet_cmd_cpp_lds_S = LDS $@
+cmd_cpp_lds_S = $(CPP) -P $(call cpp_flags,$(a_flags)) -D__LINKER__ -MQ $@ -o $@ $<
+
# Add intermediate targets:
# When building objects with specific suffix patterns, add intermediate
# targets that the final targets are derived from.
obj-y += vpsci.o
obj-y += vuart.o
+extra-y += xen.lds
+
#obj-bin-y += ....o
ifneq ($(CONFIG_DTB_FILE),"")
.PHONY: include
include:
-xen.lds: xen.lds.S
- $(CPP) -P $(a_flags) -D__LINKER__ -MQ $@ -o $@ $<
+xen.lds: xen.lds.S FORCE
+ $(call if_changed,cpp_lds_S)
dtb.o: $(patsubst "%",%,$(CONFIG_DTB_FILE))
endif
extra-y += asm-macros.i
+extra-y += xen.lds
ifneq ($(CONFIG_HVM),y)
x86_emulate.o: CFLAGS-y += -Wno-unused-label
note_file_option ?= $(note_file)
ifeq ($(XEN_BUILD_PE),y)
+extra-y += efi.lds
$(TARGET).efi: prelink.o $(note_file) efi.lds efi/relocs-dummy.o efi/mkreloc
ifeq ($(CONFIG_DEBUG_INFO),y)
$(if $(filter --strip-debug,$(EFI_LDFLAGS)),echo,:) "Will strip debug info from $(@F)"
$(call move-if-changed,$@.new,$@)
efi.lds: AFLAGS-y += -DEFI
-xen.lds efi.lds: xen.lds.S
- $(CPP) -P $(call cpp_flags,$(a_flags)) -MQ $@ -o $@ $<
+xen.lds efi.lds: xen.lds.S FORCE
+ $(call if_changed,cpp_lds_S)
boot/mkelf32: boot/mkelf32.c
$(HOSTCC) $(HOSTCFLAGS) -o $@ $<