/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-01-14 00:21:26 UTC
  • Revision ID: edam@waxworlds.org-20120114002126-0m1ktlytlif4dyt6
added "monitor" goal; documented boards and monitor goals

Show diffs side-by-side

added added

removed removed

Lines of Context:
122
122
#              target, from those that that would be built for the
123
123
#              project.
124
124
#
 
125
# boards       This is not a real goal.  It just displays a list of
 
126
#              available board names, so that you can set the BOARD
 
127
#              environment variable appropriately.
 
128
#
 
129
# monitor      This is not a real goal.  It starts screen on the serial
 
130
#              device.  It is ment to be an equivelant to the arduino
 
131
#              serial monitor.
125
132
#_______________________________________________________________________________
126
133
#
127
134
 
208
215
CPPFLAGS += -mmcu=$(BOARD_BUILD_MCU) -DF_CPU=$(BOARD_BUILD_FCPU)
209
216
CPPFLAGS += -I. -Iutil -Iutility -I$(ARDUINOSRCDIR)
210
217
CPPFLAGS += -I$(ARDUINODIR)/hardware/arduino/variants/$(BOARD_BUILD_VARIANT)/
211
 
CPPFLAGS += $(addprefix -I$(ARDUINODIR)/libraries/,$(LIBRARIES))
 
218
CPPFLAGS += $(addprefix -I$(ARDUINODIR)/libraries/, $(LIBRARIES))
 
219
CPPFLAGS += $(patsubst %, -I$(ARDUINODIR)/libraries/%/utility, $(LIBRARIES))
212
220
AVRDUDEFLAGS = -C $(ARDUINODIR)/hardware/tools/avrdude.conf -DV
213
221
AVRDUDEFLAGS += -p $(BOARD_BUILD_MCU) -P $(SERIALDEV)
214
222
AVRDUDEFLAGS += -c $(BOARD_UPLOAD_PROTOCOL) -b $(BOARD_UPLOAD_SPEED)
220
228
#_______________________________________________________________________________
221
229
#                                                                          RULES
222
230
 
223
 
.PHONY: all target upload clean boards
 
231
.PHONY: all target upload clean boards monitor
224
232
 
225
233
all: target upload
226
234
 
240
248
        @sed -ne '/^#/d;s/^\(.*\).name=\(.*\)/\1            \2/;T' \
241
249
                -e 's/\(.\{12\}\) *\(.*\)/\1 \2/;p' $(BOARDS_FILE)
242
250
 
 
251
monitor:
 
252
        screen $(SERIALDEV)
 
253
 
243
254
# building the target
244
255
 
245
256
$(TARGET).hex: $(TARGET).elf