/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-10-22 16:47:36 UTC
  • Revision ID: tim@ed.am-20121022164736-86ja3l4r7tl9jr4y
use a more sensible command-line oprdering when linking

Show diffs side-by-side

added added

removed removed

Lines of Context:
249
249
CPPFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
250
250
CPPFLAGS += -mmcu=$(BOARD_BUILD_MCU)
251
251
CPPFLAGS += -DF_CPU=$(BOARD_BUILD_FCPU) -DARDUINO=$(ARDUINOCONST)
252
 
CPPFLAGS += -I. -Iutil -Iutility -I$(ARDUINOCOREDIR)
253
 
CPPFLAGS += -I$(ARDUINODIR)/hardware/arduino/variants/$(BOARD_BUILD_VARIANT)/
254
 
CPPFLAGS += $(addprefix -I$(ARDUINODIR)/libraries/, $(LIBRARIES))
255
 
CPPFLAGS += $(patsubst %, -I$(ARDUINODIR)/libraries/%/utility, $(LIBRARIES))
 
252
CPPFLAGS += -I. -Iutil -Iutility -I $(ARDUINOCOREDIR)
 
253
CPPFLAGS += -I $(ARDUINODIR)/hardware/arduino/variants/$(BOARD_BUILD_VARIANT)/
 
254
CPPFLAGS += $(addprefix -I $(ARDUINODIR)/libraries/, $(LIBRARIES))
 
255
CPPFLAGS += $(patsubst %, -I $(ARDUINODIR)/libraries/%/utility, $(LIBRARIES))
256
256
CPPDEPFLAGS = -MMD -MP -MF .dep/$<.dep
257
257
CPPINOFLAGS := -x c++ -include $(ARDUINOCOREDIR)/Arduino.h
258
258
AVRDUDEFLAGS := $(addprefix -C , $(AVRDUDECONF)) -DV
326
326
.INTERMEDIATE: $(TARGET).elf
327
327
 
328
328
$(TARGET).elf: $(ARDUINOLIB) $(OBJECTS)
329
 
        $(CC) $(LINKFLAGS) $(OBJECTS) $(ARDUINOLIB) -o $@
 
329
        $(CC) $(LINKFLAGS) $(OBJECTS) $(ARDUINOLIB) -lm -o $@
330
330
 
331
331
%.o: %.c
332
332
        mkdir -p .dep/$(dir $<)