Browse Source

add depend target, and use the depend to make files to pass to entr to run build..

mbed-sx1276
John-Mark Gurney 3 years ago
parent
commit
c602a3a894
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      Makefile

+ 9
- 1
Makefile View File

@@ -34,11 +34,19 @@ CFLAGS+= -Werror -Wall
.PHONY: all
all: $(PROG)$(PROGEXT) $(PROG).list

.PHONY: depend
depend: $(SRCS)
$(ARMCC) $(ARMTARGET) $(CFLAGS) $(.ALLSRC) -MM > .depend || rm -f .depend

$(PROG)$(PROGEXT): $(OBJS)
$(ARMCC) $(ARMTARGET) -o $@ $(.ALLSRC) -T$(LINKER_SCRIPT) --specs=nosys.specs -Wl,--gc-sections -static --specs=nano.specs -Wl,--start-group -lc -lm -Wl,--end-group

$(PROG).list: $(PROG)$(PROGEXT)
$(ARMOBJDUMP) -h -S $(.ALLSRC) > $@
$(ARMOBJDUMP) -h -S $(.ALLSRC) > $@ || rm -f $@

.PHONY: runbuild
runbuild:
for i in $$(gsed ':x; /\\$$/ { N; s/\\\n//; tx }' < .depend | sed -e 's/^[^:]*://'); do echo $$i; done | entr -d sh -c 'cd $(.CURDIR) && $(MAKE) all'

.PHONY: runtests
runtests:


Loading…
Cancel
Save