/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 21:04:56 UTC
  • Revision ID: tim@ed.am-20140108210456-ep6ysunq9o5t7ejb
strip ./ from the path to the current file we're compiling so that, when
creating the dependencies directory, mkdir isn't given a path with ./ in (fixes
#12)

Show diffs side-by-side

added added

removed removed

446
446
        $(CC) $(LINKFLAGS) $(OBJECTS) $(ARDUINOLIB) -lm -o $@
447
447
 
448
448
%.o: %.ino
449
 
        mkdir -p .dep/$(dir $<)
 
449
        mkdir -p .dep/$(pathsubst ./%,%,$(dir $<))
450
450
        $(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $(CPPINOFLAGS) $<
451
451
 
452
452
%.o: %.pde
453
 
        mkdir -p .dep/$(dir $<)
 
453
        mkdir -p .dep/$(pathsubst ./%,%,$(dir $<))
454
454
        $(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $(CPPINOFLAGS) $<
455
455
 
456
456
%.o: %.c
457
 
        mkdir -p .dep/$(dir $<)
 
457
        mkdir -p .dep/$(pathsubst ./%,%,$(dir $<))
458
458
        $(COMPILE.c) $(CPPDEPFLAGS) -o $@ $<
459
459
 
460
460
%.o: %.cpp
461
 
        mkdir -p .dep/$(dir $<)
 
461
        mkdir -p .dep/$(pathsubst ./%,%,$(dir $<))
462
462
        $(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $<
463
463
 
464
464
%.o: %.cc
465
 
        mkdir -p .dep/$(dir $<)
 
465
        mkdir -p .dep/$(pathsubst ./%,%,$(dir $<))
466
466
        $(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $<
467
467
 
468
468
%.o: %.C
469
 
        mkdir -p .dep/$(dir $<)
 
469
        mkdir -p .dep/$(pathsubst ./%,%,$(dir $<))
470
470
        $(COMPILE.cpp) $(CPPDEPFLAGS) -o $@ $<
471
471
 
472
472
%.o: %.S
473
 
        mkdir -p .dep/$(dir $<)
 
473
        mkdir -p .dep/$(pathsubst ./%,%,$(dir $<))
474
474
        $(COMPILE.S) $(CPPDEPFLAGS) -o $@ $<
475
475
 
476
476
# building the arduino library