From e0f6646804f3f6f3a7d3be68f6f30613995b3f1d Mon Sep 17 00:00:00 2001 From: ryansuchocki Date: Sat, 21 May 2016 20:12:29 +0100 Subject: [PATCH 1/2] Allow assembly source files with a lower-case .s extension, as per GCC spec. --- Arduino.mk | 6 +++--- HISTORY.md | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Arduino.mk b/Arduino.mk index 322ca38c..945aa6d6 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -767,17 +767,17 @@ LOCAL_CPP_SRCS ?= $(wildcard *.cpp) LOCAL_CC_SRCS ?= $(wildcard *.cc) LOCAL_PDE_SRCS ?= $(wildcard *.pde) LOCAL_INO_SRCS ?= $(wildcard *.ino) -LOCAL_AS_SRCS ?= $(wildcard *.S) +LOCAL_AS_SRCS ?= $(wildcard *.S *.s) LOCAL_SRCS = $(LOCAL_C_SRCS) $(LOCAL_CPP_SRCS) \ $(LOCAL_CC_SRCS) $(LOCAL_PDE_SRCS) \ $(LOCAL_INO_SRCS) $(LOCAL_AS_SRCS) LOCAL_OBJ_FILES = $(LOCAL_C_SRCS:.c=.c.o) $(LOCAL_CPP_SRCS:.cpp=.cpp.o) \ $(LOCAL_CC_SRCS:.cc=.cc.o) $(LOCAL_PDE_SRCS:.pde=.pde.o) \ - $(LOCAL_INO_SRCS:.ino=.ino.o) $(LOCAL_AS_SRCS:.S=.S.o) + $(LOCAL_INO_SRCS:.ino=.ino.o) $(LOCAL_AS_SRCS:.S=.S.o) $(LOCAL_AS_SRCS:.s=.s.o) LOCAL_OBJS = $(patsubst %,$(OBJDIR)/%,$(LOCAL_OBJ_FILES)) ifeq ($(words $(LOCAL_SRCS)), 0) - $(error At least one source file (*.ino, *.pde, *.cpp, *c, *cc, *.S) is needed) + $(error At least one source file (*.ino, *.pde, *.cpp, *c, *cc, *.S, *.s) is needed) endif # CHK_SOURCES is used by flymake diff --git a/HISTORY.md b/HISTORY.md index 13dde6e7..5c5c0694 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -4,6 +4,8 @@ A Makefile for Arduino Sketches The following is the rough list of changes that went into different versions. I tried to give credit whenever possible. If I have missed anyone, kindly add it to the list. +- Tweak: Allow source files with lower-case .s extension (https://github.com/ryansuchocki) + ### 1.5.1 (Debian version: 1.5-3) (2016-02-22) - New: Add show_submenu target (https://github.com/drewhutchison) From 84e4b6a5e3e150d0d0e7357bf25478111764cb89 Mon Sep 17 00:00:00 2001 From: ryansuchocki Date: Mon, 23 May 2016 23:25:47 +0100 Subject: [PATCH 2/2] Fix the substitution for .S sources --- Arduino.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arduino.mk b/Arduino.mk index 945aa6d6..94d31a17 100644 --- a/Arduino.mk +++ b/Arduino.mk @@ -773,7 +773,7 @@ LOCAL_SRCS = $(LOCAL_C_SRCS) $(LOCAL_CPP_SRCS) \ $(LOCAL_INO_SRCS) $(LOCAL_AS_SRCS) LOCAL_OBJ_FILES = $(LOCAL_C_SRCS:.c=.c.o) $(LOCAL_CPP_SRCS:.cpp=.cpp.o) \ $(LOCAL_CC_SRCS:.cc=.cc.o) $(LOCAL_PDE_SRCS:.pde=.pde.o) \ - $(LOCAL_INO_SRCS:.ino=.ino.o) $(LOCAL_AS_SRCS:.S=.S.o) $(LOCAL_AS_SRCS:.s=.s.o) + $(LOCAL_INO_SRCS:.ino=.ino.o) $(LOCAL_AS_SRCS:%=%.o) LOCAL_OBJS = $(patsubst %,$(OBJDIR)/%,$(LOCAL_OBJ_FILES)) ifeq ($(words $(LOCAL_SRCS)), 0)