Browse Source

Add support for .S files to the gcc make system

remotes/origin_old/release/v2.9
inmarket 5 years ago
parent
commit
e5497f2ac0
  1. 18
      tools/gmake_scripts/compiler_gcc.mk

18
tools/gmake_scripts/compiler_gcc.mk

@ -215,7 +215,13 @@ ifneq ($(OPT_VERBOSE_COMPILE),yes)
ifneq ($(filter %.s,$(SRC) $(SRC_NOTHUMB) $(SRC_THUMB)),)
@echo .
@echo Assembler Options.....
@echo $(XCC) -c $(CPPFLAGS) $(CFLAGS) $(SRCFLAGS) $(@:.o=.s) -o $(OBJDIR)/$@
@echo $(XAS) -c $(CPPFLAGS) $(CFLAGS) $(SRCFLAGS) $(@:.o=.s) -o $(OBJDIR)/$@
else
ifneq ($(filter %.S,$(SRC) $(SRC_NOTHUMB) $(SRC_THUMB)),)
@echo .
@echo Assembler Options.....
@echo $(XAS) -c $(CPPFLAGS) $(CFLAGS) $(SRCFLAGS) $(@:.o=.S) -o $(OBJDIR)/$@
endif
endif
ifneq ($(OPT_MAKE_LIB),yes)
@echo .
@ -278,6 +284,16 @@ else
@$(XAS) -c $(CPPFLAGS) $(ASFLAGS) $(SRCFLAGS) $< -o $@
endif
$(OBJDIR)/%.o : $$(call obj_src,%.S)
@mkdir -p $(dir $@)
ifeq ($(OPT_VERBOSE_COMPILE),yes)
@echo .
$(XAS) -c $(CPPFLAGS) $(ASFLAGS) $(SRCFLAGS) $< -o $@
else
@echo Compiling $<
@$(XAS) -c $(CPPFLAGS) $(ASFLAGS) $(SRCFLAGS) $< -o $@
endif
$(EXEFILE): $(OBJS_THUMB) $(OBJS_NOTHUMB) $(LDSCRIPT)
@mkdir -p $(dir $@)
ifeq ($(OPT_VERBOSE_COMPILE),yes)

Loading…
Cancel
Save