Teach the Makefile about the new Arduino sourcefile suffix

This commit is contained in:
Mike Smith 2012-01-15 11:51:38 -08:00
parent cc36964a44
commit 9c5a776456
1 changed files with 7 additions and 7 deletions

View File

@ -265,12 +265,12 @@ endif
# #
# Sketch source files # Sketch source files
SKETCHPDESRCS := $(wildcard $(SRCROOT)/*.pde) SKETCHPDESRCS := $(wildcard $(SRCROOT)/*.pde $(SRCROOT)/*.ino)
SKETCHSRCS := $(wildcard $(addprefix $(SRCROOT)/,$(SRCSUFFIXES))) SKETCHSRCS := $(wildcard $(addprefix $(SRCROOT)/,$(SRCSUFFIXES)))
SKETCHPDE := $(wildcard $(SRCROOT)/$(SKETCH).pde) SKETCHPDE := $(wildcard $(SRCROOT)/$(SKETCH).pde $(SRCROOT)/$(SKETCH).ino)
SKETCHCPP := $(BUILDROOT)/$(SKETCH).cpp SKETCHCPP := $(BUILDROOT)/$(SKETCH).cpp
ifeq ($(SKETCHPDE),) ifneq ($(words $(SKETCHPDE)),1)
$(error ERROR: sketch $(SKETCH) is missing $(SKETCH).pde) $(error ERROR: sketch $(SKETCH) must contain exactly one of $(SKETCH).pde or $(SKETCH).ino)
endif endif
# Sketch object files # Sketch object files
@ -566,7 +566,7 @@ $(CORELIB): $(CORELIBOBJS)
# This process strives to be as faithful to the Arduino implementation as # This process strives to be as faithful to the Arduino implementation as
# possible. Conceptually, the process is as follows: # possible. Conceptually, the process is as follows:
# #
# * All of the .pde files are concatenated, starting with the file named # * All of the .pde/.ino files are concatenated, starting with the file named
# for the sketch and followed by the others in alphabetical order. # for the sketch and followed by the others in alphabetical order.
# * An insertion point is created in the concatenated file at # * An insertion point is created in the concatenated file at
# the first statement that isn't a preprocessor directive or comment. # the first statement that isn't a preprocessor directive or comment.
@ -590,7 +590,7 @@ $(SKETCHCPP): $(SKETCHCPP_SRC)
# #
# The sketch splitter is an awk script used to split off the # The sketch splitter is an awk script used to split off the
# header and body of the concatenated .pde files. It also # header and body of the concatenated .pde/.ino files. It also
# inserts #line directives to help in backtracking from compiler # inserts #line directives to help in backtracking from compiler
# and debugger messages to the original source file. # and debugger messages to the original source file.
# #
@ -626,7 +626,7 @@ endef
# #
# The prototype scanner is an awk script used to generate function # The prototype scanner is an awk script used to generate function
# prototypes from the concantenated .pde files. # prototypes from the concantenated .pde/.ino files.
# #
# Function definitions are expected to follow the form # Function definitions are expected to follow the form
# #