/make/arduino-mk

To get this branch, use:
bzr branch http://bzr.ed.am/make/arduino-mk

« back to all changes in this revision

Viewing changes to arduino.mk

  • Committer: edam
  • Date: 2012-02-13 16:22:10 UTC
  • Revision ID: edam@waxworlds.org-20120213162210-nwn1e7blknr1v3zq
added fixed arduino software version

Show diffs side-by-side

added added

removed removed

59
59
#
60
60
# You may also need to set SERIALDEV if it is not detected correctly.
61
61
#
62
 
# The presence of a .ino or .pde file causes the arduino.mk to automatically
 
62
# The presence of a .ino (or .pde) file causes the arduino.mk to automatically
63
63
# determine values for SOURCES, TARGET and LIBRARIES.  Any .c, .cc and .cpp
64
64
# files in the project directory (or any "util" or "utility" subdirectories)
65
65
# are automatically included in the build and are scanned for Arduino libraries
66
 
# that have been #included.
 
66
# that have been #included. Note, there can only be one .ino (or .pde) file.
67
67
#
68
68
# Alternatively, if you want to manually specify build variables, create a
69
69
# Makefile that defines SOURCES and LIBRARIES and then includes arduino.mk.
86
86
#              connected arduino's serial device.
87
87
#
88
88
# TARGET       The name of the target file.  This is set automatically if a
89
 
#              .ino or .pde is found, but it is not necessary to set it
 
89
#              .ino (or .pde) is found, but it is not necessary to set it
90
90
#              otherwise.
91
91
#
92
92
# SOURCES      A list of all source files of whatever language.  The language
93
93
#              type is determined by the file extension.  This is set
94
 
#              automatically if a .ino or .pde is found.
 
94
#              automatically if a .ino (or .pde) is found.
95
95
#
96
96
# LIBRARIES    A list of arduino libraries to build and include.  This is set
97
 
#              automatically if a .ino or .pde is found.
 
97
#              automatically if a .ino (or .pde) is found.
98
98
#
99
99
# This makefile also defines the following goals for use on the command line
100
100
# when you run make:
191
191
BOARD_UPLOAD_PROTOCOL := \
192
192
        $(shell sed -ne "s/$(BOARD).upload.protocol=\(.*\)/\1/p" $(BOARDS_FILE))
193
193
 
 
194
# arduino version (currently fixed)
 
195
ARDUINOVER := 100
 
196
 
194
197
# software (prioritise binaries that came with arduino software)
195
198
FIND_SOFTWARE = $(firstword $(wildcard \
196
199
        $(ARDUINODIR)/hardware/tools/$(1) \
205
208
 
206
209
# flags
207
210
CPPFLAGS = -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections
208
 
CPPFLAGS += -mmcu=$(BOARD_BUILD_MCU) -DF_CPU=$(BOARD_BUILD_FCPU)
 
211
CPPFLAGS += -mmcu=$(BOARD_BUILD_MCU)
 
212
CPPFLAGS += -DF_CPU=$(BOARD_BUILD_FCPU) -DARDUINO=$(ARDUINOVER)
209
213
CPPFLAGS += -I. -Iutil -Iutility -I$(ARDUINOSRCDIR)
210
214
CPPFLAGS += -I$(ARDUINODIR)/hardware/arduino/variants/$(BOARD_BUILD_VARIANT)/
211
215
CPPFLAGS += $(addprefix -I$(ARDUINODIR)/libraries/, $(LIBRARIES))