/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: 2014-01-08 20:03:46 UTC
  • Revision ID: tim@ed.am-20140108200346-zkw0fpipv27wlweb
minor changes to comments

Show diffs side-by-side

added added

removed removed

264
264
# (this is a really stupid way of doing it, but it's how the IDE works -- if
265
265
# it's causing problems, you can override it by setting LIBRARIES manually)
266
266
INCLUDEDHEADERS := \
267
 
        $(shell sed -ne "s/^\s*\#\s*include\s*[<\"]\(\S\+\.h\)[>\"].*/\1/p" \
 
267
        $(shell sed -nre "s/^\s*\#\s*include\s*[<\"](\S+\.h)[>\"].*/\1/p" \
268
268
        $(SOURCES))
269
269
reverse = $(if $(1),$(call reverse,$(wordlist 2,$(words $(1)),$(1)))) \
270
270
        $(firstword $(1))
388
388
 
389
389
boards:
390
390
        @echo "Available BOARD values:"
391
 
        @sed -ne '/^\w\+\.name=/p; /^menu\.cpu\.\w\+\.\w\+=/p;' $(BOARDSFILES) | \
392
 
                sed -e 's/\(\w\+\)\.name=\(.*\)/\1                   \2/' \
393
 
                        -e 's/menu.cpu.\w\+\(\.\w\+\)=\(.*\)/  \1                  --\2/' \
394
 
                        -e 's/\(.\{19\}\) *\(.*\)/  \1 \2/; s/--/  ...with /;'
 
391
        @sed -nre '/^\w+\.name=/p; /^menu\.cpu\.\w+\.\w+=/p;' $(BOARDSFILES) | \
 
392
                sed -re 's/(\w+)\.name=(.*)/\1                   \2/' \
 
393
                        -e 's/menu.cpu.\w+(\.\w+)=(.*)/  \1                  --\2/' \
 
394
                        -e 's/(.{19}) *(.*)/  \1 \2/; s/--/  w\/ /;'
395
395
ifneq "$(ARDUINOBACKENDS)" "/"
396
396
        @echo
397
397
        @echo "NOTE: where a board supports multiple CPUs, you must specify" \
446
446
        $(CC) $(LINKFLAGS) $(OBJECTS) $(ARDUINOLIB) -lm -o $@
447
447
 
448
448
%.o: %.ino
449
 
        mkdir -p .dep/$(pathsubst ./%,%,$(dir $<))
 
449
        mkdir -p .dep/$(dir $<)
450
450
        $(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $(CPPINOFLAGS) $<
451
451
 
452
452
%.o: %.pde
453
 
        mkdir -p .dep/$(pathsubst ./%,%,$(dir $<))
 
453
        mkdir -p .dep/$(dir $<)
454
454
        $(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $(CPPINOFLAGS) $<
455
455
 
456
456
%.o: %.c
457
 
        mkdir -p .dep/$(pathsubst ./%,%,$(dir $<))
 
457
        mkdir -p .dep/$(dir $<)
458
458
        $(COMPILE.c) $(CPPDEPFLAGS) -o $@ $<
459
459
 
460
460
%.o: %.cpp
461
 
        mkdir -p .dep/$(pathsubst ./%,%,$(dir $<))
 
461
        mkdir -p .dep/$(dir $<)
462
462
        $(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $<
463
463
 
464
464
%.o: %.cc
465
 
        mkdir -p .dep/$(pathsubst ./%,%,$(dir $<))
 
465
        mkdir -p .dep/$(dir $<)
466
466
        $(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $<
467
467
 
468
468
%.o: %.C
469
 
        mkdir -p .dep/$(pathsubst ./%,%,$(dir $<))
 
469
        mkdir -p .dep/$(dir $<)
470
470
        $(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $<
471
471
 
472
472
%.o: %.S
473
 
        mkdir -p .dep/$(pathsubst ./%,%,$(dir $<))
 
473
        mkdir -p .dep/$(dir $<)
474
474
        $(COMPILE.S) $(CPPDEPFLAGS) -o $@ $<
475
475
 
476
476
# building the arduino library