Do not overwrite earlier variables, only set values if these were not
set before. This allows for a pattern such as:
PROJECT = Venus_Skeleton
ARDUINO_MODEL = uno
#PORT = /dev/ttyACM*
ARDUINO = 163
#ARDUINO_DIR = /usr/share/arduino
#ARDUINO_VARIANT = $(ARDUINO_DIR)/hardware/arduino/avr/variants/standard
ARDUINO_LIBS = Serial Servo Wire
USER_LIBDIR = ./libs
USER_LIBS = HMC5883L IRremote TrueRandom
CEXTRA = -fdiagnostics-color=auto
include ~/Arduino/arduino-makefile/Makefile
Other overridable variables: ARDUINO_PROGRAMMER, ARDUINO_CORE, LDLIBS,
OUTPUT, AVR_TOOLS_PATH, RESETCMD and CDEFS.
Setting ARDUINO_LIBS, OPT_WARN, OPT_WARN_C, OPT_WARN_CXX or
OPT_OTHER will prevent defaults from being set.
Some variables such as HEXFORMAT, TARFILE, LISTING_ARGS, SYMBOL_ARGS
and DEPFILE are still not configurable because they can be considered
internal.
Possibly incompatible changes:
- AVRDUDE_PROGRAMMER is not always set to avr109 anymore, its value
is now based on a default from boards.txt (based on the specified
model and family).
The detection of information of the card in boards.txt failed when
the information were assigned to families and specific models
We used to look only at the properties of a specific model but sometimes
we also have to check for properties in the "parent" node.
This patch corrects that by allowing to specify both the family and
the model of the card if required.
Example of what the patch corrects:
mega.build.f_cpu=16000000L
mega.menu.cpu.atmega2560.build.mcu=atmega2560
For this card, the F_CPU is given by mega (the family) and the MCU is
given by the specific model (atmega2560).
The default value of AVRDUDE_PROGRAMMER was not overridden by `sed'
since we use a conditional assignation (i.e. if the variable is not
already set, then we set it)