From e5e3c36b35e24a49de3a2ca638fb6f5177b943da Mon Sep 17 00:00:00 2001 From: Huang Qi Date: Tue, 8 Sep 2020 19:23:33 +0800 Subject: [PATCH] build: Support both .s & .S files Change-Id: I61d213f28e542d7a5df388312281b7601af2f86a Signed-off-by: Huang Qi --- Application.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Application.mk b/Application.mk index fd9a02cc3..ca226d626 100644 --- a/Application.mk +++ b/Application.mk @@ -70,7 +70,11 @@ PROGNAME := $(shell echo $(PROGNAME)) # Object files -AOBJS = $(ASRCS:.S=$(SUFFIX)$(OBJEXT)) +RASRCS = $(filter %.s,$(ASRCS)) +CASRCS = $(filter %.S,$(ASRCS)) + +AOBJS = $(RASRCS:.s=$(SUFFIX)$(OBJEXT)) +AOBJS += $(CASRCS:.S=$(SUFFIX)$(OBJEXT)) COBJS = $(CSRCS:.c=$(SUFFIX)$(OBJEXT)) CXXOBJS = $(CXXSRCS:$(CXXEXT)=$(SUFFIX)$(OBJEXT)) @@ -119,7 +123,7 @@ define ELFLD $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) $(ARCHCRT0OBJ) $1 $(LDLIBS) -o $2 endef -$(AOBJS): %$(SUFFIX)$(OBJEXT): %.S +$(AOBJS): %$(SUFFIX)$(OBJEXT): $(ASRCS) $(if $(and $(CONFIG_BUILD_LOADABLE),$(AELFFLAGS)), \ $(call ELFASSEMBLE, $<, $@), $(call ASSEMBLE, $<, $@))