/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: Tim Marston
  • Date: 2013-05-22 19:42:25 UTC
  • Revision ID: tim@ed.am-20130522194225-xxka0ey9595wiqcv
read and use the build.core parameter in boards.txt

Show diffs side-by-side

added added

removed removed

Lines of Context:
198
198
 
199
199
# obtain board parameters from the arduino boards.txt file
200
200
BOARDSFILE := $(ARDUINODIR)/hardware/arduino/boards.txt
201
 
readboardsparam = $(shell sed -ne "s/^$(BOARD).$(1)=\(.*\)/\1/p" $(BOARDSFILE))
 
201
readboardsparam = $(shell sed -ne "s/$(BOARD).$(1)=\(.*\)/\1/p" $(BOARDSFILE))
202
202
BOARD_BUILD_MCU := $(call readboardsparam,build.mcu)
203
203
BOARD_BUILD_FCPU := $(call readboardsparam,build.f_cpu)
204
204
BOARD_BUILD_VARIANT := $(call readboardsparam,build.variant)
248
248
 
249
249
# automatically determine included libraries
250
250
LIBRARIES := $(filter $(notdir $(wildcard $(addsuffix /*, $(LIBRARYPATH)))), \
251
 
        $(shell sed -nre "s/^\s*\#\s*include\s*[<\"](\S+)\.h[>\"].*/\1/p" \
252
 
        $(SOURCES)))
 
251
        $(shell sed -ne "s/^ *\# *include *[<\"]\(.*\)\.h[>\"]/\1/p" $(SOURCES)))
253
252
 
254
253
endif
255
254
 
301
300
CPPDEPFLAGS = -MMD -MP -MF .dep/$<.dep
302
301
CPPINOFLAGS := -x c++ -include $(ARDUINOCOREDIR)/Arduino.h
303
302
AVRDUDEFLAGS += $(addprefix -C , $(AVRDUDECONF)) -DV
304
 
AVRDUDEFLAGS += -p$(BOARD_BUILD_MCU) -P$(SERIALDEV) -c$(BOARD_UPLOAD_PROTOCOL)
305
 
AVRDUDEFLAGS += $(addprefix -b, $(BOARD_UPLOAD_SPEED))
 
303
AVRDUDEFLAGS += -p $(BOARD_BUILD_MCU) -P $(SERIALDEV)
 
304
AVRDUDEFLAGS += -c $(BOARD_UPLOAD_PROTOCOL) -b $(BOARD_UPLOAD_SPEED)
306
305
LINKFLAGS += -Os -Wl,--gc-sections -mmcu=$(BOARD_BUILD_MCU)
307
306
 
308
307
# figure out which arg to use with stty (for OS X, GNU and busybox stty)