Add support for .S files to the gcc make system

release/v2.9
inmarket 2017-06-24 17:12:42 +10:00
parent 10f4d9f860
commit e5497f2ac0
1 changed files with 17 additions and 1 deletions

View File

@ -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)