You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/09/15 07:07:35 UTC

[incubator-nuttx-apps] branch master updated: build: Support both .s & .S files

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new e5e3c36  build: Support both .s & .S files
e5e3c36 is described below

commit e5e3c36b35e24a49de3a2ca638fb6f5177b943da
Author: Huang Qi <hu...@xiaomi.com>
AuthorDate: Tue Sep 8 19:23:33 2020 +0800

    build: Support both .s & .S files
    
    Change-Id: I61d213f28e542d7a5df388312281b7601af2f86a
    Signed-off-by: Huang Qi <hu...@xiaomi.com>
---
 Application.mk | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Application.mk b/Application.mk
index fd9a02c..ca226d6 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, $<, $@))