/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-11-23 17:19:57 UTC
  • Revision ID: tim@ed.am-20121123171957-hhvv5usliko07gge
added TODO

Show diffs side-by-side

added added

removed removed

Lines of Context:
234
234
        $(shell sed -ne "s/$(BOARD).upload.speed=\(.*\)/\1/p" $(BOARDS_FILE))
235
235
BOARD_UPLOAD_PROTOCOL := \
236
236
        $(shell sed -ne "s/$(BOARD).upload.protocol=\(.*\)/\1/p" $(BOARDS_FILE))
 
237
BOARD_USB_VID := \
 
238
        $(shell sed -ne "s/$(BOARD).build.vid=\(.*\)/\1/p" $(BOARDS_FILE))
 
239
BOARD_USB_PID := \
 
240
        $(shell sed -ne "s/$(BOARD).build.pid=\(.*\)/\1/p" $(BOARDS_FILE))
237
241
 
238
242
# invalid board?
239
243
ifeq "$(BOARD_BUILD_MCU)" ""
249
253
CPPFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
250
254
CPPFLAGS += -mmcu=$(BOARD_BUILD_MCU)
251
255
CPPFLAGS += -DF_CPU=$(BOARD_BUILD_FCPU) -DARDUINO=$(ARDUINOCONST)
 
256
CPPFLAGS += -DUSB_VID=$(BOARD_USB_VID) -DUSB_PID=$(BOARD_USB_PID)
252
257
CPPFLAGS += -I. -Iutil -Iutility -I $(ARDUINOCOREDIR)
253
258
CPPFLAGS += -I $(ARDUINODIR)/hardware/arduino/variants/$(BOARD_BUILD_VARIANT)/
254
259
CPPFLAGS += $(addprefix -I $(ARDUINODIR)/libraries/, $(LIBRARIES))
326
331
.INTERMEDIATE: $(TARGET).elf
327
332
 
328
333
$(TARGET).elf: $(ARDUINOLIB) $(OBJECTS)
329
 
        $(CC) $(LINKFLAGS) $(OBJECTS) $(ARDUINOLIB) -o $@ -lm
 
334
        $(CC) $(LINKFLAGS) $(OBJECTS) $(ARDUINOLIB) -lm -o $@
330
335
 
331
336
%.o: %.c
332
337
        mkdir -p .dep/$(dir $<)